Reference
Architecture
How the Gray crates fit together — the agent loop, provider streaming, the bash tool surface, plugins and session storage.
Source: Cargo.toml
| Crate | Responsibility |
|---|---|
| gray | REPL, TUI, onboarding, config, CLI, sessions, 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, manifest, gray.yml profile loader |
| 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.