Skip to main content
This quickstart takes one agent from zero to a delivered context: a key, the SDK, a first conversation recorded, the context read back and a search in the history. It takes about ten minutes in a sandbox space, which never mixes with production data.

1. Get a key

Every agent, vendor or system that talks to Niadra is a source, with its own keys, scopes and purpose. Create a source for your agent in the Console, or through the control API, and create a key with the track, context and search scopes. A key looks like this:
test keys reach sandbox spaces and live keys reach production spaces. The region and the space in the key tell the SDK where to go: https://acme-sandbox.us-east-1.api.niadra.com. The secret is shown once; keep it in your secret manager and expose it to the agent as an environment variable.

2. Install the SDK

Both SDKs are open source under Apache 2.0. For plain HTTP there is nothing to install: every call below also has a cURL version.

3. Record a conversation

A conversation session pins the context, captures the turns and sends conversation.ended when it closes. Writes go to a local queue and leave in batches, so they never slow the agent down.
The API answers 200 when every item went in, or 207 when some were rejected, always with accepted, duplicates and one error per rejected item: a bad item never fails the batch. Sending the same idempotency_key again is safe; it is counted as a duplicate and stored once.

4. Read the context

Now a voice agent picks up a call from the same number. It asks for the context before it says hello:
Put text in the system prompt, after your own instructions. The WhatsApp message from a moment ago is already there: turns are readable by every agent in under a second, and the derived memory (open items, facts, the episode) follows within a minute after the session ends.
Call context() while the phone is still ringing, or as soon as the message arrives. The SDK keeps its own time budget (150 ms for voice, 300 ms for other views), so a slow answer never delays your agent: it gets an empty context and carries on.

5. Search the history

When the customer says “last time you gave me a credit”, the agent looks it up:
To let your LLM decide when to search, hand it the tool kit instead: niadra.tools(marina, conversation_id="call-4471") returns function definitions bound to Marina, and routes the model’s calls back to Niadra. See History navigation.

6. Check what happened

Every read left a receipt: which source read, which items it received and which were withheld, under which policy. Open the Console to see the reads of this conversation, or list them with GET /v1/receipts as a person with the security role or with a key that has the admin scope.

Next steps

Spaces and keys

Sources, scopes, environments and the stable address.

Events and the batch

Messages, system events and actions in one format.

Voice agents

Context before hello, network attestation and handoff.

Internal agents

Tasks, objects and actions that close open items.