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

# Configure Custom Agents

In this tutorial, you'll learn how to configure a custom agent in Potpie that runs against your codebase's knowledge graph with access to the same tool library as the built-in agents.

To understand how custom agents work, see the [Custom Agents page](/custom-agents/introduction).

## Creating an Agent

<Steps>
  <Step title="Create the agent">
    Review the configuration and create the agent. The agent is ready for immediate use in conversations.

    <img src="https://mintcdn.com/potpieai-feat-cli-setup/RjcDtgma2Y5eRJIQ/images/custom-agent-create.png?fit=max&auto=format&n=RjcDtgma2Y5eRJIQ&q=85&s=c8d2688b8f47eccc4e7c0f62b6dd91d9" alt="Agent Creation" width="2876" height="1596" data-path="images/custom-agent-create.png" />
  </Step>

  <Step title="Define agent attributes">
    Specify the agent's **role**, **goal**, **backstory**, and **system prompt**. These four attributes establish the agent's identity and govern how it approaches every task.

    <img src="https://mintcdn.com/potpieai-feat-cli-setup/RjcDtgma2Y5eRJIQ/images/custom-agent-identity.png?fit=max&auto=format&n=RjcDtgma2Y5eRJIQ&q=85&s=58d8ce832ad02109f1bc223cebf9bb07" alt="Agent Identity Configuration" width="2940" height="1660" data-path="images/custom-agent-identity.png" />
  </Step>

  <Step title="Add tasks and assign tools">
    Define between one and five tasks. For each task, provide a description, select the tools the agent may use, and specify the expected output format.

    <img src="https://mintcdn.com/potpieai-feat-cli-setup/RjcDtgma2Y5eRJIQ/images/custom-agent-tools.png?fit=max&auto=format&n=RjcDtgma2Y5eRJIQ&q=85&s=0cbe1ed3e4dbeb90274cd9685aaaa502" alt="Task and Tool Configuration" width="2940" height="1660" data-path="images/custom-agent-tools.png" />
  </Step>
</Steps>
