> ## Documentation Index
> Fetch the complete documentation index at: https://docs.potpie.ai/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/gJ4EwDE1Ctkm-zsd/images/custom-agent-create.png?fit=max&auto=format&n=gJ4EwDE1Ctkm-zsd&q=85&s=f830948422af40b5f157418196a287c2" 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/kPBQNCG3fVdRW31K/images/custom-agent-identity.png?fit=max&auto=format&n=kPBQNCG3fVdRW31K&q=85&s=52289929be5ef200c67884ec363923d2" 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/kPBQNCG3fVdRW31K/images/custom-agent-tools.png?fit=max&auto=format&n=kPBQNCG3fVdRW31K&q=85&s=404f844012538c76ac75811a1952470e" alt="Task and Tool Configuration" width="2940" height="1660" data-path="images/custom-agent-tools.png" />
  </Step>
</Steps>
