Reference

Architecture

How the Gray crates fit together — the agent loop, provider streaming, the bash tool surface, plugins and session storage.

Source: Cargo.toml

CrateResponsibility
grayREPL, TUI, onboarding, config, CLI, sessions, cron, gateway
gray-corethe agent loop, typed events, message model, compaction
gray-providerOpenAI-compatible SSE streaming, retries, prompt caching
gray-toolsbash plus profile-selectable read, write, edit, grep, find, ls
gray-pluginplugin trait, manifest, gray.yml profile loader
gray-pkgplugin package management
gray-markdownstreaming 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.