Skip to content

Refresh AG-UI install and agent surface docs#765

Merged
blove merged 1 commit into
mainfrom
codex/threadplane-ag-ui-docs-audit
Jul 7, 2026
Merged

Refresh AG-UI install and agent surface docs#765
blove merged 1 commit into
mainfrom
codex/threadplane-ag-ui-docs-audit

Conversation

@blove

@blove blove commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add the required marked install peer to AG-UI docs, docs landing, README, and /llms.txt snippets
  • document the current AgUiAgent surface: customEvents, browser clientTools, and ACTIVITY-backed subagents
  • update stale generated API examples from responses to tokens and add a toAgent source example

Verification

  • npm run generate-api-docs
  • npx nx run-many -t lint,test,type-tests,build -p ag-ui
  • npx nx run-many -t lint,build -p website
  • npx nx build website
  • npx nx e2e website --skip-nx-cache
  • git diff --check

@vercel

vercel Bot commented Jul 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
threadplane Ready Ready Preview, Comment Jul 7, 2026 1:16am

Request Review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated approval: this PR received an intelligent (AI) code review. See the review comments on this PR.

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Claude finished @blove's task in 1m 19s —— View job


PR Review

  • Read CLAUDE.md and repo conventions
  • Diff the PR changes
  • Review source files (MDX docs, TypeScript)
  • Post findings

Overall: The PR is a clean docs-and-types tidy-up. The marked peer addition, responses → tokens rename, and new subagents/clientTools surface docs are all accurate and match the source. One type inconsistency in the new table rows in to-agent.mdx (inline comments posted).

One bug found

to-agent.mdx — Signal type vs. call-return type mismatch (lines 31 and 33)

The new customEvents() and subagents() rows in the AgUiAgent table show Signal<CustomStreamEvent[]> and Signal<Map<string, Subagent>> as the Type — but the () call notation in the Field column means those are values returned by calling the signal, not the signal itself. The correct types are CustomStreamEvent[] and Map<string, Subagent> respectively.

inject-agent.mdx documents the same signals correctly (it shows the unwrapped value types). The two pages are inconsistent with each other as written.

Inline suggestions attached to both rows.

Everything else looks good

  • marked peer added consistently across installation, quickstart, README, docs landing, and llms.txt — no drift.
  • tokens rename in provideFakeAgent docstring matches the actual FakeAgentConfig.tokens field (verified in source).
  • toAgent JSDoc example is valid TS and matches the function signature.
  • Architecture doc additions for customEvents, subagents, and clientTools are accurate against the reducer and client-tools implementation.
  • api-docs.json updates match the source-level changes.


| Field | Type | Description |
|-------|------|-------------|
| `customEvents()` | `Signal<CustomStreamEvent[]>` | Custom events accumulated during a run. Resets at the start of each new run. |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Type column is inconsistent with the call-notation () used in the Field column, and with how the same signals are documented in inject-agent.mdx.

customEvents() means you're calling the signal, so the value returned is CustomStreamEvent[], not Signal<CustomStreamEvent[]>. The same applies to subagents() on line 33.

inject-agent.mdx gets this right — it shows CustomStreamEvent[] and Map<string, Subagent> as the return types.

Suggested change
| `customEvents()` | `Signal<CustomStreamEvent[]>` | Custom events accumulated during a run. Resets at the start of each new run. |
| `customEvents()` | `CustomStreamEvent[]` | Custom events accumulated during a run. Resets at the start of each new run. |

|-------|------|-------------|
| `customEvents()` | `Signal<CustomStreamEvent[]>` | Custom events accumulated during a run. Resets at the start of each new run. |
| `clientTools` | `ClientToolsCapability` | Browser client-tool catalog, pending calls, and result resolution. The chat composition uses this when you pass `<chat [clientTools]>`. |
| `subagents()` | `Signal<Map<string, Subagent>>` | `ACTIVITY_*` events with `activityType: 'subagent'`, projected to the neutral subagent contract and keyed by `messageId`. |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same issue: subagents() calls the signal, so the return type is Map<string, Subagent>, not Signal<Map<string, Subagent>>.

Suggested change
| `subagents()` | `Signal<Map<string, Subagent>>` | `ACTIVITY_*` events with `activityType: 'subagent'`, projected to the neutral subagent contract and keyed by `messageId`. |
| `subagents()` | `Map<string, Subagent>` | `ACTIVITY_*` events with `activityType: 'subagent'`, projected to the neutral subagent contract and keyed by `messageId`. |

@blove blove merged commit 7472553 into main Jul 7, 2026
38 checks passed
@blove blove deleted the codex/threadplane-ag-ui-docs-audit branch July 7, 2026 01:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant