Conceptual retrieval contract
Context arrives with the facts needed to use it responsibly
The exact API shape depends on the deployment and domain configuration. The contract below describes the boundary an AI application should be able to rely on.
request = {
"tenant_id": "tenant_acme",
"actor": {"role": "credit_analyst"},
"subject": "borrower_123",
"purpose": "prepare_credit_memo",
"as_of": "2026-09-16T14:30:00Z"
}
response = {
"decision": "allow",
"facts": [{"value": "...", "source_id": "filing_456", "approval_state": "approved"}],
"policy_version": "lending-default-v3",
"audit_event_id": "evt_789"
}Implementation boundary: routes and agents should not query storage directly. Repositories own tenant-filtered queries, services own business logic, and the policy engine is called before memory is read.