agentleFS
GetStreamGetStream/Agents/AGENTS.md

Agents

AGENTS.md8.2k starsChanged 56 days agoApache-2.0View on GitHub

When running an agent using @acceleration/ or an example using @acceleration/ refer to the skill acceleration/development_skills/dashboard_skill.md to setup the dashboard and launch the example. Make sure you restart any routers or binaries to avoid running old builds. Work happens on the main branch here, and the agents docs live in getstream.io's content/docs (see the docs skill). When you need to make an SDK change start by only changing Go Leave a note in the sdk skill at the bottom that…

  • Reads credentials
  • Installs packages

Trending

More talk lately.thin dataabout the whole repository

Jan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 0 mentionsAug 2026: 0 mentionsSep 2026: 0 mentionsOct 2026: 0 mentionsNov 2026: 8 mentionsDec 2026: 0 mentions
Jan 2026Jul 2026Dec 2026
Mentions a month of the GetStream/Agents repository that our weekly crawl found: only 8 in all, so this is a hint, not a trend. There is no adoption data for this file yet.

Who's talking about GetStream/Agents

The biggest 5 of 8 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 8

Talked about on GitHub (8 times).

On GitHub · 8

3 more on GitHub

The file

Show its rules and text

We split this AGENTS.md into the rules it gives an agent

