Skip to content

[FEATURE]: Make the agent event schema the default path #626

Description

@jakedipity

Summary

Once every producer emits the schema, make it the only path a run's events take. Producers currently emit it alongside the brokers it duplicates, so nothing yet depends on it.

The coupling this removes is visible in the standalone CLI: with no HTTP involved it still builds server state in process, calls the web-server handlers, and re-parses the resulting SSE bytes, because there is no way to consume an agent without serializing to SSE first. Making a run's events readable from its handle is what lets a consumer stop doing that.

Consumers reading the stream directly is also what makes the request-scoped brokers redundant, so retiring them and the identity they are keyed by belongs here rather than earlier.

The SSE handler keeps projecting onto its existing wire schema so behavior holds. Replacing that projection with a producer built on the event stream is #576, the A2A equivalent is #577, and the CLI moves off its in-process SSE round trip with them.

Goals

  • A run's events reaching its observer directly, rather than through process-global brokers.
  • The run's stream carrying response content as well, so an observer sees what an agent is saying and not only what it is doing. Clients read StreamItem for text and tool calls today, which is what keeps them on the old path.
  • The per-request registries retired, since a run's handle is what holds its channels once consumers read from it.
  • Run identity independent of HTTP, so a request id is no longer what a run is keyed by. The registries are what key on it, so they go together.
  • Cancellation reaching MCP through the run's handle rather than a separate process-global registry.

Searched Issues

  • No similar issues found

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

  1. jakedipity commented on Sep 28, 2026

    @jakedipity
    CollaboratorAuthor

    Implementation is nine commits on jakedipity/event-schema-default-path, stacked on #625 (PR #710). Not yet pushed.

    One goal landed narrower than written, deliberately. "Run identity independent of HTTP, so a request id is no longer what a run is keyed by" is half done. The keying is gone — the four request-keyed brokers and the RequestCancellation registry with them — so nothing looks a run up by request id any more. But the id a run carries is still the HTTP request id, minted as RunContext::channel_on(request_id, ...) in builder.rs, and orchestration's separate UUID run_id that park and HITL key on (run_owner_id = run:{run_id}) is untouched.

    Minting one run id is left to the 578 runtime work, whose first sub-issue treats "one run id or two" as a decision to take before it is filed. Doing it here would reach into park and HITL keying for no consumer that exists yet.

    Also worth recording: the tool-call queue moved onto the run, but orchestration tool correlation stays inert — a worker streams under a key of its own, and every worker shares one Arc<McpManager> with a single binding slot, so the hook and MCP can never agree on a key. #732 covers lifting that.

  2. 32 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

enhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions