Skip to content
Merged
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
2 changes: 1 addition & 1 deletion agents-core/vision_agents/core/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def setup_logging(log_level: str) -> None:
)

# Set specific logger levels
logging.getLogger("stream_agents").setLevel(numeric_level)
logging.getLogger("vision_agents").setLevel(numeric_level)
logging.getLogger("test123").setLevel(numeric_level)


Expand Down
4 changes: 2 additions & 2 deletions agents-core/vision_agents/core/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@

import logging

from .utils import get_stream_agents_version
from .utils import get_vision_agents_version

logger = logging.getLogger(__name__)

__all__ = ["get_stream_agents_version"]
__all__ = ["get_vision_agents_version"]


6 changes: 3 additions & 3 deletions agents-core/vision_agents/core/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,15 +116,15 @@ def frame_to_png_bytes(frame) -> bytes:
return b""


def get_stream_agents_version() -> str:
def get_vision_agents_version() -> str:
"""
Get the installed stream-agents package version.
Get the installed vision-agents package version.

Returns:
Version string, or "unknown" if not available.
"""
try:
return importlib.metadata.version("stream-agents")
return importlib.metadata.version("vision-agents")
except importlib.metadata.PackageNotFoundError:
return "unknown"

26 changes: 13 additions & 13 deletions docs/ai/instructions/ai-events-example.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Event System Developer Guide

This guide explains how to use the event system when building plugins for stream-agents. The event system provides a centralized way to handle asynchronous communication between components.
This guide explains how to use the event system when building plugins for vision-agents. The event system provides a centralized way to handle asynchronous communication between components.

## Table of Contents

Expand Down Expand Up @@ -29,7 +29,7 @@ The `EventManager` is the core component that handles event registration, subscr
### Basic Event Manager

```python
from stream_agents.core.events.manager import EventManager
from vision_agents.core.events.manager import EventManager

# Create a basic event manager
manager = EventManager()
Expand Down Expand Up @@ -57,7 +57,7 @@ class MyPlugin:
### Register Individual Events

```python
from stream_agents.core.events.manager import EventManager
from vision_agents.core.events.manager import EventManager
from my_plugin.events import MyCustomEvent

manager = EventManager()
Expand Down Expand Up @@ -92,7 +92,7 @@ All events must inherit from `PluginBaseEvent` and follow this pattern:

```python
from dataclasses import dataclass, field
from stream_agents.core.events import PluginBaseEvent
from vision_agents.core.events import PluginBaseEvent
from typing import Optional, Any

@dataclass
Expand Down Expand Up @@ -246,7 +246,7 @@ async def handle_gemini_events(event: GeminiConnectedEvent):
```python
# my_plugin/events.py
from dataclasses import dataclass, field
from stream_agents.core.events import PluginBaseEvent
from vision_agents.core.events import PluginBaseEvent

@dataclass
class MyPluginStartEvent(PluginBaseEvent):
Expand All @@ -260,7 +260,7 @@ class MyPluginDataEvent(PluginBaseEvent):
metadata: Optional[dict] = None

# my_plugin/plugin.py
from stream_agents.core.plugin_base import PluginBase
from vision_agents.core.plugin_base import PluginBase
from . import events

class MyPlugin(PluginBase):
Expand Down Expand Up @@ -289,8 +289,8 @@ class MyPlugin(PluginBase):

```python
# Simple plugin using base class events
from stream_agents.core.stt.stt import STT
from stream_agents.core.stt.events import STTTranscriptEvent, STTErrorEvent
from vision_agents.core.stt.stt import STT
from vision_agents.core.stt.events import STTTranscriptEvent, STTErrorEvent

class SimpleSTT(STT):
def __init__(self):
Expand Down Expand Up @@ -325,8 +325,8 @@ class SimpleSTT(STT):

```python
# Agent with event-driven architecture
from stream_agents.core.agents import Agent
from stream_agents.core.agents.events import AgentSayEvent
from vision_agents.core.agents import Agent
from vision_agents.core.agents.events import AgentSayEvent

class MyAgent(Agent):
def __init__(self, **kwargs):
Expand Down Expand Up @@ -464,7 +464,7 @@ async def test_plugin_events():
### OpenAI Plugin Events

