TMCRAAPI DocumentationConsole

TMCRA MEMORY API / v0.2.0

Persistent memory for production AI agents.

Turn ordered conversation events into tenant-isolated, temporal, prompt-ready evidence. TMCRA owns memory; your application keeps control of the agent runtime and final answer model.

Production base URLhttps://api.tmcra.comLive schema
Protocol
HTTPS / JSON
Authentication
Bearer token
Write model
Asynchronous jobs
Recall output
Evidence, not answers
01

Quickstart

Write once, then recall with read-your-writes.

  1. 1

    Keep credentials on your server

    Use the root key only in trusted infrastructure. Issue scoped tokens for integrations.

  2. 2

    Choose a stable scope

    Map a tenant user, persona, or workspace to one durable opaque scope_name.

  3. 3

    Ingest idempotently

    Send ordered messages with stable message IDs and an Idempotency-Key.

  4. 4

    Recall before the model call

    Pass prompt_evidence.content to the answer model together with recent conversation context.

curl -X POST "$TMCRA_BASE_URL/v1/scopes/user_123/ingest" \
  -H "Authorization: Bearer $TMCRA_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: ingest-session-42-v1" \
  -d '{
    "session_id": "session_42",
    "consistency": "read_your_writes",
    "slow_policy": "auto",
    "messages": [{
      "message_id": "msg_001",
      "role": "user",
      "content": "I prefer concise answers.",
      "timestamp": "2026-07-16T08:00:00Z"
    }]
  }'
02

Identity and isolation

Tenant, scope, and session are different boundaries.

tenant

The billing, credential, and administrative boundary identified by a root API key.

scope_name

The durable memory isolation boundary for one user, persona, or workspace.

session_id

One ordered conversation inside a scope. It is not inferred from message text.

03

Consistency

Successful messages commit once; later stages are recoverable.

ModeUse whenBehavior
eventualThe next turn does not depend on this write.Returns an async job immediately.
read_your_writesThe next recall must include committed data.Wait for the job, then pass wait_for_job_id to recall.

A successful committed message is not replayed because graph evolution, indexing, webhook delivery, or a caller-owned answer operation later fails.

04

Webhooks

Signed lifecycle notifications with content-safe payloads.

Webhook delivery is at least once. Verify the HMAC-SHA256 signature, deduplicate by event ID, and return a successful response quickly. Payloads contain sanitized job and scope metadata, never prompts, messages, evidence, or credentials.

job.succeededjob.failedjob.cancelledingest.completedconsolidation.completedindex.completedexport.readyscope.deleted
05

Errors and retries

Retry by operation semantics, not by status alone.

StatusCaller action
400 / 422Fix validation or request semantics before retrying.
401 / 403Replace or re-scope the credential; do not retry unchanged.
404The resource does not exist or is outside this credential boundary.
409Inspect lifecycle, idempotency, or consistency conflict details.
429Honor Retry-After and reuse the same idempotency key.
5xxRetry only GETs and idempotent writes with bounded backoff.
06

SDKs and adapters

Use the stable contract directly; evaluate packages by release status.

Python SDKPREVIEW · tmcra-client

Typed sync and async clients available for pilot evaluation.

TypeScript SDKPREVIEW · @tmcra/typescript

A testable fetch client whose package surface may still change.

MCP ServerPREVIEW · stdio

A local compatibility bridge for approved test deployments.

LangGraphPILOT SOURCE · TMCRALangGraphMemory

Validated source adapter; no generally published package is promised.

OpenAI Agents SDKPILOT SOURCE · TMCRAAgentsMemory

Validated source adapter available through approved pilots.

Vercel AI SDKPILOT SOURCE · LanguageModelV3Middleware

Validated source middleware available through approved pilots.

Microsoft Agent FrameworkPILOT SOURCE · TmcraAIContextProvider

Validated source provider available through approved pilots.

Open platform integration guide
07

API reference

32 documented API operations.

Credentials

Issue, inspect, and revoke least-privilege access tokens.

05
GET/v1/sessionGet authenticated session

Returns the authenticated tenant, credential identity, permissions, and allowed memory scopes for the current Token.

Inspect OpenAPI schema
GET/v1/access-tokensList access tokens

Returns token metadata for the current tenant. This listing never includes token secrets.

Inspect OpenAPI schema
POST/v1/access-tokensIssue an access token

Creates an expiring token with explicit permissions and a scope allowlist.

Inspect OpenAPI schema
POST/v1/access-tokens/{token_id}/confirmConfirm provisional token delivery

Idempotently activates the full lifetime of a provisionally delivered Token.

Inspect OpenAPI schema
DELETE/v1/access-tokens/{token_id}Revoke an access token

Revokes one tenant-owned token immediately.

Inspect OpenAPI schema

Memory

Ingest conversation events, recall evidence, and trigger slow-memory evolution.

