GraphConfig
The chart configuration object. See Graph Config Schema for the complete reference.GenerateGraphParams
Request parameters for the Chart Maker Agent.| Field | Type | Required | Description |
|---|---|---|---|
config | GraphConfig | Yes | The current chart configuration |
userPrompt | string | Yes | Natural language instruction |
metadata | Metadata | No | Request tracking information |
storytellingOptions | StorytellingOptions | No | Prune storytelling from config content client-side (SDK only). |
GenerateGraphResponse
Response from the Chart Maker Agent.| Field | Type | Description |
|---|---|---|
config | GraphConfig | Updated chart configuration. Narrative (title, subtitle, caption) is embedded in config.content as TipTap JSON documents. |
response.message | string | Explanation of changes made |
response.steps | string[] | Optional breakdown of modifications |
GenerateGraphSuggestionsParams
Request parameters for the Suggestions Agent.| Field | Type | Required | Description |
|---|---|---|---|
config | GraphConfig | Yes | The chart configuration containing the dataset |
userPrompt | string | Yes | Natural language description of what to visualize |
metadata | Metadata | No | Request tracking information |
maxSuggestionCount | 1 | 2 | 3 | 4 | No | Optional cap (1–4) passed to the model for how many suggestions to aim for. Omitted uses the default (4). Responses are not truncated if longer. |
GenerateGraphSuggestionsResponse
Response from the Suggestions Agent.| Field | Type | Description |
|---|---|---|
suggestions | Suggestion[] | List of chart type suggestions |
Suggestion
A single chart suggestion returned by the Suggestions Agent.| Field | Type | Description |
|---|---|---|
dataPrepPrompt | string | Prompt describing how to prepare the data for this chart |
chartType | AiChartType | Suggested chart type |
summary | string | Short description of what the chart would show |
StorytellingOptions
SDK-only options to prune storytelling fields from the config content after the API returns. For each option set totrue, the SDK removes that field from config.content before returning.
| Field | Type | Description |
|---|---|---|
excludeTitle | boolean | If true, the SDK removes config.content.title. |
excludeSubtitle | boolean | If true, the SDK removes config.content.subtitle. |
excludeCaption | boolean | If true, the SDK removes config.content.caption. |
Metadata
Optional tracking information for requests.| Field | Type | Description |
|---|---|---|
callId | string | Required when metadata is provided. Unique identifier for tracking and debugging. |
locale | string | Locale for responses (e.g., en-US, fr-FR). |
storytellingEffort | 'none' | 'low' | 'medium' | 'high' | Which narrative fields the agent embeds in config.content: none → no narrative; low → title only; medium → title + caption; high → title + subtitle + caption. Default is 'low'. |
SSE Events
ProgressEvent
CompleteEvent
ErrorEvent
SSEEvent Union
Error Types
GraphyApiError
Error thrown by the SDK when an API request fails. Covers HTTP errors, SSE stream errors, and network failures.| Property | Type | Description |
|---|---|---|
status | number | undefined | HTTP status code, if from an HTTP response |
code | string | undefined | Machine-readable error code from the API |
retryable | boolean | Whether the SDK considers this error retryable |
GraphyApiErrorOptions
isGraphyApiError
Type guard for narrowing unknown errors toGraphyApiError:
Configuration Types
ClientConfig
RetryConfig
Logger
AiChartType
Supported chart types for AI operations.| Type | Description |
|---|---|
line | Line chart |
bar | Horizontal bar chart |
groupedBar | Grouped horizontal bars |
stackedBar | Stacked horizontal bars |
100StackedBar | 100% stacked horizontal bars |
column | Vertical column chart |
groupedColumn | Grouped vertical columns |
stackedColumn | Stacked vertical columns |
100StackedColumn | 100% stacked vertical columns |
combo | Combined line and column |
pie | Pie chart |
donut | Donut chart |
funnel | Funnel chart |
heatmap | Heatmap |
scatter | Scatter plot |
waterfall | Waterfall chart |
table | Data table |

