> For the complete documentation index, see [llms.txt](https://docs.umbraco.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.umbraco.com/ai-in-umbraco/19.latest/add-ons/agent/getting-started.md).

# Getting Started

Get started with Agent Runtime.

This guide walks you through creating your first AI agent and using it via the Contextual Copilot sidebar.

## Prerequisites

Before starting, ensure you have:

* Umbraco.AI installed and configured
* At least one AI connection set up
* At least one chat profile created

## Step 1: Install the Packages

{% code title="Package Manager Console" %}

```powershell
Install-Package Umbraco.AI.Agent
Install-Package Umbraco.AI.Agent.Copilot
```

{% endcode %}

Restart your application to run database migrations.

{% hint style="info" %}
The Contextual Copilot package provides the sidebar UI. Without it, agents can only be used programmatically.
{% endhint %}

## Step 2: Create an Agent

1. Navigate to the **AI** section > **Agents**
2. Click **Create Agent**
3. Fill in the details:

| Field        | Value                          |
| ------------ | ------------------------------ |
| Alias        | `writing-assistant`            |
| Name         | Writing Assistant              |
| Description  | Helps improve and edit content |
| Instructions | See below                      |
| Profile      | (select your chat profile)     |

**Instructions:**

```
You are a helpful writing assistant for a content management system.

Your capabilities:
- Improve grammar and clarity
- Suggest better word choices
- Help structure content

Guidelines:
- Be concise and helpful
- Explain your suggestions
- Maintain the author's voice
```

4. Set the **Scope** to **Content** so the agent appears in the Content section
5. Set the **Surface** to **Copilot** -- this is the Contextual Copilot surface, as distinct from the **Copilot Workspace** option next to it
6. Click **Save**

## Step 3: Use the Agent

1. Navigate to the **Content** section
2. Open a content item
3. Click the floating **AI Assistant** button in the bottom-right corner of the workspace to open the Contextual Copilot sidebar
4. The Writing Assistant agent is available in the agent selector
5. Start a conversation — try "Help me improve this page title"

See [Contextual Copilot Usage](/ai-in-umbraco/19.latest/add-ons/agent-copilot/copilot.md) for details on using the sidebar.

## Next Steps

* [Instructions](/ai-in-umbraco/19.latest/add-ons/agent/instructions.md) — Write better agent instructions
* [Scopes](/ai-in-umbraco/19.latest/add-ons/agent/scopes.md) — Control where agents appear
* [Permissions](/ai-in-umbraco/19.latest/add-ons/agent/permissions.md) — Configure tool access
* [Contextual Copilot](/ai-in-umbraco/19.latest/add-ons/agent-copilot.md) — Sidebar features


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.umbraco.com/ai-in-umbraco/19.latest/add-ons/agent/getting-started.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