```python
# plugins/openai/stream_agents/plugins/openai/events.py
# plugins/openai/vision_agents/plugins/openai/events.py
@dataclass
class OpenAIStreamEvent(PluginBaseEvent):
type: str = field(default='plugin.openai.stream', init=False)
Expand Down Expand Up @@ -503,7 +503,7 @@ class OpenAILLM(LLM):
### Gemini Plugin Events

```python
# plugins/gemini/stream_agents/plugins/gemini/events.py
# plugins/gemini/vision_agents/plugins/gemini/events.py
@dataclass
class GeminiConnectedEvent(PluginBaseEvent):
type: str = field(default='plugin.gemini.connected', init=False)
Expand Down Expand Up @@ -541,4 +541,4 @@ The event system provides a powerful, flexible way to build plugins with:
- **Testing**: Simple to test by subscribing to events
- **Monitoring**: Easy to add logging and analytics by subscribing to events

Use this guide when building new plugins to ensure consistent, maintainable, and testable code with the event system.
Use this guide when building new plugins to ensure consistent, maintainable, and testable code with the event system.
22 changes: 11 additions & 11 deletions docs/ai/instructions/ai-llm.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

## Overview

LLM plugins provide language model functionality for the stream-agents framework. They handle text generation, conversation management, and function calling capabilities.
LLM plugins provide language model functionality for the vision-agents framework. They handle text generation, conversation management, and function calling capabilities.

## Base Class

All LLM plugins should inherit from `stream_agents.core.llm.llm.LLM`:
All LLM plugins should inherit from `vision_agents.core.llm.llm.LLM`:

```python
from stream_agents.core.llm.llm import LLM, LLMResponseEvent
from stream_agents.core.llm.types import LLMTextResponseDeltaEvent
from vision_agents.core.llm.llm import LLM, LLMResponseEvent
from vision_agents.core.llm.types import LLMTextResponseDeltaEvent
from . import events

class MyLLM(LLM):
Expand Down Expand Up @@ -162,7 +162,7 @@ Implement function calling methods if supported:
```python
def _convert_tools_to_provider_format(self, tools: List[ToolSchema]) -> List[Dict[str, Any]]:
"""Convert tools to your provider's format."""
# Convert stream-agents ToolSchema to your provider's format
# Convert vision-agents ToolSchema to your provider's format
return converted_tools

