Skip to main content
POST
Python

Authorizations

Authorization
string
header
required

nia_sk_...

Body

application/json

Pass exactly one of subject, object or profile_id, and conversation_id or task_id, not both.

about
Handle · object | null

The account or partner the person acts for.

conversation_id
string | null

Pins the pack to the conversation: the same bytes on every turn.

Required string length: 1 - 512
delta
boolean
default:false

Return only what changed since this source last read this customer.

explain
boolean
default:false

With format: "json" and query: each of pack.slots also says why it was chosen (its position in each retrieval channel, each channel's weighted share of the fused score, the weights' version, the rule of a derived line). It changes nothing else: the pinned text, the slots chosen and the receipt are the same bytes with or without it.

format
enum<string>
default:text

json also returns pack: the same pack as typed sections, in the context-pack.v1 shape, for programs that build their own prompt.

Available options:
text,
json
include
enum<string>[]

Blocks read in the same round trip, each returned in the answer's field of the same name and recorded in a receipt of its own. Each needs its agent feature on in the space; without include the answer carries none of them.

Maximum array length: 4
Available options:
state,
constraints,
coordination,
budget
known_etag
string | null

The ETag you already hold. If unchanged, the answer is not_modified: true with no text.

object
ObjectRef · object | null

Center the pack on an order, ticket or invoice.

profile_id
string<uuid> | null

The pseudonymous profile instead of a handle: the read of GET /v1/context with the conversation id in the body, never in the URL.

query
string | null

The customer's last turn. It selects the per-turn slots and never the pinned text, which is the same bytes with or without it. brief and full have no slots.

Maximum string length: 2000
subject
Handle · object | null

Who the context is about. Pass subject, object or profile_id, exactly one.

target
TargetModel · object | null

The LLM that will read the pack; lets the compiler aim at its cache floor.

task_id
string | null

For internal agents, instead of conversation_id.

Required string length: 1 - 512
verification
enum<string>
default:V0

The level you request. The effective level is the lowest of this, the source ceiling and what the conversation proved.

Available options:
V0,
V1,
V2,
V3,
V4,
no_customer
view
string
default:chat
Pattern: ^(voice|chat|brief|full|custom|account|partner|task:[a-z0-9_]{1,40})$

Response

The pack, or not_modified: true when known_etag still matches.

etag
string
required
path
enum<string>
required

Which read tier answered a context() call.

Available options:
t0,
t1,
t2,
t3,
t4,
holdout,
not_modified
verification
VerificationResult · object
required
version
string
required

Generation of the pack, such as g42. The spec version of the pack as data is pack.spec; the text carries no version attribute.

about_unlinked
boolean
default:false

about named an account or partner with no active link to the subject: the pack is the subject's own, without that organization's block. It never says whether the organization exists.

as_of
string<date-time> | null

The pack reflects events up to this instant.

budget
BudgetBlock · object | null

With include: ["budget"]: what the pack costs per section, what this agent already spent in the conversation and the case, and what the measurement says can go; shown, never enforced.

cache
CacheDirectives · object | null
constraints
ConstraintsBlock · object | null

With include: ["constraints"]: what the subject wants, refuses and is, for the tools of this turn (constraints.v0).

coordination
CoordinationBlock · object | null

With include: ["coordination"]: who holds the subject, the purposes it may not be contacted for, the contacts each purpose with a budget has left and the commitments that hold. Advice for the turn: only a check decides.

coverage
SourceCoverage · object[]
degraded
boolean
default:false
delta
string | null

With delta: what memory learned since this agent's last read, for the end of the prompt. The turn block after text is live, then slots, then delta.

guards
PackGuard · object[]

What the guard lines among slots state, typed. An SDK checks the agent's answer against them and names a guard the answer went against on the agent's turn (backing.guard_violations).

lag_seconds
number | null
live
LiveTurn · object[]

Recent turns of the customer's other conversations not yet in the compiled context, oldest first: at most the newest 50, from the newest 100 turns of each of the customer's handles.

live_complete
boolean
default:true

False when the hot layer was unavailable, a turn could not be read, or a handle had more recent turns than were read.

manifest_hash
string | null

Hash of the provenance manifest behind this pack. The receipt points to it.

not_modified
boolean
default:false
pack
ContextPack · object | null

With format: "json"; absent when text is absent.

slots
string | null

With query: what the customer's last turn selected from memory for this turn. It goes in the turn block after text, in this order: the live turns, then slots, then delta. Never part of text, which stays the same bytes for the whole conversation.

state
StateView · object | null

With include: ["state"]: the subject's objects of the declared types, each as a display read serves it (object-state.v1): values with their logical value, stamps, source and freshness computed now, and what may not be claimed with them.

text
string | null

The Context Pack, ready for the prompt.

timing
Timing · object

Milliseconds per step.

variables
Variables · object

The same content as named variables, for templates.

withheld
integer
default:0

Items and live turns the policy left out for this reader and level.