38 rules. About 0 are common, 24 are distinctive, and 14 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈24

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 14

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    When running an agent using @acceleration/ or an example using @acceleration/ refer to the skill …

    line 3
  2. Distinctive:

    When you need to make an SDK change start by only changing Go Leave a note in the sdk skill at the bottom that other SDKs also need to …

    line 27
  3. Distinctive:

    Leave a note in the sdk skill at the bottom that other SDKs also need to udpate.

    line 28
  4. Very specific:

    Run the router in Docker, with the Volt dashboard's override (see the dashboard skill):

    line 36
  5. Very specific:

    After changing an operation, run go run ./cmd/openapi in acceleration/, then regenerate the clients (see acceleration/README.md).

    line 99
  6. Distinctive:

    Run the same code, prompts and config in and out of a benchmark.

    line 137
  7. Distinctive:

    Keep expected answers and tool calls, future caller turns, judge criteria and hidden world state out of runtime code and prompts.

    line 140
  8. Distinctive:

    No fixes rehearsed for known cases: hardcoded phrases, entities, tool arguments, pauses or thresholds.

    line 142
  9. Distinctive:

    Don't weaken assertions, tolerances, timeouts, workloads or judge prompts, drop hard cases, hide failed runs, call a candidate's failure …

    line 148
  10. Very specific:

    Before you write Go, read the go skill (.claude/skills/go/SKILL.md): errors, logging, spans and comments.

    line 189
  11. Very specific:

    Before you run more than one coding agent at once (parallel PRs, reviewers, fixers), read the parallel-agents skill …

    line 191
  12. Very specific:

    Keep unit-tests for the class under the same test class.

    line 199
  13. Distinctive:

    ALWAYS test behavior, not calling a path.

    line 200
  14. Distinctive:

    Use pytest.fixture for test setup, not helper methods

    line 201
  15. Distinctive:

    NEVER observe method calls in tests.

    line 202
  16. Distinctive:

    Every new test catches a defect you can name.

    line 203
  17. Distinctive:

    Don't assert what the test set up itself, compute the expected value with the code's own algorithm, or regenerate goldens from it unchecked.

    line 206
  18. Distinctive:

    Test a fix for one transcript with varied phrasing, not just its literal words.

    line 208
  19. Distinctive:

    Never weaken or delete a meaningful test to get green.

    line 209
  20. Distinctive:

    Wait for async state with a deadline, not a sleep.

    line 210
  21. Very specific:

    Prefer specific exceptions if they are known.

    line 215
  22. Very specific:

    Avoid getattr, hasattr, delattr, setattr.

    line 216
  23. Very specific:

    Do not use section comments like # -- some section --

    line 218
  24. Very specific:

    Prefer logger.exception() when logging an error with a traceback instead of logger.error("Error: {exc}")

    line 219
  25. Distinctive:

    Do not use local imports, import at the top of the module

    line 220
  26. Very specific:

    Avoid using Any type.

    line 222
  27. Distinctive:

    When adding code to an existing file, follow the patterns already established in that file (e.g.

    line 223
  28. Very specific:

    Never import from private modules (_foo) outside of the package's own __init__.py.

    line 230
  29. Very specific:

    use them everywhere. Modern syntax: X | Y unions, dict[str, T] generics, full Callable signatures, Optional for nullable params.

    line 239
  30. Very specific:

    Use asyncio.Lock, asyncio.Task, asyncio.gather for concurrency.

    line 255
  31. Distinctive:

    Don't add error handling, logging, validation, comments, abstractions, config options, or "future-proofing" I didn't ask for.

    line 265
  32. Distinctive:

    Remove debug output, dead code and abandoned experiments before delivery.

    line 272
  33. Distinctive:

    Never invent results or say a check passed that you did not run.

    line 273
  34. Distinctive:

    Do not remove valid comments when editing/refactoring code.

    line 275
  35. Distinctive:

    When making multiple related changes to the same file, combine them into fewer Edit calls with enough surrounding context, rather than one …

    line 284
  36. Distinctive:

    Run tests with Bash directly.

    line 285
  37. Distinctive:

    Only use TodoWrite for tasks with 5+ steps.

    line 286
  38. Distinctive:

    Only include user-facing changes (public API breaks, features, fixes).

    line 292

≈ “Common” is an estimate: at least 1 in 5 of the 45,344 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

AGENTS.md

When running an agent using @acceleration/ or an example using @acceleration/ refer to the skill acceleration/development_skills/dashboard_skill.md to setup the dashboard and launch the example. Make sure you restart any routers or binaries to avoid running old builds.

Work happens on the main branch here, and the agents docs live in getstream.io's content/docs (see the docs skill).

What is here

PathWhat it is
acceleration/Go model router: STT, TTS, LLM and search behind one API, plus the agent that joins a call. cmd/router serves it
dashboard/Next.js app for watching calls and editing agent configs. Talks to the router from the browser
sdks/python/The Python SDK: Agent, Runner, the plugin contracts
sdks/js/The JavaScript SDK, one package for Node and the browser: every endpoint typed from the spec, sessions, tools, agent dispatch
plugins/44 Python packages, one per provider. plugins/stream is the client for acceleration/
sdks/swift/One iOS package, core: state and API, the chat channel, and voice over Stream Video. Its views are Stream Chat's AI components (StreamChatAI)
examples/voice_agents/Runnable agents. simple_voice_ai is the smallest one
tui/Go terminal UI for a conversation with an agent: the terminal counterpart of dashboard/
sdks/kotlin/Client-side SDK for Android: one module, core; its views are Stream Chat's AI components
sdks/dart/Client-side SDK for Flutter: one package, stream_agents, with core, chat and rtc kept apart inside it; its views are Stream Chat's AI components (stream_chat_flutter_ai)
sdks/dotnet/, sdks/ruby/, sdks/rust/, sdks/php/Server-side SDKs: agents, dispatch, folder sync and the router. Built and tested in Docker; each has an sdk-<lang> skill
sdks/go/The Go SDK, released from main as sdks/go/vX.Y.Z. go.work ties the Go modules together. See the sdk-go skill
performance_benchmark/Load benchmark: ramps real WebRTC callers against the router's mock models until it breaks

SDK changes

When you need to make an SDK change start by only changing Go Leave a note in the sdk skill at the bottom that other SDKs also need to udpate. We run this periodically, you don't need to change all SDKs at once. Go goes first, and later on we update the others.

Local dev

Everything reads the repo-root .env for provider credentials.

Run the router in Docker, with the Volt dashboard's override (see the dashboard skill):

docker compose -f compose.yaml -f ../volt-dashboard/docs/local-agents/compose.volt.yaml up -d --build router

That serves the router on :8080, with Postgres on :55432 and Redis on :56379, its data in the vision-agents_pgdata volume. Rerun it after router changes so you never test an old build. Those two ports are also what the standalone va-pg and va-redis containers use, so stop those first if they are running.

.env must set ROUTER_DEV_KEK (single-quoted: compose expands a $ in it) and ROUTER_PUBLIC_URL=http://localhost:8080. Without the KEK no connector client secret can be saved, and changing it leaves the stored ones unreadable. The router refuses the old ROUTER_AUTH_KEK: rename it to ROUTER_DEV_KEK and keep its value.

Logs: docker compose logs -f router.

An agent, once the router is up:

cd examples/voice_agents/simple_voice_ai
uv sync && uv run simple_voice_ai.py

It stores the agent's directory on the router, then opens a demo call in the browser; talk into it.

The client generators (plugins/stream/generate.py, sdks/swift/generate.py) are standalone uv scripts with inline metadata: uv run <script> does not resolve the workspace.

Python commands all use uv. Never python -m. If you hit dependency issues, stop and ask.

uv run --no-sync dev.py check              # ruff + mypy + unit tests
uv run --no-sync pytest -m "not integration"
uv run --no-sync pytest -m "integration"   # needs .env secrets
uv run --no-sync ruff check .
uv run --no-sync ruff format .
uv run --no-sync mypy

--no-sync avoids a uv panic in sandboxed environments.

HTTP API

The router serves its API with chi and Huma. The Go structs are the source of truth: acceleration/api/openapi.yaml is rendered from them and is never edited by hand.

  • Declare an operation with huma.Register in the file for its resource, with its request and response bodies as Go structs beside it. internal/api/policies.go is the example to copy.
  • Describe fields with doc: tags and constrain them with minimum:, enum:, readOnly: and the rest, so what validates a request is also what documents it. A type's own description goes in a TransformSchema method, and a named string enum in a Schema method using namedEnum.
  • Fail with an APIError (internal/api/apierror.go): invalidRequest(...), notFound(...) and their siblings, whose type decides the status. A failure answered from several places is an APIError value of its own, named errX (errUnknownConfig, errNoSessions, built with notConfigured(...) for a feature the deployment lacks), returned as is: one code, one status, everywhere. Every failure is the {"error": {"message", "type", "code", "doc_url"}} envelope; any other error an operation returns is a 500 saying only "something went wrong", logged with its stack. A request that fails validation is a 400 validation_failed.
  • An operation is server-side only unless it sets Extensions: {"x-client-accessible": true}.
  • List endpoints page by cursor. Read the pagination skill (.claude/skills/pagination/SKILL.md) before adding one or a limit parameter.
  • After changing an operation, run go run ./cmd/openapi in acceleration/, then regenerate the clients (see acceleration/README.md). A test fails if the committed openapi.yaml is out of date.
  • A query parameter a request may leave out is an optionalParam[T]; ptr() is nil when it was left out. Huma takes no pointer for one.
  • A route served by hand (a socket, a stream) is still declared, in internal/api/handwritten.go, so readers and client generators see it and the server-side check reads its marks.

There is no hand-written spec any more: every operation, socket included, is declared in Go.

The JavaScript SDK is its own npm package, checked with node 22 and no runtime dependencies:

cd sdks/js
npm install
npm run types   # regenerate src/generated/api.ts from the spec; --check in CI
npm test        # typecheck, then the suite against a real http and ws server

Benchmark

Voicebench lives in its own repository, GetStream/voice-ai-bench: it builds the router from a commit of this one and runs its scenarios against it.

To find how many cascaded voice agents one router holds at once, or to measure a performance change, read the performance_benchmark skill (.claude/skills/performance_benchmark/SKILL.md): the ramp in performance_benchmark/ talks to real agents over WebRTC with the router's mock/* providers, so it bills nothing and measures only the router.

To make the router hold more agents for less, read the loop_performance_bench skill (.claude/skills/loop_performance_bench/SKILL.md): ten rounds of profiling, cutting API, SQL and Redis round trips, deploying to the benchmark cluster and recording agents held and $/voice-minute.

Benchmark rules

A win must be one a real user gets. For Voicebench, the load benchmark and any measured claim:

  • Run the same code, prompts and config in and out of a benchmark. Never branch on scenario names, fixture IDs, call metadata, known transcripts, seeds, eval flags or the runner's environment.
  • Keep expected answers and tool calls, future caller turns, judge criteria and hidden world state out of runtime code and prompts. The agent learns facts the way it would on a real call.
  • No fixes rehearsed for known cases: hardcoded phrases, entities, tool arguments, pauses or thresholds. A rule needs a reason that holds outside the benchmark.
  • Fixtures, seeds, cached caller audio and mock/* providers are fine in test setup. Shared code must not exploit them, such as the mocks' fixed text, tone or timing.
  • Skip no required work (auth, validation, persistence, accounting, cancellation, cleanup). A filler is not an answer, and dropped or queued work is not a latency win.
  • Don't weaken assertions, tolerances, timeouts, workloads or judge prompts, drop hard cases, hide failed runs, call a candidate's failure infra noise, or retry until green. Fix a real evaluator bug in its own change and rerun both sides.
  • Compare like with like: same task information, models, tools, resources, caches, warmup and retries, or say what differs.
  • Fix the metric, workload and failure handling before comparing. Validate on cases you did not tune on; a case you tuned against is no longer held out. A microbenchmark win alone is not an end-to-end win.
  • Report base and candidate commits, commands, runs, variance, failures and regressions, with raw results (no secrets or caller data). Say when a result is inconclusive.

Connectors

To give an agent a provider's tools (GitHub, Linear, the Slack bot), read the connectors skill (.claude/skills/connectors/SKILL.md). To add a provider to the catalog, read add-connector. Plugins were removed: a config naming plugins, plugin_events or mcp_servers is refused.

To set up, test or debug an SMS line on a Telnyx number, staging's permanent line included, read the telnyx skill (.claude/skills/telnyx/SKILL.md).

Generative UI

To change how an agent answers with a card (the ui: key in agent.yaml, the router's UI splitter, the ui_delta/ui_completed frames, custom.ai_ui, LiveUI), or to find why a card is missing or jumps, read the generative-ui skill (.claude/skills/generative-ui/SKILL.md).

Scheduled tasks

To give an agent reminders and later work for its users, schedule one, or find why one never arrived, read the scheduled-tasks skill (.claude/skills/scheduled-tasks/SKILL.md).

Security

For a security review of the router's API or of the clusters it runs on, read the security skill (.claude/skills/security/SKILL.md).

Testing

For Go tests, read the go-testing skill (.claude/skills/go-testing/SKILL.md) first: testify suites, the shared RouterSuite for integration tests, and how to wait for async writes. Before you write Go, read the go skill (.claude/skills/go/SKILL.md): errors, logging, spans and comments.

Before you run more than one coding agent at once (parallel PRs, reviewers, fixers), read the parallel-agents skill (.claude/skills/parallel-agents/SKILL.md): test databases, migration slots, merge order and how not to burn tokens.

  • Framework: pytest. Never mock.
  • @pytest.mark.asyncio is not needed (asyncio_mode = auto).
  • Integration tests use @pytest.mark.integration.
  • NEVER adjust sys.path.
  • Keep unit-tests for the class under the same test class. Do not spread them around different test classes. For example, tests for Agent must be inside TestAgent, etc.
  • ALWAYS test behavior, not calling a path.
  • Use pytest.fixture for test setup, not helper methods
  • NEVER observe method calls in tests; assert on outputs and state.
  • Every new test catches a defect you can name. If a plausible broken implementation still passes, fix the test or drop it. "No crash", non-empty or a 200 rarely qualifies.
  • A regression test fails before the fix; if you could not check that, say why.
  • Don't assert what the test set up itself, compute the expected value with the code's own algorithm, or regenerate goldens from it unchecked.
  • Test a fix for one transcript with varied phrasing, not just its literal words.
  • Never weaken or delete a meaningful test to get green.
  • Wait for async state with a deadline, not a sleep.

Python rules

  • Never use from __future__ import annotations.
  • Prefer specific exceptions if they are known. If the exception type is not clear, it is ok to use except Exception as e.
  • Avoid getattr, hasattr, delattr, setattr; prefer normal attribute access.
  • Docstrings: Google style, keep them short.
  • Do not use section comments like # -- some section --
  • Prefer logger.exception() when logging an error with a traceback instead of logger.error("Error: {exc}")
  • Do not use local imports, import at the top of the module
  • Avoid # type: ignore comments.
  • Avoid using Any type.
  • When adding code to an existing file, follow the patterns already established in that file (e.g. error handling style, import guards, naming).

Code style

Imports:

  • ordered as: stdlib, third-party, local package, relative. Use TYPE_CHECKING guard for imports only needed by type annotations.
  • Never import from private modules (_foo) outside of the package's own __init__.py. Use the public re-export (e.g. from vision_agents.testing import TestResponse, not from vision_agents.testing._run_result import TestResponse).

Naming:

  • private attributes and methods use a leading underscore (_sessions, _warmup_agent). Public API is plain snake_case.

Type annotations:

  • use them everywhere. Modern syntax: X | Y unions, dict[str, T] generics, full Callable signatures, Optional for nullable params.

Logging:

module-level logger = logging.getLogger(__name__). Use debug for lifecycle, info for notable events, error for failures without a traceback, exception for errors with traceback.

  • In hot paths (audio processing, event handling), guard debug logging behind if logger.isEnabledFor(logging.DEBUG): to avoid formatting overhead when debug is disabled.

Constructor validation:

  • raise ValueError with a descriptive message for invalid args. Prefer custom domain exceptions over generic ones.

Async patterns:

  • async-first lifecycle methods (start/stop). Support __aenter__/__aexit__ for context manager usage.
  • Use asyncio.Lock, asyncio.Task, asyncio.gather for concurrency.
  • Clean up resources in finally blocks.

Method order:

  • __init__, public lifecycle methods, properties, public feature methods, private helpers, dunder methods.

Other

  • Smallest possible diff. Prefer deleting code over adding it.
  • Don't add error handling, logging, validation, comments, abstractions, config options, or "future-proofing" I didn't ask for.
  • Match the style and abstraction level of surrounding code. Don't introduce new patterns or helpers unless asked.
  • Fix root causes, not symptoms. No try/except, silent defaults, fake success or sleeps to hide bugs.
  • Reuse the code that already owns a behavior; no parallel implementations.
  • Background work, queues, retries and caches need an owner, a bound and a shutdown. Caches need invalidation and tenant isolation.
  • Remove debug output, dead code and abandoned experiments before delivery.
  • Never invent results or say a check passed that you did not run.
  • Change only what I asked for. Don't refactor adjacent code — ask first.
  • Do not remove valid comments when editing/refactoring code.

Plugins

  • In every plugins/*/pyproject.toml, the wheel target must be packages = ["vision_agents"]. Listing "." pulls tests/, README.md, example/, etc. into the published wheel.
  • Each plugin must keep readme = "README.md" in [project] and a README.md next to its pyproject.toml so PyPI renders a description page.

Token efficiency

  • When making multiple related changes to the same file, combine them into fewer Edit calls with enough surrounding context, rather than one edit per change.
  • Run tests with Bash directly. Only use subagents for test runs when you need to do other work in parallel.
  • Only use TodoWrite for tasks with 5+ steps. Don't update it after every individual edit.

Changelog

  • Lives in CHANGELOG.md at the repo root.
  • Organised by version heading (# v0.4.0), then sections: Breaking Changes, New Features, Bug Fixes.
  • Only include user-facing changes (public API breaks, features, fixes). Skip docs-only and CI-only commits.
  • Reference PR numbers inline, e.g. (#374).
  • To generate: git log <last-tag>..HEAD --oneline --no-merges, then classify each commit.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.