def _extract_tool_calls_from_response(self, response: Any) -> List[NormalizedToolCallItem]:
Expand All @@ -173,10 +173,10 @@ def _extract_tool_calls_from_response(self, response: Any) -> List[NormalizedToo

## Realtime/STS Support

For Speech-to-Speech (STS) functionality, inherit from `stream_agents.core.llm.realtime.Realtime`:
For Speech-to-Speech (STS) functionality, inherit from `vision_agents.core.llm.realtime.Realtime`:

```python
from stream_agents.core.llm.realtime import Realtime
from vision_agents.core.llm.realtime import Realtime

class MyRealtimeLLM(Realtime):
def __init__(self, **kwargs):
Expand All @@ -200,11 +200,11 @@ class MyRealtimeLLM(Realtime):
Here's a complete example of an LLM plugin:

```python
# myllm/stream_agents/plugins/myllm/llm.py
# myllm/vision_agents/plugins/myllm/llm.py
from typing import Optional, List, Any
from stream_agents.core.llm.llm import LLM, LLMResponseEvent
from stream_agents.core.llm.types import LLMTextResponseDeltaEvent
from stream_agents.core.processors import Processor
from vision_agents.core.llm.llm import LLM, LLMResponseEvent
from vision_agents.core.llm.types import LLMTextResponseDeltaEvent
from vision_agents.core.processors import Processor
from . import events


Expand Down
14 changes: 7 additions & 7 deletions docs/ai/instructions/ai-stt.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

## Overview

STT (Speech-to-Text) plugins provide audio transcription functionality for the stream-agents framework. They convert audio streams into text transcripts that can be processed by other components.
STT (Speech-to-Text) plugins provide audio transcription functionality for the vision-agents framework. They convert audio streams into text transcripts that can be processed by other components.

## Base Class

All STT plugins should inherit from `stream_agents.core.stt.stt.STT`:
All STT plugins should inherit from `vision_agents.core.stt.stt.STT`:

```python
from stream_agents.core.stt.stt import STT
from stream_agents.core.stt.events import STTTranscriptEvent, STTStartedEvent, STTEndedEvent
from vision_agents.core.stt.stt import STT
from vision_agents.core.stt.events import STTTranscriptEvent, STTStartedEvent, STTEndedEvent
from . import events

class MySTT(STT):
Expand Down Expand Up @@ -327,11 +327,11 @@ class MyVADIntegratedSTT(STT):
Here's a complete example of an STT plugin:

```python
# mystt/stream_agents/plugins/mystt/stt.py
# mystt/vision_agents/plugins/mystt/stt.py
import asyncio
from typing import Optional, List, AsyncIterator
from stream_agents.core.stt.stt import STT
from stream_agents.core.stt.events import STTTranscriptEvent
from vision_agents.core.stt.stt import STT
from vision_agents.core.stt.events import STTTranscriptEvent
from . import events

class MySTT(STT):
Expand Down
14 changes: 7 additions & 7 deletions docs/ai/instructions/ai-tts.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

## Overview

TTS (Text-to-Speech) plugins provide audio synthesis functionality for the stream-agents framework. They convert text into audio streams that can be played to users.
TTS (Text-to-Speech) plugins provide audio synthesis functionality for the vision-agents framework. They convert text into audio streams that can be played to users.

## Base Class

All TTS plugins should inherit from `stream_agents.core.tts.tts.TTS`:
All TTS plugins should inherit from `vision_agents.core.tts.tts.TTS`:

```python
from stream_agents.core.tts.tts import TTS
from stream_agents.core.tts.events import TTSAudioEvent, TTSStartedEvent, TTSEndedEvent
from vision_agents.core.tts.tts import TTS
from vision_agents.core.tts.events import TTSAudioEvent, TTSStartedEvent, TTSEndedEvent
from . import events

class MyTTS(TTS):
Expand Down Expand Up @@ -235,11 +235,11 @@ class MyRealtimeTTS(TTS):
Here's a complete example of a TTS plugin:

```python
# mytts/stream_agents/plugins/mytts/tts.py
# mytts/vision_agents/plugins/mytts/tts.py
import asyncio
from typing import Optional, List, AsyncIterator
from stream_agents.core.tts.tts import TTS
from stream_agents.core.tts.events import TTSAudioEvent
from vision_agents.core.tts.tts import TTS
from vision_agents.core.tts.events import TTSAudioEvent
from . import events

class MyTTS(TTS):
Expand Down
20 changes: 10 additions & 10 deletions examples/02_golf_coach_example/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
[project]
name = "stream-agents-golf"
name = "vision-agents-golf"
version = "0.0.0"
requires-python = ">=3.13"

# put only what this example needs
dependencies = [
"python-dotenv>=1.0",
"stream-agents",
"stream-agents-plugins-openai",
"stream-agents-plugins-getstream",
"stream-agents-plugins-ultralytics",
"vision-agents",
"vision-agents-plugins-openai",
"vision-agents-plugins-getstream",
"vision-agents-plugins-ultralytics",
"ultralytics>=8.3.184",
"av>=14.4.0",
]

[tool.uv.sources]
"stream-agents" = {path = "../../agents-core", editable=true}
"stream-agents-plugins-deepgram" = {path = "../../plugins/deepgram", editable=true}
"stream-agents-plugins-ultralytics" = {path = "../../plugins/ultralytics", editable=true}
"stream-agents-plugins-openai" = {path = "../../plugins/openai", editable=true}
"stream-agents-plugins-getstream" = {path = "../../plugins/getstream", editable=true}
"vision-agents" = {path = "../../agents-core", editable=true}
"vision-agents-plugins-deepgram" = {path = "../../plugins/deepgram", editable=true}
"vision-agents-plugins-ultralytics" = {path = "../../plugins/ultralytics", editable=true}
"vision-agents-plugins-openai" = {path = "../../plugins/openai", editable=true}
"vision-agents-plugins-getstream" = {path = "../../plugins/getstream", editable=true}
Loading