06
POST/v1/scopes/{scope_name}/ingestIngest memory events

Commits one session of ordered messages through the durable asynchronous writer chain.

Inspect OpenAPI schema
POST/v1/scopes/{scope_name}/ingest/batchBulk ingest

Atomically reserves capacity and idempotency for up to 100 independent ingest items.

Inspect OpenAPI schema
POST/v1/scopes/{scope_name}/recallRecall memory

Returns structured evidence and bounded prompt_evidence for the caller's answer model.

Inspect OpenAPI schema
POST/v1/scopes/{scope_name}/consolidateConsolidate slow memory

Queues policy-gated slow-memory evolution for a scope.

Inspect OpenAPI schema
GET/v1/scopesList memory scopes

Lists the scopes visible to the current credential, optionally filtered by an allowed prefix.

Inspect OpenAPI schema
GET/v1/scopes/{scope_name}/summaryGet scope summary

Returns server-recorded ingest, recall, message, and session activity for one scope.

Inspect OpenAPI schema

Jobs

Observe and control asynchronous work without replaying successful writes.

03
GET/v1/jobs/{job_id}Get job

Returns the current state, result, or typed error for an asynchronous job.

Inspect OpenAPI schema
POST/v1/jobs/{job_id}/cancelCancel job

Requests cancellation for work that has not reached a terminal state.

Inspect OpenAPI schema
POST/v1/jobs/{job_id}/retryRetry failed job

Creates a new bounded retry for an eligible failed job.

Inspect OpenAPI schema

Memory graph

Inspect slow memory first, then expand Fast and Source evidence lazily.

04
GET/v1/scopes/{scope_name}/memory-graphGet graph overview

Returns a paginated slow-memory-first graph overview and layer counts.

Inspect OpenAPI schema
GET/v1/scopes/{scope_name}/memory-graph/nodes/{memory_id}/neighborsExpand graph neighbors

Lazily expands related Slow, Fast, and Source nodes around one memory.

Inspect OpenAPI schema
GET/v1/scopes/{scope_name}/memory-graph/nodes/{memory_id}/evidenceRead source evidence

Returns explicitly requested verbatim Source evidence and provenance.

Inspect OpenAPI schema
POST/v1/scopes/{scope_name}/memory-graph/traceTrace recall

Runs the production recall planner and returns routing diagnostics without an answer-model call.

Inspect OpenAPI schema

Governance

Export, retain, delete, reopen, and evaluate memory scopes.

07
POST/v1/scopes/{scope_name}/exportsCreate scope export

Queues a consistent portable export of scope-owned memory data.

Inspect OpenAPI schema
GET/v1/scopes/{scope_name}/exports/{export_id}Download scope export

Downloads a completed export from the same tenant and scope boundary.

Inspect OpenAPI schema
GET/v1/scopes/{scope_name}/retentionGet retention policy

Returns the effective inactivity retention policy for a scope.

Inspect OpenAPI schema
PUT/v1/scopes/{scope_name}/retentionSet retention policy

Enables, disables, or changes inactivity-based retention from 1 to 3650 days.

Inspect OpenAPI schema
POST/v1/scopes/{scope_name}/feedbackSubmit recall feedback

Records helpful, incorrect, stale, unsafe, or missing evidence feedback.

Inspect OpenAPI schema
DELETE/v1/scopes/{scope_name}Delete scope

Queues physical artifact deletion while preserving lifecycle and audit tombstones.

Inspect OpenAPI schema
POST/v1/scopes/{scope_name}/reopenReopen deleted scope

Returns an eligible tombstoned scope to active without restoring deleted artifacts.

Inspect OpenAPI schema

Webhooks

Receive signed lifecycle events without exposing memory content.

03
GET/v1/webhooksList webhooks

Lists endpoint metadata and subscribed events without revealing signing secrets.

Inspect OpenAPI schema
POST/v1/webhooksCreate webhook

Registers an HTTPS endpoint and returns its HMAC signing secret once.

Inspect OpenAPI schema
DELETE/v1/webhooks/{endpoint_id}Disable webhook

Disables one tenant-owned delivery endpoint.

Inspect OpenAPI schema

Usage

Read tenant-level usage and cost ledger data.

04
PUT/v1/usage/entitlements/{subject}Set subject entitlements

Sets authoritative ingest-token and recall-request limits for one subject.

Inspect OpenAPI schema
GET/v1/usage/quotaGet quota

Returns server-authoritative usage, limits, and remaining quota for the authenticated principal or an authorized subject.

Inspect OpenAPI schema
PUT/v1/usage/quotaSet quota entitlement

Updates authoritative quota limits for an explicitly selected subject.

Inspect OpenAPI schema
GET/v1/usage/costsGet usage costs

Returns the tenant cost ledger for operational accounting and limits.

Inspect OpenAPI schema