Vision Agents by Stream

repository·main·Indexed 27 days ago

https://github.com/getstream/vision-agents

A framework for building low-latency, multi-modal AI agents capable of watching, listening, and understanding video in real-time. Designed for use cases like sports coaching and security monitoring, it supports join times of ~500ms and audio/video latency as low as 30ms. The framework is model-agnostic, integrating with OpenAI, Gemini, Claude, and YOLO, and provides plugins for services like AssemblyAI, AWS (Bedrock, Nova Sonic, Polly, Transcribe), and Anam avatars. It supports React, Android, iOS, Flutter, React Native, and Unity SDKs.

Tokens
68.6K
Snippets
241
Records
351
Agent score
93%

What's inside vision-agents

  1. Overview of Open Vision Agents by Stream

    main

    Open Vision Agents by Stream is a framework for building multi-modal AI agents capable of watching, listening, and understanding video in real-time. It is designed for low-latency applications, supporting join times of ~500ms and audio/video latency as low as 30ms.

    Key capabilities include:

    • Real-time Video AI: Integration with models like YOLO and Roboflow alongside Gemini/OpenAI realtime.
    • Model Agnostic: Uses native SDK methods from OpenAI (create response), Gemini (generate), and Claude (create message), ensuring compatibility with the latest model features.
    • Flexible Infrastructure: While optimized for Stream's edge network, it is designed to work with any video edge network.
    • Multi-platform SDKs: Support for React, Android, iOS, Flutter, React Native, and Unity.
  2. Overview of Vision Agents features

    main

    Vision Agents provide building blocks for low-latency, multi-modal AI video experiences. Key features include:

    • Real-time WebRTC: Stream video directly to model providers.
    • Video Processing: A pluggable pipeline for models like YOLO, Roboflow, or custom PyTorch/ONNX models.
    • Turn Detection: Natural conversation flow using VAD, diarization, and smart turn-taking.
    • Tool Calling & MCP: Execute code and APIs (e.g., Linear, weather, telephony) via MCP servers.
    • Phone Integration: Inbound/outbound voice calls via Twilio or Telnyx.
    • RAG: Retrieval-augmented generation with TurboPuffer, Qdrant, or Gemini FileSearch.
    • Memory: Context recall across turns and sessions via Stream Chat.
    • Text Back-channel: Silent messaging to the agent during calls (e.g., coaching overlays).
    • Production Ready: Supports HTTP servers, Prometheus metrics, horizontal scaling, and Kubernetes.
  3. Fast Whisper STT Plugin Features

    main

    The Fast Whisper STT plugin offers the following capabilities:

    • Fast Inference: Uses the faster-whisper CTranslate2-based implementation.
    • Model Sizes: Supports tiny, base, small, medium, large, large-v2, and large-v3.
    • Language Support: Supports automatic language detection or manual language specification.
    • Hardware Acceleration: Supports both CPU and GPU.
    • Quantization: Supports int8, float16, and float32 quantization.
  4. Configure Sarvam AI services

    main

    The Sarvam AI plugin provides three main capabilities:

    • STT (Speech-to-Text): WebSocket streaming speech-to-text (Saarika / Saaras) with Voice Activity Detection for turn events.
    • TTS (Text-to-Speech): WebSocket streaming text-to-speech (Bulbul) with configurable speaker, pace, and language.
    • LLM (Large Language Model): OpenAI-compatible chat completions (Sarvam-30B / Sarvam-105B / Sarvam-M) using the ChatCompletionsLLM interface.

    Authentication: All services require the SARVAM_API_KEY environment variable. The plugin sends this key via the api-subscription-key header.

  5. Quickstart: Run the Tencent TRTC agent via Docker

    main

    To quickly test the agent with a browser-based participant:

    1. Open the Tencent TRTC Web SDK quick demo.
    2. Enter your TENCENT_SDK_APP_ID and TENCENT_SDK_SECRET_KEY into the demo form to generate a UserSig.
    3. Click Enter Room and Start Local Video.
    4. Copy the RoomID(String) from the demo.
    5. Run the agent using Docker, passing the room ID:
    cd plugins/tencent
    TENCENT_TEST_ROOM_ID=<paste-room-id-here> docker compose run --rm tencent-agent
  6. Standardize Plugin README.md format

    main

    To maintain consistency, all plugin README.md files should follow this standardized format:

    1. # Plugin Name: The name of the plugin.
    2. ## Features: A bulleted list of main functionalities.
    3. ## Installation: Installation instructions using uv add (e.g., uv add vision-agents[PLUGIN-NAME]).
    4. ## Usage: A basic code snippet demonstrating how to initialize and use the plugin.
    5. ## Configuration: A table containing parameter names, descriptions, and accepted values/defaults.
    6. ## Dependencies: A bulleted list of required dependencies.
  7. Manage audio using PcmData

    main
    The SDK uses the PcmData type to pass audio between plugins and the agent. Audio is natively handled as signed 16-bit little-endian, PCM 48kHz stereo, but the transport layer handles WebRTC Opus conversion automatically. When working with plugins or the agent class, you should load raw bytes or similar data into PcmData immediately and use its methods to resample, mix channels, or change formats.