A2UI icon indicating copy to clipboard operation
A2UI copied to clipboard

[Docs][Agent Guide] docs/public/guides/agent-development.md only covers v0.8/v0.9, references non-existent 'render'/'update' schema operations, and ends with an unfinished TODO

Open josemontespg opened this issue 1 month ago • 6 comments

Summary

docs/public/guides/agent-development.md is the main public guide for generating and streaming Direct JSON A2UI messages from LLMs (DirectJsonFormat), but it contains three major issues:

  1. It only mentions ProtocolVersion.V0_8 and ProtocolVersion.V0_9 (lines 132–135), omitting V1_0.
  2. Under ## Understanding the Output (lines 159–162), it states that A2UI_SCHEMA defines operations named render and update, which do not exist in any version of A2UI (v0.8, v0.9, or v1.0).
  3. It cuts off abruptly at line 182 with TODO: Continue this guide with examples of how to parse, validate, and send the output to the client renderer without the A2A extension. — omitting how DirectJsonFormat wraps output in <a2ui-json>...</a2ui-json> tags and how DirectJsonResponseStream / parseStream() progressively parses streamed LLM chunks.

Affected Component / Files

  • Repository commit: e9dbcc3 (main)
  • File path(s): docs/public/guides/agent-development.md (lines 132–182)

Steps to Reproduce / Evidence

Inspect docs/public/guides/agent-development.md lines 131–135 and 159–182:

# Initialize the inference format with the Basic Catalog
inference_format = DirectJsonFormat(
    [BasicCatalog(ProtocolVersion.V0_8)],  # Use ProtocolVersion.V0_9 for newer protocol
    examples_path="examples/0.8",
)

And lines 159–182:

The `A2UI_SCHEMA` that we imported is a standard JSON schema that defines valid operations like:

- `render` (displaying a UI)
- `update` (changing data in an existing UI)
...
TODO: Continue this guide with examples of how to parse, validate, and send the output to the client renderer without the A2A extension.

Expected Behavior

docs/public/guides/agent-development.md should:

  1. Use ProtocolVersion.V1_0 as the primary example.
  2. Accurately list the v1.0 agent_to_renderer.json operations (createSurface, updateComponents, updateDataModel, deleteSurface, callRendererFunction, agentFunctionResponse) instead of non-existent render and update operations.
  3. Replace the trailing TODO on line 182 with a complete example showing both:
    • Unstructured conversational streaming with <a2ui-json>...</a2ui-json> and DirectJsonFormat.openStream() / feed() / close().
    • Structured JSON output (responseMimeType: "application/json") using specification/v1_0/json/agent_to_renderer_list_wrapper.json ({ "messages": [...] }).

Actual Behavior

The guide lists non-existent render and update operations, omits v1.0, and ends with a TODO before explaining how to parse or stream Direct JSON output to a renderer.

Suggested Fix

Update docs/public/guides/agent-development.md lines 131–182 to use v1.0, list the real agent_to_renderer.json envelope keys, and provide a working DirectJsonFormat streaming parser example.

josemontespg avatar Oct 22 '26 20:10 josemontespg

Confirmed on main (P1). docs/public/guides/agent-development.md needs to be updated for v1.0 (ProtocolVersion.V1_0, createSurface/updateComponents/updateDataModel/deleteSurface operations instead of the non-existent render/update operations, and replacing the trailing TODO at line 182 with a complete DirectJsonFormat / DirectJsonResponseStream example).

josemontespg avatar Oct 23 '26 00:10 josemontespg

Hi @josemontespg @jacobsimionato, I'd like to work on updating docs/public/guides/agent-development.md to v1.0 following the steps outlined in the description. Could you please assign this issue to me?

r0nik123 avatar Oct 30 '26 18:10 r0nik123

From triage bot:

Triage suggestion:

For humans

Summary: The issue reports three defects in the agent development guide: its example uses protocol v0.9 instead of v1.0, it names render and update operations that do not exist, and it ends with a TODO. On 2026-10-30, r0nik123 asked to be assigned, and nobody has answered.

Why flagged for triage: The latest contribution is from an external contributor and has gone unanswered.

