# AI Instructions

**AI Instructions** — also called the prompt — are the natural language instructions that define how an agent behaves. Every Spara agent 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 agent type: Chat, Email, Voice, Text, and Product Demo.

## What instructions cover

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

* **Persona and tone** — who the agent is, how it speaks, what company it represents
* **Goals** — what the agent is 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

Agents also draw on [Knowledge](/platform/knowledge.md) — scraped webpages, uploaded documents, and key questions — to answer factual questions about your product. Instructions tell the agent *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 across agents:

**Role and goal up front.** Start with who the agent 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/aP7dqliJOtCV6abWw2Ou" alt=""><figcaption><p>The AI Instructions panel in the Agent Editor.</p></figcaption></figure>

## FAQ

### How long should instructions be?

As long as necessary, but no longer. Most well-configured agents 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 — they're rarely rendered correctly in prompt context.

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

Instructions tell the agent *how* to behave — its goals, tone, and handling of scenarios. Knowledge provides factual content the agent 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/agent-overview/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 Agent Editor.


---

# Agent Instructions: 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:

```
GET https://docs.spara.com/agents/agent-overview/ai-instructions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
