---
product: "AG Studio"
title: "Built-in Agents"
description: "A reference for the five agents AG Studio ships, the tools each one holds, and how to add them to a harness as they are."
framework: angular
version: "3.0.0"
related:
    - title: "Agent Overview"
      url: "https://www.ag-grid.com/studio/angular/ai-agents/"
    - title: "Agent Configuration"
      url: "https://www.ag-grid.com/studio/angular/ai-custom-agents/"
    - title: "Agent Context"
      url: "https://www.ag-grid.com/studio/angular/ai-context/"
llms: "https://www.ag-grid.com/studio/llms.txt"
---

# Built-in Agents

AG Studio ships five agents: a Lead that coordinates, and specialists for Planning, Data, Page and Widget work.

Building a dashboard needs inspecting the data, planning a layout, placing widgets and then configuring each one, so the work is split across focused agents rather than given to a single prompt.

This page is the reference for what you get. To change any of it, see [Agent Configuration](https://www.ag-grid.com/studio/angular/ai-custom-agents/).

## Use Them As They Are

The config builder hands you all five on `builtIn`, keyed by id, each a plain definition. Pair one with a runner to turn it into a running agent:

```ts
// Your AgLlmAdapter - see Direct LLM Runner.
const adapter = myOpenAiAdapter({ endpoint: '/api/llm' });

ai: ({ api }) =>
    createAiHarness(api, ({ builtIn }) => ({
        agents: Object.values(builtIn).map((definition) => directLlmRunner({ ...definition, adapter })),
        primary: 'lead',
    })),
```

`primary: 'lead'` makes the lead the agent new threads start from. The other four are delegate-only and never appear in the user's agent picker.

To compose them with your own, spread and append:

```ts
createAiHarness(api, ({ builtIn, tools: { studio } }) => ({
    agents: [
        ...Object.values(builtIn).map((definition) => directLlmRunner({ ...definition, adapter })),
        directLlmRunner({
            id: 'audit',
            adapter,
            description: 'Reviews a page for missing or misleading widgets.',
            instructions: () => 'You review dashboards and report what is missing.',
            tools: () => [studio.viewPage(), studio.viewWidget()],
        }),
    ],
    primary: 'lead',
}));
```

#### Built-in Agents

```ts
import '@angular/compiler';
import { provideHttpClient } from '@angular/common/http';
import { bootstrapApplication } from '@angular/platform-browser';

import { AppComponent } from './app.component.ts';

const app = bootstrapApplication(AppComponent, {
    providers: [provideHttpClient()],
});
```

[Live example: Built-in Agents](https://www.ag-grid.com/studio/examples/ai-builtin-agents/ai-builtin-agents-example/angular/)

## The Team

| Agent | Role | Tools | Delegates to |
| --- | --- | --- | --- |
| **Lead** | Coordinator. Reads the request, decides the approach, delegates. | `view_schema`, `view_report`, `view_page`, `view_plan`, `update_plan`, `clear_plan`, `rename_thread`, `delegate_to` | `data`, `page`, `planning`, `widget` |
| **Planning** | Turns a request into a structured plan. | `view_schema`, `view_report`, `view_page`, `view_plan`, `create_plan` | - |
| **Data** | Explores and queries the data; answers data questions. | `execute_query`, `view_schema`, `create_expression`, `update_expression`, `delete_expression` | - |
| **Page** | Places and moves widgets, manages page-level filters. | `view_schema`, `view_page`, `view_plan`, `add_widget`, `position_widget`, `remove_widget`, `add_page_filter`, `remove_page_filter` | - |
| **Widget** | Configures one widget: type, data mapping, titles, formatting. | `view_schema`, `view_plan`, `view_widget`, `configure_widget`, `add_widget_filter`, `remove_widget_filter` | - |

The **Widget** agent is parameterised. The lead names the widget's type and id when delegating, which narrows `configure_widget`'s schema to that widget type's options, so its tools are resolved from delegation parameters rather than fixed.

For what each tool does, see [Built-in Tools](https://www.ag-grid.com/studio/angular/ai-tools-builtin/).

## How a Dashboard Gets Built

A worked delegation, for "build me a dashboard":

1. **Lead** reads the message, calls `view_schema` to see what data exists, and decides the request warrants a plan.
2. **Lead** delegates to **Planning**, which calls `create_plan` to produce a layout tree plus a widget entry per intended widget, then returns.
3. **Lead** delegates to **Page**, which calls `add_widget` for each entry and `position_widget` to arrange them, returning the widget ids.
4. **Lead** delegates to a **Widget** agent per widget - these run concurrently - each calling `configure_widget` for its own widget.
5. **Lead** marks the plan complete and summarises for the user.

The plan is a durable artefact on the thread, so a later message can pick up where the last one left off. The panel renders each delegation inline and expandable, so a user can follow the specialists' work.

## Instructions

Each built-in agent carries its own instructions, resolved per run. The data agent's include a generated description of your schema, so it starts knowing which tables and fields exist. The widget agent's include guidance on choosing a chart type. You can replace any of them - see [Agent Configuration](https://www.ag-grid.com/studio/angular/ai-custom-agents/).

## Next

- [Built-in Tools](https://www.ag-grid.com/studio/angular/ai-tools-builtin/) - what each tool does
- [Agent Configuration](https://www.ag-grid.com/studio/angular/ai-custom-agents/) - changing instructions, tools or the team
- [Agent Overview](https://www.ag-grid.com/studio/angular/ai-agents/) - the contract underneath
