> ## Documentation Index
> Fetch the complete documentation index at: https://graph.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Customize a built-in agent

> Extend the built-in chat agent with a new subagent for researching things on the internet.

## Connect a web server

Add the [fetch](https://github.com/modelcontextprotocol/servers/tree/main/src/fetch) MCP server to `.graph/config.toml`. Its `fetch` tool joins your catalog as `web__fetch`:

```toml .graph/config.toml theme={null}
[mcp.web]
description = "Fetches web pages as markdown"
command = "uvx"
args = ["mcp-server-fetch"]
```

## Create the researcher

```yaml .graph/agents/researcher.yaml theme={null}
version: 1
name: researcher
description: Researches a question on the internet and answers with sources.
model: chat
tools:
- web__fetch
system_prompt: |
  You research questions on the internet. Fetch the pages you need, then
  answer briefly and list the URLs you used.
```

## Copy the chat agent

A file named `chat` in your project replaces the built-in:

```bash theme={null}
graph agent show chat \
  > .graph/agents/chat.yaml
```

## Add the subagent

Add `researcher` to `subagents`, and tell `chat` when to use it in `system_prompt`:

```yaml .graph/agents/chat.yaml theme={null}
subagents:
- chat
- researcher
system_prompt: |
  …
  - When a question needs current information from the internet, give it to agent__researcher and cite the sources it returns.

  Current date and time: {{session.date}}
  {{session.user}}
```

## Try it

```bash theme={null}
graph ask "What is the latest stable version of Rust?"
```

`chat` hands the question to `researcher`, which fetches the pages:

```text theme={null}
→ agent__researcher {"prompt":"What is the latest stable version of the Rust programming language…"}
→ web__fetch {"url":"https://www.rust-lang.org/"}
→ web__fetch {"url":"https://releases.rs/"}
✓ web__fetch 1.9s
✓ web__fetch 2.4s
→ web__fetch {"url":"https://releases.rs/docs/1.99.0/"}
→ web__fetch {"url":"https://blog.rust-lang.org/"}
✓ web__fetch 494.1ms
✓ web__fetch 1.1s
✓ agent__researcher 10.0s
The latest stable version of Rust is **1.99.0**, released on **October 1, 2026**.

Sources: releases.rs, and the official announcement at blog.rust-lang.org/2026/10/01/Rust-1.99.0/
```

## Related guides

> **[Build a multi-agent network](/agents/guides/multi-agent-networks)**
>
> Connect agents with handoffs and subagents.

> **[Connect an MCP server](/integrating/mcp/guides/connect-mcp-server)**
>
> Add other servers' tools to your catalog.

> **[Talk to an agent](/agents/guides/talk-to-an-agent)**
>
> Use `chat` with `graph ask` and `graph chat`.

> **[Create an agent in the workbench](/agents/guides/create-in-workbench)**
>
> Draft the researcher with the agent drafter instead.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.