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

# Context Engine

> Every conversation makes the next one better - one memory per customer, from the live turn to outcome history.

Start with the person, not the request. Someone reaches out; Unpod knows who
they are and what happened before; the agent picks up from there; and the
outcome is remembered for next time. The Context Engine is that memory.

Context is the one input a competitor cannot buy, scrape or copy - and you
keep it. It comes in five tiers, from hot and fast at the top to persistent
and compounding at the bottom:

Live turn
This call, right now
Production

Session memory
Active context across the conversation
Production

Customer context
Every touch with this person
Per call: productionCross-channel: in build

Organisation knowledge
Products, policies, FAQs
Production

Outcome history
Every result, kept
As data: productionAs memory: in build

↑ Hot · fastPersistent · compounding ↓

## Use it today

| Tier | How you use it today |
| - | - |
| Live turn, session memory | Automatic: the runtime carries turn history through the conversation. A bring-your-own brain keeps its own history in its adapter. |
| Customer context | Pass what you know as call data (below), or as Space People columns. Turn on **Enable Memory** (Agent Studio → Advanced) and the agent recalls past calls with the same number - per agent, per number, voice only. Enable Memory applies to Agent Studio agents; SDK agents dialed with `client.calls.create` cannot turn on past-call memory yet (in build). |
| Organisation knowledge | Upload documents to a [knowledge base](https://docs.unpod.ai/platform/studio-view/knowledge-base.md) and attach it to the agent; the agent retrieves from it mid-call. |
| Outcome history | Every completed call produces structured [post-call data](https://docs.unpod.ai/api/post-call-data.md), by webhook or API. SDK agents read [analytics blocks](https://docs.unpod.ai/speech-stack/analytics.md) with `client.analytics.for_call(call_id)`. |

```python call_with_context.py theme={null}
import asyncio
from unpod import AsyncClient

async def main() -> None:
    async with AsyncClient() as client:
        call = await client.calls.create(
            agent_id="my-support",
            to_number="+9188473xxxxx",
            data={"name": "Priya", "plan": "Gold", "last_order": "ORD-1042"},
        )
        print(call.call_id, call.status)

asyncio.run(main())
```

## In build

* Cross-channel identity, and one timeline per person across call, WhatsApp,
  SMS and email.
* Facts with provenance, a time-to-live and sensitivity levels, scoped per
  organisation, with organisation-level erase.
* Outcome history read back as memory by the next interaction, on any
  channel.

## On the spine

Context underlies the spine from entity through outcome. The Context Engine
reads entity records, conversation history and structured outcomes, and the
next interaction reads it before the agent speaks. Each interaction's outcome
feeds the next one.

## What stays hidden

The embedding and vector implementation. Which models embed what, how the
index is built and how similarity is scored are internals we tune and swap
freely. You work with call data, knowledge, memory and outcomes - never with
vectors.

## Status

**Production** on voice: live turn, session memory, per-call customer
context with memory of past calls on Agent Studio agents, knowledge-base
retrieval, and post-call outcomes. **In build:** cross-channel context, the
facts layer with provenance, and outcome history as memory.

## Go deeper

> **[Knowledge Base](https://docs.unpod.ai/platform/studio-view/knowledge-base.md)**
>
> Organisation knowledge, attached to an agent.

> **[Post-call data](https://docs.unpod.ai/api/post-call-data.md)**
>
> The structured outcome of every call.

> **[People & identity](https://docs.unpod.ai/core-engine/entities.md)**
>
> The record context attaches to.

> **[Own your model](https://docs.unpod.ai/core-engine/intelligence.md)**
>
> Where outcome history goes next.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.