API Reference

Base URL: https://0l1lfs30sk.execute-api.us-east-1.amazonaws.com

All endpoints are prefixed with /v1/.

Authentication

Pass your API key as a Bearer token on every request.

Authorization: Bearer mnm_your_api_key_here

GET /v1/health does not require authentication.

Response envelope

Success:

{
  "data": { ... },
  "meta": {
    "request_id": "req_01j...",
    "latency_ms": 14
  }
}

Error:

{
  "error": {
    "code": "NOT_FOUND",
    "message": "No state found for agent agent-1"
  },
  "meta": {
    "request_id": "req_01j...",
    "latency_ms": 8
  }
}

Health

GET /v1/health

Check API availability. No authentication required.

curl https://0l1lfs30sk.execute-api.us-east-1.amazonaws.com/v1/health

Response 200:

{ "data": { "status": "ok" }, "meta": { "request_id": "...", "latency_ms": 2 } }

Working memory

Working memory is backed by DynamoDB. All operations are sub-10ms.

POST /v1/state

Store or overwrite agent state for a session.

curl -X POST https://0l1lfs30sk.execute-api.us-east-1.amazonaws.com/v1/state \
  -H "Authorization: Bearer mnm_..." \
  -H "Content-Type: application/json" \
  -d '{
    "agent_id": "agent-1",
    "session_id": "sess-001",
    "data": { "task": "summarize report", "step": 1 },
    "ttl_hours": 24
  }'

Body parameters:

FieldTypeRequiredDescription
agent_idstringYesAgent identifier
dataobjectYesArbitrary JSON key-value payload
session_idstringNoSession label. Defaults to "default"
ttl_hoursintegerNoHours until automatic expiry. Omit for no expiry

Response 201: Returns a StateResponse with version: 1.


GET /v1/state/{agent_id}

Retrieve current state for an agent.

curl https://0l1lfs30sk.execute-api.us-east-1.amazonaws.com/v1/state/agent-1 \
  -H "Authorization: Bearer mnm_..."

Query parameters:

ParameterTypeDescription
session_idstringFilter to a specific session. Defaults to "default"

Response 200:

{
  "data": {
    "agent_id": "agent-1",
    "session_id": "sess-001",
    "data": { "task": "summarize report", "step": 1 },
    "version": 1,
    "created_at": "2026-03-02T10:00:00Z",
    "updated_at": "2026-03-02T10:00:00Z",
    "expires_at": "2026-03-03T10:00:00Z"
  },
  "meta": { "request_id": "...", "latency_ms": 7 }
}

GET /v1/state/{agent_id}/sessions

List all session IDs for an agent.


PUT /v1/state/{agent_id}

Update state with optimistic locking. Pass the version from a prior GET or POST. The server rejects the update with 409 if the record was modified concurrently.

Body parameters:

FieldTypeRequiredDescription
dataobjectYesNew state payload (replaces existing)
versionintegerYesExpected current version
session_idstringNoTarget session. Defaults to "default"
ttl_hoursintegerNoNew TTL

Response 200: Returns StateResponse with incremented version. Error 409: Version mismatch — re-read and retry.


DELETE /v1/state/{agent_id}/{session_id}

Delete a specific session's state record.

Response 204: No content. Error 404: Session not found.


Semantic memory

Semantic memory is backed by Aurora Serverless v2 with pgvector. Content is automatically embedded via Bedrock Titan.

POST /v1/memory/semantic

Store text content as a semantic memory entry. The server generates and stores the embedding automatically. Duplicate content (cosine similarity > 0.95) is merged rather than re-inserted.

Body parameters:

FieldTypeRequiredDescription
agent_idstringYesAgent identifier
contentstringYesText to embed and store
namespacestringNoLogical partition. Defaults to "default"
metadataobjectNoArbitrary metadata to attach

POST /v1/memory/semantic/search

Search semantic memory by natural-language query.

Body parameters:

FieldTypeRequiredDefaultDescription
querystringYesNatural-language search string
agent_idstringNoRestrict to one agent
namespacestringNoRestrict to a namespace
top_kintegerNo10Maximum results
thresholdfloatNo0.7Minimum cosine similarity (0–1)
metadata_filterobjectNoExact-match filter on metadata fields

GET /v1/memory/semantic/{id}

Retrieve a semantic memory record by UUID.

Error 404: Record not found or soft-deleted.


DELETE /v1/memory/semantic/{id}

Soft-delete a semantic memory record. Sets valid_until to now.

Response 204: No content.


Episodic memory

Episodic memory is backed by DynamoDB (hot tier) and S3 (cold tier). Records are immutable after creation.

Episode types: conversation, action, observation, tool_call

POST /v1/memory/episodic

Append a time-stamped episode.

Body parameters:

FieldTypeRequiredDescription
agent_idstringYesAgent identifier
session_idstringYesSession identifier
typestringYesOne of: conversation, action, observation, tool_call
contentanyYesEpisode payload — text or JSON object
metadataobjectNoArbitrary metadata

GET /v1/memory/episodic/{agent_id}

Query episodes with optional time-range and type filters.

Query parameters:

ParameterTypeDescription
session_idstringFilter to a specific session
typestringFilter to an event type
fromISO 8601Lower bound timestamp (inclusive)
toISO 8601Upper bound timestamp (inclusive)
limitintegerMaximum episodes to return

GET /v1/memory/episodic/{agent_id}/sessions/{session_id}

Replay all episodes for a session in chronological order.


POST /v1/memory/episodic/{agent_id}/summarize

Compress episodic memory into semantic memories.


Unified

POST /v1/memory

Auto-route a memory store request by payload shape.

GET /v1/memory/{agent_id}

Retrieve all memory types for an agent in one call.

POST /v1/memory/search

Search across semantic and episodic memory simultaneously.

DELETE /v1/memory/{agent_id}

Permanently delete all data for an agent. Irreversible.


Usage

GET /v1/usage

Retrieve current billing-period metrics.


Error codes

HTTP statusCodeMeaning
400VALIDATION_ERRORRequest body failed validation
401UNAUTHORIZEDAPI key is missing, malformed, or revoked
403FORBIDDENAPI key does not have access to the resource
404NOT_FOUNDResource does not exist
409CONFLICTVersion mismatch on PUT /v1/state
413PAYLOAD_TOO_LARGERequest body exceeds limit
429RATE_LIMITEDRate limit exceeded. SDK retries automatically
500INTERNAL_ERRORServer-side error. Retrying is safe

Rate limits

PlanRequests per day
Free1,000
Starter10,000
Pro100,000
Scale1,000,000