> For the complete documentation index, see [llms.txt](https://documentation.proto.cx/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.proto.cx/docs/getting-started/build-your-first-ai-agent.md).

# Build your first AI agent

A step-by-step walkthrough of building a working AI agent, end to end, using one example: a complaints assistant for a financial institution. Each step links to the reference page for that feature.

{% hint style="info" %}
This is a how-to article. For what each feature does in detail, follow the links to the module pages at each step.
{% endhint %}

***

## What you'll build

An AI agent that greets a person, recognises a complaint, collects its details, logs a ticket, and hands off to a live agent when needed.

## Before you start

* A workspace with the AI Agents module enabled.
* Permission to manage AI agents, set in [Roles and permissions](/docs/settings/general/roles-and-permissions.md) settings.

***

{% stepper %}
{% step %}

### Set the agent's persona

The persona defines how the agent speaks and behaves. In the **Agent** tab, set a name, then write a persona that gives the agent a role, a tone, and any limits.

For a complaints assistant, the persona might describe a calm, empathetic handler that acknowledges frustration and never offers financial advice.

See [Manage AI agents](/docs/modules/ai-agents/manage-ai-agents.md) for the full Agent tab.
{% endstep %}

{% step %}

### Add knowledge

Knowledge is the content the agent draws on to answer questions. In the **Knowledge** tab, add a training source — a document, a URL, or a pasted text snippet — such as your complaints policy.

See [Knowledge](/docs/modules/ai-agents/knowledge.md) for the training source types and limits.
{% endstep %}

{% step %}

### Build the workflow

The workflow is the scripted flow of triggers and actions. In the **Workflows** tab, build the complaint flow:

```
Message received: "I want to complain"
├─ Send message: "I can help with that. What's it about?"
├─ Ask survey → {financial_institution}, {date}, {complaint_details}
├─ Create ticket → Subject: "Complaint about {financial_institution}"
└─ Live agent handoff → Complaints team
```

Reference pages: [Message received](/docs/modules/ai-agents/workflows-and-actions/message-received.md) · [Send message](/docs/modules/ai-agents/workflows-and-actions/send-message.md) · [Ask survey](/docs/modules/ai-agents/workflows-and-actions/ask-survey.md) · [Create ticket](/docs/modules/ai-agents/workflows-and-actions/create-ticket.md) · [Live agent handoff](/docs/modules/ai-agents/workflows-and-actions/live-agent-handoff.md)

See [Workflows and actions](/docs/modules/ai-agents/workflows-and-actions.md) for the full list.
{% endstep %}

{% step %}

### Test the agent

Use the **AI agent tester** beside the workflow to chat with the agent and check each step fires as expected. Switch the tester's language to confirm any localised content.

See [Manage AI agents](/docs/modules/ai-agents/manage-ai-agents.md) for the tester.
{% endstep %}

{% step %}

### Publish

Connect the agent to a channel — such as webchat, WhatsApp, or Messenger — from the **Publish** tab, and make it live.

See [Manage AI agents](/docs/modules/ai-agents/manage-ai-agents.md) for publishing.
{% endstep %}
{% endstepper %}

***

## Next steps

* Add a [Branch](/docs/modules/ai-agents/workflows-and-actions/branch.md) to route complaints by type.
* Use [LLM processing](/docs/modules/ai-agents/workflows-and-actions/llm-processing.md) to extract structured details from the complaint.
* Add more languages in the **Agent** tab and localise the workflow.
