Skip to content
Diagrams

Diagrams

The diagrams are generated from typed JSON in the plan folder. Edit the JSON and recompile the SVG, and this page picks up the change on the next build.

hango packages after phase 20

The request path runs left to right: server, run worker, agent loop, then providers, tools and the virtual filesystem, with the scoped store in front of Postgres. internal/agent never imports internal/run. Telegram is a second entry beside the HTTP server, and claudecli is a second runtime beside the agent loop.

hango packages after phase 20

One turn of the agent loop

The loop loads history, repairs dangling tool calls, calls the model through the middleware chain, executes requested tools through the same chain, persists everything, and repeats until the model stops asking for tools.

One turn of the agent loop

A run from request to stream

The HTTP request only creates the run and returns 202. A worker claims the run with a conditional update, executes the loop, persists every event before publishing it, and the client watches over SSE.

A run from request to stream

Where telemetry goes

hango emits traces, metrics and logs through one OTLP egress. The collector strips prompt content and fans out to the Grafana LGTM container and Langfuse. Database rows carry the same trace id.

Where telemetry goes