---
title: "Create and test an agent"
description: "Give an agent a focused role, choose its model, test its behavior, and refine its access before using it in automations."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.aiagent.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Create and test an agent

Create a focused agent before assigning it recurring work. A narrow role is easier to test and makes its tool access easier to review.

**Before you begin**

Write down one responsibility for the agent, one representative request, and
the minimum docs and connected accounts required to complete it.

> **Or start from a template**
>
> **Agents** also shows a **Start from a template** row. A template installs a
> ready-made agent with its skills and paused routines, and you can review all
> of them before you install. Templates are a fast start; the steps below still
> apply when you refine the installed agent.

1. **Create the agent**

   1. In **Agents**, click **New agent**.

   ![The New agent button at the top of the Agents page.](/screenshots/guides/agent-new-button.webp)

   The agent builder opens with a **Core** block selected. The panel on the right holds the agent's settings.

   2. In **Name**, enter a recognizable name for the agent.
   3. In **Role**, enter the responsibility it owns.
   4. In **Description**, add optional context for teammates.

   ![The Core block settings in the agent builder, with Name, Role and Description filled in.](/screenshots/guides/agent-core-form.webp)

   5. In **System prompt**, click **Click to add instructions…**, then describe the result, boundaries, and working style you expect.
   6. In **Model**, choose the model the agent should use.
   7. Click **Save Core**.

   ![The System prompt and Model settings of the Core block, with the Save Core button.](/screenshots/guides/agent-core-save.webp)

   8. At the top right, click **Save**.

   Name and role are required. You can change every other setting later. After you click **Save**, the agent's page opens. To add docs or a connection before you save, drag a **Docs**, **Skill**, **Connection**, or **Toolkit** block from **Blocks** onto the canvas.
2. **Add docs and connections**

   1. On the agent's page, stay on the **Overview** tab.
   2. In **Docs**, click **Attach**, select the docs the agent needs, then click **Stage**.
   3. In **Connections**, click **Attach**, select one account for each provider, then click **Stage**.
   4. Click **All tools** next to an account. Under **Reads**, **Actions**, and **Destructive**, clear every tool the agent does not need.
   5. In the **Unsaved changes** bar, click **Save**.

   ![The Docs and Connections sections on an agent's Overview tab, each with an Attach button.](/screenshots/guides/agent-attach.webp)

   Attach only the docs and connection accounts the role requires. **All tools** is the default: the agent can use every tool the connection allows. The connection sets the ceiling. Destructive tools stay off until the connection allows them, and the tick boxes under **All tools** can only narrow what the connection allows.

   > **Grant the minimum necessary access**
   >
   > Keep only the tools the role requires. Enable write or destructive tools only
   > when the role needs them, and keep supported external changes reviewable.
3. **Test a representative request**

   1. In the message box at the bottom of the chat pane, send a small request that reflects the agent's real job.

   ![The message box at the bottom of an agent's chat pane.](/screenshots/guides/agent-test-chat.webp)

   Check that the agent:

   - follows the intended scope;
   - uses the expected docs;
   - selects the correct connected account;
   - proposes external changes for review instead of silently applying them;
   - produces a result in the format your workflow needs.

   The **Memory**, **Tasks**, **Traces**, **Evals**, and **Activity** tabs beside **Overview** show the agent's memory, tasks, run traces, evaluations, and activity. Refine the instructions or access, click **Save**, then repeat the test until the behavior is consistent.
4. **Put the agent to work**

   Use the agent directly for one-off work, set it as the worker of a ticket, or select it in a workflow or Autopilot. Keep the role focused even when the surrounding workflow becomes more complex.

## Manage agents

The Agents list has an **Active** view, an **Archived** view, and a search box. Rows sort by the number of runs in the last 30 days, then by newest. Built-in agents come first and carry a **system** badge. An agent is either **Personal** or **Shared**. Change this in **Visibility** on the **Overview** tab.

Click **Agent actions** on a row to **Duplicate** the agent or archive it. Archive an agent when you may need it again: it can no longer be set as a worker or mentioned, and its history stays. A run that is already in progress keeps going. An archived agent appears under **Archived**, where you can **Restore** it or **Delete permanently**. Delete it only when its configuration is no longer needed.

## Expected result

**An agent is ready for work when**

It can complete a representative request with the intended context and minimum
necessary access.

## Continue from here

- [Understand agents](/core-concepts/agents)
- [Control connection tool access](/connections/tool-access)
- [Build and test a workflow](/guides/build-and-test-a-workflow)

Source: https://docs.aiagent.app/guides/create-and-test-an-agent/index.mdx
