Architecture
Describes commit 2641779Updated Made by openai/gpt-6-luna
Diagrams
How does a streaming chat request move through an application?
flowchart LR; ui["Application UI"]; client["Headless or framework client"]; endpoint["Server endpoint"]; core["AI core"]; adapter["Provider adapter"]; model["Model provider"]; ui -->|"messages and user input"| client; client -->|"chat request"| endpoint; endpoint -->|"chat activity"| core; core -->|"provider operation"| adapter; adapter -->|"provider request"| model; model -->|"generated stream"| adapter; adapter -->|"normalized stream"| core; core -->|"server-sent events response"| client; client -->|"streamed updates"| ui;The README's chat example constructs a chat stream on the server with the core chat API and a provider adapter, then returns it as server-sent events. A headless client and framework bindings provide the application-facing side.
What are the main package families?
flowchart TD; app["Application"]; bindings["Framework bindings"]; client["Headless client"]; core["AI core activities"]; providers["Provider adapters"]; extensions["Capabilities and integrations"]; app -->|"UI integration"| bindings; bindings -->|"client APIs"| client; app -->|"server-side AI calls"| core; core -->|"shared adapter contract"| providers; app -->|"optional features"| extensions;The repository separates the shared core from provider-specific adapters and framework-facing clients. Other packages add optional capabilities and integrations. The diagram is a conceptual grouping rather than a complete package dependency graph.
How can Code Mode execute agent-written code?
flowchart LR; agent["AI agent"]; tool["Code Mode tool"]; driver["Isolate driver"]; runtime["Isolated runtime"]; bindings["Tool bindings"]; agent -->|"TypeScript program"| tool; tool -->|"execution request"| driver; driver -->|"code"| runtime; runtime -->|"tool calls"| bindings; bindings -->|"results"| runtime; runtime -->|"execution result"| tool; tool -->|"result"| agent;The README describes Code Mode agents writing and executing TypeScript in an isolated sandbox to orchestrate tools. The Code Mode entry exports isolate-driver interfaces and tool-binding utilities; separate packages provide isolate and sandbox integrations.