Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .coderabbit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ reviews:
- path: "/**/test_*.py"
instructions: |
Review the following unit test code written using the pytest test library. Ensure that:
- The code adheres to best practices associated with Pytest. The project uses uv.
- The code adheres to best practices associated with Pytest. The project uses uv.
- Descriptive test names are used to clearly convey the intent of each test.
- For Integration tests, we should avoid mocking. Integration tests of classes should use the actual client.
- The test should convey actual value. Tests which initialise a class and test the values of those classes should be discouraged
- Discourage verbosity and redundant tests
tone_instructions: "If you must write a poem, write it in the style of Sylvia Plath."
- For Integration tests, we should avoid mocking. Integration tests of classes should use the actual client.
- The test should convey actual value. Tests which initialise a class and test the values of those classes should be discouraged
- Discourage verbosity and redundant tests
tone_instructions: "If you must write a poem, write it in the style of Sylvia Plath."
4 changes: 2 additions & 2 deletions .cursor/rules/python.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ globs:
alwaysApply: true
---

never mock.
tests use pytest.
never mock.
tests use pytest.
never adjust sys.path.

never write: except Exception as e
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ jobs:

- name: Install core PyPI using uv
run: |
uv pip install vision-agents==${{ needs.build-core.outputs.version }}
uv pip install vision-agents==${{ needs.build-core.outputs.version }}
39 changes: 4 additions & 35 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,43 +16,12 @@ env:
UV_FROZEN: "1"

jobs:
ruff:
name: Ruff
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Install dependencies
uses: ./.github/actions/python-uv-setup
- name: Run Ruff linter
run: uv run ruff check .
- name: Run Ruff formatter
run: uv run ruff format --check .

mypy:
name: Mypy
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Install dependencies
uses: ./.github/actions/python-uv-setup
# Restore mypy cache to speed up the run
- name: Restore mypy cache
uses: actions/cache/restore@v4
with:
path: .mypy_cache
key: mypy-cache-${{ hashFiles('pyproject.toml') }}
- name: Run mypy for core
run: uv run mypy --install-types --non-interactive agents-core/vision_agents
- name: Run mypy for plugins
run: uv run mypy --install-types --non-interactive --exclude 'plugins/.*/tests/.*' plugins
# Save the updated mypy cache
- name: Save mypy cache
uses: actions/cache/save@v4
with:
path: .mypy_cache
key: mypy-cache-${{ hashFiles('pyproject.toml') }}
- uses: actions/checkout@v5
- uses: j178/prek-action@v1

test:
name: Test "${{ inputs.marker }}"
Expand Down
23 changes: 9 additions & 14 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,34 +1,29 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.14.5
rev: v0.14.8
hooks:
# Run the linter.
- id: ruff-check
args: [ --fix ]
# Run the formatter.
- id: ruff-format

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
args: ["--maxkb=6000"]

# Match GitHub checks: mypy for main package and plugins
- repo: local
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.19.0
hooks:
- id: mypy-main
- id: mypy
name: mypy (vision_agents)
entry: uv run --frozen mypy --install-types --non-interactive agents-core/vision_agents
language: system
pass_filenames: false
types_or: [python]
- id: mypy-plugins
args: [--install-types, --non-interactive, "agents-core/vision_agents"]
- id: mypy
name: mypy (plugins)
entry: uv run --frozen mypy --install-types --non-interactive --exclude 'plugins/.*/tests/.*' plugins
language: system
pass_filenames: false
types_or: [python]
args: [--install-types, --non-interactive, --exclude, "plugins/.*/tests/.*", plugins]
2 changes: 1 addition & 1 deletion PRODUCTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ A distributed approach where agents are available in many regions is ideal

- Fly
- Digital Ocean
- AWS
- AWS
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ While building the integrations, here are the limitations we've noticed (Dec 202
* Longer videos can cause the AI to lose context. For instance if it's watching a soccer match it will get confused after 30 seconds
* Most applications require a combination of small specialized models like Yolo/Roboflow/Moondream, API calls to get more context and larger models like gemini/openAI
* Image size & FPS need to stay relatively low due to performance constraints
* Video doesn’t trigger responses in realtime models. You always need to send audio/text to trigger a response.
* Video doesn’t trigger responses in realtime models. You always need to send audio/text to trigger a response.

## Star History

Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ While we appreciate any information that you are willing to provide, please make

### Scope

Only code in this repository is in scope.
Only code in this repository is in scope.
Third-party services (hosted demo, npm registry, etc.) are handled separately.
2 changes: 1 addition & 1 deletion agents-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ Build Vision Agents quickly with any model or video provider.

Created by Stream, uses [Stream's edge network](https://getstream.io/video/) for ultra-low latency.

See [Github](https://github.com/GetStream/Vision-Agents).
See [Github](https://github.com/GetStream/Vision-Agents).
9 changes: 4 additions & 5 deletions agents-core/vision_agents/PROTOBUF_GENERATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class Participant(DataClassJsonMixin):
is_speaking: Optional[bool] = None
audio_level: Optional[float] = None
# ... all other fields

@classmethod
def from_proto(cls, proto_obj) -> 'Participant':
"""Create from protobuf Participant."""
Expand Down Expand Up @@ -243,7 +243,7 @@ The EventManager has been updated to seamlessly handle the new protobuf events:
```python
from vision_agents.core.events.manager import EventManager
from vision_agents.core.edge.sfu_events import AudioLevelEvent

manager = EventManager()
manager.register(AudioLevelEvent)
```
Expand All @@ -255,13 +255,13 @@ The EventManager has been updated to seamlessly handle the new protobuf events:
event = AudioLevelEvent.from_proto(proto, session_id='session123')
manager.send(event) # BaseEvent fields preserved
```

- Send raw protobuf messages (auto-wrapped):
```python
proto = events_pb2.AudioLevel(user_id='user456', level=0.95)
manager.send(proto) # Automatically wrapped in AudioLevelEvent
```

- Create events without payload (all fields optional):
```python
event = AudioLevelEvent() # No protobuf payload needed
Expand All @@ -283,4 +283,3 @@ The EventManager has been updated to seamlessly handle the new protobuf events:
- **Simplified logic**: Single check distinguishes raw protobuf from wrapped events
- **Type safety**: All generated events properly inherit from BaseEvent
- **Flexible usage**: Use raw protobuf or wrapped events interchangeably

Loading
Loading