Suggestion: Answer r0nik123 and assign them. The issue has P2 and no assignee, no PR is open for it, and the remaining work is a docs change, which the team reviews from contributors. #3763 already fixed part of the issue: the guide now lists createSurface, updateComponents and updateDataModel (line 156) and shows how to parse the response with parse_response. Two parts are left: the example still passes ProtocolVersion.V0_9 (line 136), and the guide still ends with the TODO (line 175). #3874 is related but does not close this issue: it adds a section just above that TODO, so the two PRs may conflict. If the team would rather finish the guide itself, reply that instead and leave the issue unassigned.

  1. Add labels: type: bug
  2. Assign: r0nik123
  3. Related PRs: #3763, #3874

Reply:

Thanks for offering, r0nik123. I assigned the issue to you. #3763 already replaced the render and update operations and added a parse_response example, so two parts are left: switch the example to ProtocolVersion.V1_0, and replace the TODO at the end of the guide with an example of sending the parsed output to a client without the A2A extension. #3874 adds a section just above the TODO, so check it before you start.

To adjust and apply this suggestion, run in your a2ui checkout:

tools/internal/triage_new/triage_ui.sh https://github.com/a2ui-project/a2ui/issues/3519
For software
<a2ui>
root = TriageSuggestion(
  summary="""The issue reports three defects in the [agent development guide](https://github.com/a2ui-project/a2ui/blob/8bf644a37d680a227296b8c0849a7f4b328b8b73/docs/public/guides/agent-development.md): its example uses protocol v0.9 instead of v1.0, it names `render` and `update` operations that do not exist, and it ends with a TODO. On 2026-10-30, `r0nik123` asked to be assigned, and nobody has answered.""",
  reason="The latest contribution is from an external contributor and has gone unanswered.",
  suggestion="""Answer `r0nik123` and assign them. The issue has P2 and no assignee, no PR is open for it, and the remaining work is a docs change, which the team reviews from contributors. #3763 already fixed part of the issue: the guide now lists `createSurface`, `updateComponents` and `updateDataModel` ([line 156](https://github.com/a2ui-project/a2ui/blob/8bf644a37d680a227296b8c0849a7f4b328b8b73/docs/public/guides/agent-development.md?plain=1#L156)) and shows how to parse the response with `parse_response`. Two parts are left: the example still passes `ProtocolVersion.V0_9` ([line 136](https://github.com/a2ui-project/a2ui/blob/8bf644a37d680a227296b8c0849a7f4b328b8b73/docs/public/guides/agent-development.md?plain=1#L136)), and the guide still ends with the TODO ([line 175](https://github.com/a2ui-project/a2ui/blob/8bf644a37d680a227296b8c0849a7f4b328b8b73/docs/public/guides/agent-development.md?plain=1#L175)). #3874 is related but does not close this issue: it adds a section just above that TODO, so the two PRs may conflict. If the team would rather finish the guide itself, reply that instead and leave the issue unassigned.""",
  reply="""Thanks for offering, `r0nik123`. I assigned the issue to you. #3763 already replaced the `render` and `update` operations and added a `parse_response` example, so two parts are left: switch the example to `ProtocolVersion.V1_0`, and replace the TODO at the end of the guide with an example of sending the parsed output to a client without the A2A extension. #3874 adds a section just above the TODO, so check it before you start.""",
  added_labels=["type: bug"],
  new_assignees=["r0nik123"],
  related_prs=[3763, 3874]
)
</a2ui>

🤖 Agent-generated

polina-c avatar Nov 12 '26 04:11 polina-c

Requires team input. Note for the discussion:

It seems as gap in documentation. I am suggesting P1.

polina-c avatar Nov 12 '26 19:11 polina-c

@josemontespg , can this issue be closed or there is work remaining?

polina-c avatar Nov 13 '26 23:11 polina-c

All items in this issue have been resolved on main by #4014 (new guides/agent-integration.mdx guide targeting v1.0 with streaming, SSE transport, and DirectJsonFormatFactory), #4118 (/guides/agent-development redirect), #4199 (wrapped=False JSON-only output section by @r0nik123), and #4213 (removal of legacy docs/public/). Closing as completed!

josemontespg avatar Nov 14 '26 00:11 josemontespg