Skip to content

Commit a2c5d3f

Browse files
authored
[AI-297] Expand docs for standardise plugin generation (#221)
* Add section for standard README format * Update OpenRouter plugin description
1 parent 1b27229 commit a2c5d3f

File tree

2 files changed

+63
-9
lines changed

2 files changed

+63
-9
lines changed

docs/ai/instructions/ai-plugin.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,40 @@ members = [
7070
## PCM / Audio management
7171

7272
Use `PcmData` and other utils available from the `getstream.video.rtc.track_util` module. Do not write code that directly manipulates PCM, use the audio utilities instead.
73+
74+
## Plugin README.MD Format
75+
The README.md of the plugin should contain a standardise format which includes an intro briefly describing the functionality of the plugin and what it allows developers to build when paired with Vision Agents. See example below:
76+
```md
77+
# Plugin Name
78+
"Name of plugin"
79+
80+
## Features
81+
- Few bullet points calling attention to the main functionality of the plugins
82+
83+
## Installation
84+
Installation instructions in the format of a command using uv add. As an example:
85+
```
86+
uv add vision-agents[PLUGIN-NAME]
87+
```
88+
89+
## Usage
90+
Basic code snippet showing the usage in code. Example:
91+
```python
92+
from vision_agents.plugins import ultralytics # Plugin import
93+
94+
# Create a YOLO pose processor
95+
processor = ultralytics.YOLOPoseProcessor(
96+
model_path="yolo11n-pose.pt",
97+
conf_threshold=0.5,
98+
device="cpu",
99+
enable_hand_tracking=True,
100+
enable_wrist_highlights=True
101+
)
102+
```
103+
104+
## Configuration
105+
Parameters developers can specify to adjust the plugin behaviour. This should be shown as a table with the parameter name, a short description derived from the code docs and the accepted values (either data type or default value)
106+
107+
## Dependencies
108+
Bullet point list of dependencies the plugin requires to work correctly
109+
```

plugins/openrouter/README.md

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,50 @@
11
# OpenRouter Plugin
22

3-
OpenRouter plugin for vision agents. This plugin provides LLM capabilities using OpenRouter's API, which is compatible with the OpenAI API format.
3+
This plugin provides LLM capabilities using OpenRouter's API, which offers access to multiple LLM providers through a unified OpenAI-compatible interface. It enables developers to easily switch between different models from various providers (Anthropic, Google, OpenAI, etc.) without changing their code.
44

5-
## Note/ Issues
5+
## Features
66

7-
Instruction following doesn't always work with openrouter atm.
7+
- Access to multiple LLM providers through a single API
8+
- OpenAI-compatible interface for easy integration
9+
- Support for various models including Claude, Gemini, GPT, and more
10+
- Automatic conversion of instructions to system messages
11+
- Manual conversation history management
812

913
## Installation
1014

1115
```bash
12-
uv pip install vision-agents-plugins-openrouter
16+
uv add vision-agents[openrouter]
1317
```
1418

1519
## Usage
1620

1721
```python
18-
from vision_agents.plugins import openrouter, getstream, elevenlabs, cartesia, deepgram, smart_turn
22+
from vision_agents.core import User, Agent
23+
from vision_agents.plugins import openrouter, getstream, elevenlabs, deepgram, smart_turn
1924

2025
agent = Agent(
2126
edge=getstream.Edge(),
2227
agent_user=User(name="OpenRouter AI"),
2328
instructions="Be helpful and friendly to the user",
2429
llm=openrouter.LLM(
25-
model="anthropic/claude-haiku-4.5", # Can also use other models like anthropic/claude-3-opus
30+
model="anthropic/claude-haiku-4.5",
2631
),
2732
tts=elevenlabs.TTS(),
2833
stt=deepgram.STT(),
29-
turn_detection=smart_turn.TurnDetection(
30-
buffer_in_seconds=2.0, confidence_threshold=0.5
31-
)
34+
turn_detection=smart_turn.TurnDetection(),
3235
)
3336
```
37+
38+
## Configuration
39+
40+
| Parameter | Description | Accepted Values |
41+
|-----------|-------------|----------------|
42+
| `api_key` | OpenRouter API key | `str \| None`. If not provided, uses `OPENROUTER_API_KEY` environment variable |
43+
| `base_url` | OpenRouter API base URL | `str`. Default: `"https://openrouter.ai/api/v1"` |
44+
| `model` | Model identifier to use | `str`. Default: `"openrouter/andromeda-alpha"`. Examples: `"anthropic/claude-haiku-4.5"`, `"google/gemini-2.5-flash"`, `"openai/gpt-4o"` |
45+
| `**kwargs` | Additional arguments passed to OpenAI LLM | Any additional parameters supported by the underlying OpenAI LLM implementation |
46+
47+
## Dependencies
48+
49+
- vision-agents
50+
- vision-agents-plugins-openai

0 commit comments

Comments
 (0)