> 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/concepts.md).

# Concepts

- [Architecture](https://docs.interactive.ai/agents/concepts/architecture.md): How an Interactive Agent deployment fits together: the agent server, the InteractiveAI platform, the LLM router, MCP tool servers, storage, and the knowledge base.
- [Conversation lifecycle](https://docs.interactive.ai/agents/concepts/conversation-lifecycle.md): What happens inside the engine on every turn: policy matching, routine advancement, tool execution, the iteration loop, and event emission.
- [Policies](https://docs.interactive.ai/agents/concepts/policies.md): Policies are condition → action rules matched against every turn. They encode safety, compliance, tone, and business rules that apply across all routines.
- [Routines](https://docs.interactive.ai/agents/concepts/routines.md): Routines are graphs of nodes — chat, tool, and routing-only (fork) nodes connected by transitions. This page defines the node types and their runtime completion semantics.
- [Autonomous routines](https://docs.interactive.ai/agents/concepts/autonomous-routines.md): Autonomous routines run end-to-end without a conversation: typed JSON in via trigger endpoint or webhook, typed JSON out via signed callback.
- [Priorities & entailments](https://docs.interactive.ai/agents/concepts/priorities.md): Relationship declarations between routines and policies: priorities resolve conflicts, entailments chain policy activations. Without them, everything is equal-priority and independent.
- [Glossaries & macros](https://docs.interactive.ai/agents/concepts/glossaries-and-macros.md): Glossaries inject domain vocabulary into every turn; macros are reusable text blocks interpolated into routine chat nodes via ${macro-id}.
- [Prompts, language & preamble](https://docs.interactive.ai/agents/concepts/prompts.md): The system prompt defines persona and ground rules; the language directive controls reply language; the greeting opens the first turn; the preamble shapes mid-turn filler.
- [Tools](https://docs.interactive.ai/agents/concepts/tools.md): Tools are functions the agent calls — served by your MCP servers, plus two built-ins. Covers namespacing, declaration, auth, reevaluation tools, and tool-event injection.
- [Knowledge base & retrieval](https://docs.interactive.ai/agents/concepts/knowledge-base.md): Retrieval grounding for the agent: the built-in pgvector knowledge base or an external HTTP search endpoint you own. Exactly one, selected by type.
- [Models](https://docs.interactive.ai/agents/concepts/models.md): The agent uses two independent model lanes — chat (customer-facing) and evaluation (internal decisions) — each with its own primary and fallback. The lanes never cross.
- [Sessions, memory & state](https://docs.interactive.ai/agents/concepts/memory-and-state.md): Sessions, customers, context variables, metadata, step outputs, and the storage backends that persist them.
- [Startup evaluation](https://docs.interactive.ai/agents/concepts/startup-evaluation.md): What the engine pre-computes about your routines and policies at boot, the stages it runs and the purpose of each, and why doing it once at startup keeps every turn fast.


---

# 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/concepts.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.
