> Source: https://builder.ema.ai/v2/agent-reference/chart-creator
> Title: Chart Creator Agent

# Chart Creator Agent

The Chart Creator Agent scans a markdown document for tables, builds a **BAR** or **LINE** chart from the data in each one, and returns the document with the rendered chart placed directly after its source table. Use it whenever a document-producing step in your workflow should turn tabular data into a visual instead of leaving the reader to parse rows and columns.

The Chart Creator Agent belongs to the **Generation** group in the agent library. Under the hood it runs as a Custom agent (`custom_agent`) — the agent service forwards the node's inputs to the custom-action service, which executes the agent and returns its output. See [Custom Agent](/builder/v2/agent-reference/custom) for how the `custom_agent` dispatch mechanism works.

> [WARNING]
> **Beta.** The Chart Creator Agent is in beta. Chart type detection and layout may change as the agent matures.

## When to use it

Use the Chart Creator Agent when a workflow produces a markdown document containing tabular data and you want that data visualized inline:

-   Turn a table of monthly figures into a bar or line chart directly beneath it.
-   Add visual summaries to a generated report without hand-authoring chart markup.
-   Run downstream of a [Document Writer Agent](/builder/v2/agent-reference/document-writer) or [Data Extractor Agent](/builder/v2/agent-reference/extraction) node that produced the source tables.

The agent only builds **BAR** and **LINE** charts; it does not support pie, scatter, or other chart types.

## Configuration

Add the agent to a workflow as a Custom agent and pin it by ID in `agent_config.type_config`:

```json
{ "custom_agent_id": "chart_creator_agent" }
```

Input key

Required

Purpose

`documents`

Yes

One or more markdown documents to scan for tables. Each entry carries the document's content.

## Inputs and output

**Input**

```json
{ "documents": [ { "content": "# Q1 Results\n\n| Month | Revenue |\n|---|---|\n| Jan | 120 |\n| Feb | 150 |\n| Mar | 175 |\n" } ] }
```

**Output** — the agent returns the documents with a chart inserted after each table it found:

```json
{ "documents": [ { "content": "# Q1 Results\n\n| Month | Revenue |\n|---|---|\n| Jan | 120 |\n| Feb | 150 |\n| Mar | 175 |\n\n[chart: bar, Month vs Revenue]\n" } ] }
```

A downstream node (or the Document Writer node that produced the source) reads the updated content via `{{<node_id>.output.documents}}`.

## What's next

-   [Custom Agent](/builder/v2/agent-reference/custom) — how the `custom_agent` dispatch this agent runs on works.
-   [Document Writer Agent](/builder/v2/agent-reference/document-writer) — a common upstream source of the tables this agent charts.
-   [Agent Reference overview](/builder/v2/agent-reference) — the agent-type model, catalog, and shared execution engine.
