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

# AI Instructions

**AI Instructions** (also called the prompt) are the natural language instructions that define how a channel behaves. Every Spara channel is powered by a large language model, and the instructions you write are the primary way you shape its personality, goals, and responses.

Instructions are available on every channel: [Chat](/agents/channels/chat.md), [Email](/agents/channels/email.md), [Phone](/agents/channels/phone.md), [SMS](/agents/channels/sms.md), and [Product Demo](/agents/channels/product-demo.md).

## What instructions cover

Instructions can cover anything the channel needs to know or do:

* **Persona and tone**: who it is, how it speaks, what company it represents
* **Goals**: what it's trying to accomplish in a conversation (book a meeting, answer a question, qualify a lead)
* **Handling specific scenarios**: objections, pricing questions, competitor mentions, support requests
* **Escalation**: when and how to hand off to a human rep
* **Gathering information**: what fields to collect from the lead, and how to ask for them
* **Content constraints**: what to say and what to avoid

Channels also draw on [Knowledge](/platform/knowledge.md) (scraped webpages, uploaded documents, and key questions) to answer factual questions about your product. Instructions tell the channel *how* to use that knowledge; the knowledge base provides the facts.

## Structure of the instructions

Instructions are free-form text. You write them in plain language, like briefing a new rep. There's no required format, but a few patterns work well:

**Role and goal up front.** Start with who the channel is and what it's trying to do in one or two sentences. This orients every response the model generates.

**Use sections for distinct scenarios.** Group related instructions under headers (e.g., `## Handling objections`, `## Qualifying questions`). Sections help the model apply the right instructions at the right moment.

**Be specific and literal.** Vague instructions like "be helpful" are less effective than specific ones like "if a lead asks about pricing, share the three-tier overview before asking about their team size."

**Use conditionals for branching behavior.** Instructions like "if the lead mentions a competitor, acknowledge it briefly and pivot to our differentiated value" guide behavior in named situations.

For a deeper walkthrough, see [Writing Effective Agent Prompts](/guides/platform-guides/writing-effective-agent-prompts.md).

<figure><img src="/files/d54UQHkWulKNAJHmZilF" alt=""><figcaption><p>The AI Instructions panel in the editor.</p></figcaption></figure>

## FAQ

### How long should instructions be?

As long as necessary, but no longer. Most well-configured channels have instructions between 200 and 800 words. If instructions are very long, break them into clearly labeled sections so the model can navigate them. Excessively long or redundant instructions can reduce coherence.

### Can I use markdown formatting?

Yes. Headers, bullet points, and bold text are all supported and help the model parse structure. Avoid tables, since they're rarely rendered correctly in prompt context.

### What's the difference between instructions and Knowledge?

Instructions tell the channel *how* to behave: its goals, tone, and handling of scenarios. Knowledge provides factual content it can draw on when answering questions. In practice: put product facts, FAQs, and support content in Knowledge. Put goals, tone, and scenario handling in instructions.

### Can I use Ask Spara AI to help write instructions?

Yes. [Ask Spara AI](/agents/channels/configuring/ask-spara-ai.md) can review your instructions, flag gaps or conflicts, and suggest rewrites for specific sections. It's available in the right-hand panel of every editor.


---

# 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.spara.com/agents/channels/configuring/ai-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.
