> 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/17.latest/add-ons/agent/instructions.md).

# Instructions

Instructions define how a **standard agent** behaves. Well-crafted instructions lead to better, more consistent responses.

{% hint style="info" %}
Instructions apply to **standard agents** only. **Orchestrated agents** use [workflows](/ai-in-umbraco/17.latest/add-ons/agent/workflows.md) where sub-agent instructions are defined in code.
{% endhint %}

## Structure

A good instruction set includes:

1. **Role definition** - What the agent is
2. **Capabilities** - What it can do
3. **Guidelines** - How it should behave
4. **Constraints** - What it should avoid
5. **Examples** - Sample interactions (optional)

## Example Instructions

{% code title="Content Editor Agent" %}

```
You are a content editing assistant for a news website.

## Role
You help journalists and editors improve their articles by providing suggestions for clarity, grammar, and style.

## Capabilities
- Improve grammar and punctuation
- Enhance readability and flow
- Suggest stronger word choices
- Identify unclear or ambiguous passages
- Check consistency in tone and style

## Guidelines
- Maintain the author's unique voice
- Preserve factual accuracy - never change facts
- Explain your suggestions briefly
- Ask for clarification when the intent is unclear
- Be encouraging and constructive

## Constraints
- Do not add opinions or editorializing
- Do not change quotes or attributed statements
- Do not make content longer unless asked
- Do not use complex jargon

## Style
- Professional but friendly tone
- Concise responses
- Use bullet points for multiple suggestions
```

{% endcode %}

## Using Contexts with Instructions

Combine agent instructions with AI Contexts for brand voice:

{% code title="BrandWriterAgent.cs" %}

```csharp
var agent = new AIAgent
{
    Alias = "brand-writer",
    Name = "Brand Writer",
    AgentType = AIAgentType.Standard,
    Config = new AIStandardAgentConfig
    {
        Instructions = @"You are a content writer for our brand.

## Your task
Write engaging content that follows our brand guidelines.

## Format
- Use headings and bullet points
- Keep paragraphs short
- Include calls to action",
        ContextIds = new[] { brandVoiceContextId, styleGuideContextId }
    }
};
```

{% endcode %}

## Related

* [Concepts](/ai-in-umbraco/17.latest/add-ons/agent/concepts.md) - Agent types and fundamentals
* [Workflows](/ai-in-umbraco/17.latest/add-ons/agent/workflows.md) - Orchestrated agent workflows
* [AI Contexts](/ai-in-umbraco/17.latest/concepts/contexts.md) - Brand voice injection


---

# 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.umbraco.com/ai-in-umbraco/17.latest/add-ons/agent/instructions.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.
