GraphConfig and a prompt, receive an updated GraphConfig.
Methods
generateGraph
Processes the request and returns the final result. Internally handles streaming and collects the response.generateGraphStream
Returns an async iterator that yields events as they arrive.Parameters
| Field | Type | Required | Description |
|---|---|---|---|
config | GraphConfig | Yes | The current chart configuration |
userPrompt | string | No | Natural language instruction |
metadata | Metadata | No | Request tracking information |
storytellingOptions | StorytellingOptions | No | Prune storytelling from config content client-side (SDK only). |
Metadata
| Field | Type | Description |
|---|---|---|
callId | string | Optional. Identifier for tracking and debugging. |
locale | string | Locale for responses (e.g., en-US, fr-FR). |
effort | 'low' | 'medium' | 'high' | Preferred invocation tier; stored on the invocation and forwarded to nested agents. Default is medium when omitted (and nothing deprecated is used to infer it). See Invocation effort and chart narrative. |
storytellingEffort | 'none' | 'low' | 'medium' | 'high' | Deprecated — prefer effort. Still accepted; when only this field is set, the server infers effort for the rest of the pipeline. |
Response
| Field | Type | Description |
|---|---|---|
config | GraphConfig | Updated chart configuration. Narrative (title, subtitle, caption) is embedded in config.content as TipTap JSON documents; see Invocation effort and chart narrative. |
response.message | string | Explanation of changes made |
response.steps | string[] | Breakdown of individual modifications |
Invocation effort and chart narrative
metadata.effort selects how heavy the invocation is: it is stored on the request, forwarded into agent invocations (including tools that run nested agents), and drives defaults when you do not send storytellingEffort.
For chart generation, the chart agent still consumes a storytelling level (none / low / medium / high). The server sets that level as follows:
- If you send only
effort, the chart storytelling level is derived fromeffort(defaulteffortismedium, which matches the narrative band you previously got from omitting metadata or using the old default). - If you send only
storytellingEffort(deprecated), the chart uses that value directly and the server inferseffortfor the rest of the stack. - If you send both,
storytellingEffortwins for the chart so existing explicit chart settings keep working;effortstill applies everywhere else.
none value on effort; to drop narrative fields in the client, use storytellingOptions on GenerateGraphParams (see StorytellingOptions).
Basic Usage
With Progress Callback
Use theonProgress callback to show real-time progress without full streaming:

