-
Notifications
You must be signed in to change notification settings - Fork 957
feat(a2a): add missing ag-ui bridge features #763
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
0xTomDaniel
wants to merge
36
commits into
ag-ui-protocol:main
Choose a base branch
from
EmberAGI:feat/improve-a2a-support
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
feat(a2a): add missing ag-ui bridge features #763
0xTomDaniel
wants to merge
36
commits into
ag-ui-protocol:main
from
EmberAGI:feat/improve-a2a-support
+9,575
−348
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add troubleshooting scratchpad for feat/improve-a2a-support.\nProvide template sections for attempts, evidence, and resolution notes.
Split A2A and AG-UI design decisions into ADR 0001-0011 for this branch.\nAdd branch ADL listing ADR entries and statuses.
Adopt Engram naming for the config/control extension and URI. Refresh related ADRs to route config deltas through Engram and clarify artifact projection defaults vs config mutations.
Document that Engram is input-only and agents return config views through artifacts alongside other task and domain projections.
Clarify ADR expectations around one-shot send baseline and optional Engram\nusage while keeping message-only projection as a safe fallback.
Capture findings comparing ADRs 0001-0011 to the current A2A\nTypeScript bridge, noting missing run/task subscriptions, Engram config\nlane handling, and artifact projection support.
Document requirements for aligning AG-UI A2A bridge with ADRs, including run modes, Engram handling, artifact projections, and pending decisions.
- add configurable A2A run options including send/stream modes, context/task ids, subscribe-only, and artifact path controls\n- attach Engram extension/payloads and optionally forward system/developer messages\n- project status and artifact updates into shared state with tracker utilities\n- expand agent and utils tests with stricter typing and new projection coverage
Capture new focus on ADR-aligned run options, engram lane, and projection work plus note workspace lint gap\nLog attempted implementation steps and current test/build status for the a2a bridge
Add cases for blocking send metadata and resubscribe snapshots.\nCover artifact routing and status streaming to guard A2A conversions.
exercise stream and send flows with A2AClient to assert text, status, artifact projections and Engram headers in shared state using mock fetch responses. add local e2e server harness to validate streaming/resubscribe path end to end and ensure artifacts and assistant replies emit.
verify subscribeOnly resubscribe streams replay snapshots while continuing state updates without reopening the run
ensure text-only streaming agents emit text events without shared-state deltas and preserve empty state
exercise engram metadata propagation plus snapshot and streaming projections across artifact, surface, and legacy text events
- add ADR 0012 for HITL input_required handling with Activity/State - extend PRD with HITL interrupt/resume flow and Activity/State coverage - refresh scratchpad timestamp and attempts with new HITL scope
- make /view/tasks/<taskId> the canonical task map and track pending interrupts under /view/pendingInterrupts\n- clarify interruptId minting, resume handling, and ACTIVITY/STATE projection details\n- record follow-up TODOs for aggregate relocation, artifact/status projection, and Engram lane
- set ADR 0001-0012 to accepted and sync ADL summary - mark PRD accepted with completed success criteria and HITL projection notes - refresh scratchpad with completed remediation, test/build status, and lint deferral context
- attach HITL resume payloads to outbound messages - forward history/context/engram metadata and keep thread/run IDs out - track input-required status via activity/state and pending interrupts - emit snapshots/deltas and run-finished events for HITL interrupts - stop streaming after interrupts and broaden A2A metadata/HITL/state tests
- verify subscribers receive run events and stop after unsubscribe - cover multi-subscriber delivery during runs - ensure removing one subscriber leaves other listeners active
Gate X-A2A-Extensions to requests that include Engram metadata or extensions so conversational traffic stays on the default lane. Extend A2A coverage for HITL resume, resubscribe, lane defaults, and conversion mapping to enforce pending interrupt/state expectations.
Clarify ADR and PRD for input-required request/response handling. Add issue/PR drafts for config lane, shared state, interrupts.
Stop sending transcript history in A2A payloads to rely on task storage. Rename HITL flow to input request/response and adjust interrupt IDs. Update A2A tests for new activity type and resume semantics.
- add ADR 0013 detailing stateless A2A bridge and context binding\n- remove outdated issue/pr drafts and refresh scratchpad focus
- add package-level eslint config plus lint/format scripts\n- include jest ci/watch helpers and duplicate check-types alias\n- add eslint/typescript-eslint and globals dependencies to lockfile
- add deferThreadId option and one-time resolver to AbstractAgent\n- avoid pre-generating threadId when deferred and clone flags\n- cover deferred binding and run ordering in client agent tests
- generate a threadId when not provided during regenerate stream\n- keep prior behavior when caller supplies explicit threadId
- late-bind context/thread ids from server events and avoid local ids\n- seed shared-state tracker from task snapshots with deterministic interrupts\n- update agent utils and tests for snapshot-first streams and subscribe-only
- add ADR 0014-0020 for engram RPC surface, streaming, activation - mark ADR 0005 superseded and update ADR 0010 for RPC config lane - refresh ADL index and PRD to align with engram client scope - drop stale feat-improve-a2a-support scratchpad replaced by ADRs
- document engram payload contracts, test plan, and guardrails - add scratchpad entries for engram integration work
- introduce per-package eslint config with ts project awareness - add eslint 9, globals, and typescript-eslint dev deps to sdk packages
- gate Engram modes behind constructor flag and extension header checks - add Engram RPC helpers, stream merge, and JSON Patch handling via fast-json-patch - cover hydrate/sync/resume/guardrail flows in new integration and e2e tests
- seed engram subscriptions from task artifacts instead of resubscribe shim\n- filter stream events by sequence to avoid duplicate deliveries on resume\n- update local e2e server to publish snapshot/delta artifacts and event bus outputs
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Draft Pull Request: feat(a2a): add missing ag-ui bridge features
Summary
Add the missing AG-UI coverage in the A2A bridge: run options with task-aware reconnects, config/control lane handling for AG-UI shared-state updates, shared-state/activity projection, and input-required interrupt/resume flows, while keeping existing text-only agent behavior intact.
Changes
subscribe-onlyto reconnect without sending a new message (fetch snapshot, then resubscribe, optionalhistoryLength).resumeto send input responses to the existing task without reopening the prior run.input-required, we surface a pending interrupt activity/state plus RUN_FINISHED outcomeinterrupt; when an input response (a2a.input.response) arrives, we remove the pending interrupt entry and patch the activity with provided values.getTasksnapshot (with optional historyLength) beforeresubscribeTaskso reconnects start from a consistent latest state without replaying full history.mode=stream,includeToolMessages=true,includeSystemMessages=false,includeDeveloperMessages=false,acceptedOutputModes=["text"],artifactBasePath="/view/artifacts",contextIdresolved thread→task→generated;subscribeOnlyauto-enables whenmode=stream+taskIdis provided.sendonly when streaming with a payload;subscribeOnlyhas no fallback path.taskId; optionalhistoryLengthlimits snapshot depth; snapshot is emitted before live deltas.STATE_SNAPSHOT, then JSON PatchSTATE_DELTA; containers auto-created;appendcontrols concat/push/wrap,lastChunkcloses artifact streaming.pathoverrides default; otherwise useartifactBasePath/artifactId.input-<taskId>-N); pending entries under/view/pendingInterrupts; events for non-targettaskIdare ignored when a task-scoped subscription is active.Architectural alignment
message.send/message.stream—streamcreates/streams a task,sendblocks/short-runs, existingtaskIdsupports injections or secondary subscriptions; maintains backwards-compatible one-shot send while adding streaming.agent_state_updatedirectly on A2A server/agent state, may emit derived system/context cues, and outputs still return via Tasks/Artifacts (Engram is input-only for config mutation).input_required+a2a.input.requestdata parts; resume viaa2a.input.response; bridge emits ACTIVITY_SNAPSHOT + STATE_SNAPSHOT/DELTA and RUN_FINISHEDoutcome: "interrupt"with monotonicinterruptId; resume opens a new Run, sends the response to the same task, clears pending interrupts, and continues streaming.Testing
pnpm --filter @ag-ui/a2a test(A2A agent/util e2e + integration Jest suites)pnpm --filter @ag-ui/client test(client agent/subscriber Jest suites)pnpm buildRelated Issues
Closes #762