Docs/Reference
Architecture
How the Gray crates fit together — the agent loop, provider streaming, the bash tool surface, plugins and package management.
Source: Cargo.toml
| Crate | Responsibility |
|---|---|
| gray | REPL, TUI, onboarding, config, CLI, sessions, memory, cron, gateway |
| gray-core | the agent loop, typed events, message model, compaction |
| gray-provider | OpenAI-compatible SSE streaming, retries, prompt caching |
| gray-tools | bash plus profile-selectable read, write, edit, grep, find, ls |
| gray-plugin | plugin trait, sidecar transport, gray.yml profiles, capabilities, scanning |
| gray-pkg | plugin package management |
| gray-markdown | streaming markdown renderer for the TUI |
Everything is streaming-first: text deltas, tool calls and usage arrive as typed events, which is what lets the TUI render a turn as it happens rather than after it finishes, and what --json serializes for harnesses.
Join the Discord
Chat with the people building and running Gray. Show what you made with it.
Join Discord →