> For the complete documentation index, see [llms.txt](https://docs.interactive.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.interactive.ai/agents/create-an-agent.md).

# Create an Agent

Creating an agent takes ten steps covering both halves of an agent: the configuration that shapes its behavior, and the deployment that runs it as a service.

Create your context first. Policies, routines, glossaries, and prompts are built on their own pages and attached here by reference, so anything that does not exist yet will not appear in the pickers. The system prompt is the exception, since you can write it inline.

{% stepper %}
{% step %}

### Identity

Names the agent, picks the runtime version its configuration targets, and sets the language it replies in. Leave Agent version at the default unless you have a reason to pin an older one.
{% endstep %}

{% step %}

### System Prompt

Defines the agent's role and behavior. Write it here and the platform saves it as a reusable project prompt, or bind to an existing prompt at the exact version you pick.
{% endstep %}

{% step %}

### Context

Attaches the policies, glossaries, and routines the agent follows, and sets how they resolve against each other. Priorities decides which item wins when two disagree, and Re-evaluate routines after handles the case where a routine's activation depends on a tool result.
{% endstep %}

{% step %}

### Extra Rules&#x20;

Sets how the agent opens a conversation and what it says while tools are running. Optional as a whole, and the greeting is approximated and adapted to the user's language rather than repeated word for word.
{% endstep %}

{% step %}

### Connections

Wires the agent to its model and to everything outside it: the primary and fallback models, a separate model for the engine's internal retry loop, a grounding source for retrieval, a session store, and its MCP servers. With no session store attached, state lives in memory and is lost when the agent restarts.
{% endstep %}

{% step %}

### Advanced

Tunes the engine, tags this agent's traces for Observability, and registers inbound webhooks. The defaults are sound. Webhooks are verified with HMAC and dispatch only to autonomous routines attached to this agent.
{% endstep %}

{% step %}

### Endpoint

Controls whether the agent is reachable from the internet or stays internal to the platform.
{% endstep %}

{% step %}

### Runtime

Passes environment variables and project secrets to the running agent. Every key inside an attached secret arrives as an environment variable, and the Router API key the agent uses to bill model calls is generated when you deploy.
{% endstep %}

{% step %}

### Schedule

Limits when the agent runs. Outside the uptime window it scales to zero.
{% endstep %}

{% step %}

### Review & Deploy

Confirms everything before going live. Save draft keeps a pending version without touching anything deployed, and Deploy stays unavailable until every required field is filled.
{% endstep %}
{% endstepper %}

{% hint style="info" %}
Agents can also be created and managed from the command line. See the [CLI documentation](https://docs.interactive.ai/cli/) for `iai agents`.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.interactive.ai/agents/create-an-agent.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
