> ## Documentation Index
> Fetch the complete documentation index at: https://docs.alongagents.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Safe Context

> Use instruction fields to control how Along builds your knowledge graph and how the AI answers questions.

Every Safe has two instruction fields that give you control over the AI's behavior at different stages: `ingestionInstructions` and `instructions`.

* **`ingestionInstructions`** — evaluated at graph build time, when content is added to the Safe. Controls what the knowledge graph captures.
* **`instructions`** — evaluated at retrieval and agent time, when the AI answers a question. Controls how answers are formed.

<CardGroup cols={2}>
  <Card title="Ingestion instructions" icon="database" href="/safe-context/ingestion-instructions">
    Guide graph construction: what entities to extract, what to skip, and how to weight relationships.
  </Card>

  <Card title="Retrieval instructions" icon="brain" href="/safe-context/retrieval-instructions">
    Shape AI answers: tone, scope constraints, source prioritization, and behavioral rules.
  </Card>
</CardGroup>

<Note>
  Both fields accept plain text up to 100,000 characters. You can update them at any time from the Along dashboard or via the API — no re-deployment required.
</Note>

## How they work together

Ingestion shapes the graph structure; retrieval instructions shape how the graph is queried and how answers are composed. Think of ingestion as "what to remember" and retrieval as "how to think."

When a document is added to a Safe, Along runs extraction using `ingestionInstructions` as guidance. The resulting knowledge graph reflects those choices — which entities were captured, which relationships were created, what was skipped. Later, when an AI assistant connects to the Safe via MCP and asks a question, `instructions` travel with every response, telling the AI how to reason over and present what the graph contains.

Neither field depends on the other. You can use one, both, or neither. But used together, they give you precise control over the full lifecycle: from raw content into structured knowledge, and from structured knowledge into useful answers.
