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

# Agents

> Create a shared AI teammate with a clear role, knowledge, and connected tools.

An agent is a reusable AI teammate. It has its own name, job instructions, model, knowledge, and optional tools. Once it
is ready, members of the workspace can chat with it or mention it in a channel.

Use an agent when you want the same role and rules more than once. Use a normal AI chat for one-off questions.

## Create an agent

<Steps>
  <Step title="Open Agents">
    Select **Agents** in the left rail. Select the **+** beside **Agents** to start from scratch. To use a ready-made
    setup, open **Templates**, choose one, and select **Use Template**.
  </Step>

  <Step title="Name the job">
    Give the agent a clear name and short description, such as `Customer feedback analyst`.
  </Step>

  <Step title="Write its instructions">
    Explain the goal, the steps it should follow, the result format, and what it must not do.
  </Step>

  <Step title="Choose a model">
    Pick a model that supports the agent's work. Agents with connected tools need a tool-capable model.
  </Step>

  <Step title="Add knowledge and tools">
    Add only the files, canvases, and connected-app actions needed for this role.
  </Step>

  <Step title="Save and test">
    Select **Create Agent**, then start a chat with it. Test a normal case, a difficult case, and a request it should
    refuse or hand back to a person.
  </Step>
</Steps>

## Write useful instructions

Strong instructions answer five questions:

1. **Role:** What job does this agent have?
2. **Inputs:** What information should it use?
3. **Method:** What steps should it follow?
4. **Output:** What should the result look like?
5. **Limits:** When should it stop, ask a question, or avoid an action?

Example:

> Review incoming customer feedback. Group similar comments into themes, include two short examples for each theme, and
> suggest one next step. Keep customer names out of the summary. If there are fewer than five useful comments, say that
> the sample is too small instead of drawing a conclusion.

## Add knowledge

Give the agent files and canvases that are useful for its job. Keep this set focused. A support agent may need the
support policy and product FAQ; it probably does not need every document in the workspace.

The agent can also use Workspace Context. Agent knowledge adds a smaller set of sources for this particular role; it
does not replace the instructions, files, and canvases shared with the workspace.

Update or remove a source when it becomes outdated. Ask the agent to say when its knowledge does not contain the answer.

## Add connected tools

Tools let the agent read or change information in a connected app, such as finding an email or creating an issue. Select
the smallest set of actions the agent needs.

Connections belong to users. Sharing an agent does not silently share your Gmail, GitHub, or other app account with the
workspace. A teammate may need to connect their own account before using a tool. See
[Integrations](/integrations/overview).

## Use an agent

* Select **Start chat** on the agent page for a focused conversation.
* Type `@` in a channel and choose the agent to bring it into a team discussion.
* Create a [task](/features/tasks) when the same job should run again.

## Improve it over time

When an agent gives a weak result, change one of three things:

* make the instructions clearer;
* give it a better source;
* remove a tool or step it does not need.

Test again with the same examples. Do not automate a job until the agent gives a useful result consistently and its
actions are safe to run without close supervision.

<Note>
  Agents are shared workspace resources. Their creator controls execution settings, while workspace managers can manage
  the resource. Model, tool, knowledge, and agent limits depend on your plan.
</Note>


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