Skip to content

Commit 592419d

Browse files
bloveclaude
andcommitted
docs(api): regenerate api-docs for new chat exports (createAgentRef/AgentRef/ToolArgs/ViewProps/AnyFunctionToolDef) + adapter ref overloads
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 2b6b26e commit 592419d

4 files changed

Lines changed: 236 additions & 101 deletions

File tree

apps/website/content/docs/ag-ui/api/api-docs.json

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@
457457
},
458458
{
459459
"name": "state",
460-
"type": "Signal<Record<string, unknown>>",
460+
"type": "Signal<TState>",
461461
"description": "",
462462
"optional": false
463463
},
@@ -556,21 +556,27 @@
556556
{
557557
"name": "injectAgent",
558558
"kind": "function",
559-
"description": "Injects the AG-UI agent from Angular's dependency injection container.\nUse this in components or services provided via `provideAgent()` (or\n`provideFakeAgent()`).\n\nReturns an `AgUiAgent` — the runtime-neutral `Agent` contract plus the\nAG-UI-specific `customEvents` signal — so `customEvents` is reachable\ndirectly, without casting.",
560-
"signature": "injectAgent(): AgUiAgent",
559+
"description": "Injects the AG-UI agent from Angular's dependency injection container.\nUse this in components or services provided via `provideAgent()` (or\n`provideFakeAgent()`).\n\nReturns an `AgUiAgent` — the runtime-neutral `Agent` contract plus the\nAG-UI-specific `customEvents` signal — so `customEvents` is reachable\ndirectly, without casting.\n\n**Typed state via AgentRef.** Pass the same ref that was supplied to\n`provideAgent(ref, …)` to carry the state type through DI without repeating\nthe generic at every call site:\n\n```ts\nconst agent = injectAgent(TRIP); // AgUiAgent<TripState>\n```\n\nThe no-arg form defaults to `AgUiAgent<Record<string, unknown>>`.",
560+
"signature": "injectAgent(): AgUiAgent<>",
561561
"params": [],
562562
"returns": {
563-
"type": "AgUiAgent",
563+
"type": "AgUiAgent<>",
564564
"description": ""
565565
},
566566
"examples": []
567567
},
568568
{
569569
"name": "provideAgent",
570570
"kind": "function",
571-
"description": "Provides an Agent instance wired through HttpAgent and toAgent.\nConstructs an HttpAgent from config and wraps it in the runtime-neutral\nAgent contract via toAgent(). Returns a provider array suitable for\nbootstrapApplication or TestBed.configureTestingModule().\n\n**Static vs factory config.** Pass a plain `AgentConfig` object when the\nconfig is known up front. Pass a `() => AgentConfig` factory when the config\ndepends on runtime/DI state — the factory runs inside an Angular injection\ncontext, so it may call `inject()` to read services or route params.",
572-
"signature": "provideAgent(configOrFactory: AgentConfig | () => AgentConfig): Provider[]",
571+
"description": "Provides an Agent instance wired through HttpAgent and toAgent.\nConstructs an HttpAgent from config and wraps it in the runtime-neutral\nAgent contract via toAgent(). Returns a provider array suitable for\nbootstrapApplication or TestBed.configureTestingModule().\n\n**Static vs factory config.** Pass a plain `AgentConfig` object when the\nconfig is known up front. Pass a `() => AgentConfig` factory when the config\ndepends on runtime/DI state — the factory runs inside an Angular injection\ncontext, so it may call `inject()` to read services or route params.\n\n**Typed state via AgentRef.** Pass a typed ref as the first argument to flow\nthe state shape from `provideAgent` to `injectAgent` without repeating the\ngeneric at every call site:\n\n```ts\ninterface TripState { day: number; places: string[]; }\nexport const TRIP = createAgentRef<TripState>('trip');\n// app.config.ts:\nproviders: [provideAgent(TRIP, { url: 'http://localhost:8000/agent' })]\n// component:\nconst agent = injectAgent(TRIP); // AgUiAgent<TripState>\n```",
572+
"signature": "provideAgent(ref: AgentRef<T>, configOrFactory: AgentConfig | () => AgentConfig): Provider[]",
573573
"params": [
574+
{
575+
"name": "ref",
576+
"type": "AgentRef<T>",
577+
"description": "",
578+
"optional": false
579+
},
574580
{
575581
"name": "configOrFactory",
576582
"type": "AgentConfig | () => AgentConfig",
@@ -607,7 +613,7 @@
607613
"name": "toAgent",
608614
"kind": "function",
609615
"description": "Wraps an AG-UI AbstractAgent into the runtime-neutral Agent contract.\n\nThe adapter subscribes to source.subscribe({ onEvent }) and reduces every\nevent into the produced Agent's signals. submit() optimistically appends the\nuser message to both our signals and the source agent's internal message\nlist, then calls source.runAgent(). stop() calls source.abortRun().\n\nSubscription cleanup: the returned Agent does NOT manage its own lifetime.\nCallers using DI should rely on the provider's destroy hook; direct callers\nof toAgent() should treat the returned object's lifecycle as tied to the\nagent instance they constructed. The subscriber registered via\nsource.subscribe() will fire for the lifetime of source.",
610-
"signature": "toAgent(source: AbstractAgent<>, options: ToAgentOptions): AgUiAgent",
616+
"signature": "toAgent(source: AbstractAgent<>, options: ToAgentOptions): AgUiAgent<>",
611617
"params": [
612618
{
613619
"name": "source",
@@ -623,7 +629,7 @@
623629
}
624630
],
625631
"returns": {
626-
"type": "AgUiAgent",
632+
"type": "AgUiAgent<>",
627633
"description": ""
628634
},
629635
"examples": []

0 commit comments

Comments
 (0)