Skip to main content
The AMFS REST API gives you full access to agent memory from any language or service. Base URL: https://amfs-login.sense-lab.ai (or your custom domain from Dashboard → Settings) Authentication: Include your API key in every request:
X-AMFS-API-Key: <your-api-key>

Entries

MethodPathDescription
POST/api/v1/entriesWrite a new entry
GET/api/v1/entries/{entity_path}/{key}Read an entry
GET/api/v1/entriesList entries
GET/api/v1/entries/{entity_path}/{key}/historyVersion history
POST/api/v1/searchSearch with filters
All entry endpoints accept a branch parameter (defaults to main).

Write

curl -X POST https://amfs-login.sense-lab.ai/api/v1/entries \
  -H "Content-Type: application/json" \
  -H "X-AMFS-API-Key: <your-api-key>" \
  -d '{
    "entity_path": "checkout-service",
    "key": "retry-pattern",
    "value": {"max_retries": 3, "backoff": "exponential"},
    "confidence": 0.85
  }'

Read

curl https://amfs-login.sense-lab.ai/api/v1/entries/checkout-service/retry-pattern \
  -H "X-AMFS-API-Key: <your-api-key>"
curl -X POST https://amfs-login.sense-lab.ai/api/v1/search \
  -H "Content-Type: application/json" \
  -H "X-AMFS-API-Key: <your-api-key>" \
  -d '{"entity_path": "checkout-service", "min_confidence": 0.5, "limit": 10}'

Outcomes

MethodPathDescription
POST/api/v1/outcomesCommit an outcome (back-propagates confidence)
GET/api/v1/outcomesList all outcomes
curl -X POST https://amfs-login.sense-lab.ai/api/v1/outcomes \
  -H "Content-Type: application/json" \
  -H "X-AMFS-API-Key: <your-api-key>" \
  -d '{"outcome_ref": "DEP-287", "outcome_type": "success"}'

Decision Traces

MethodPathDescription
GET/api/v1/tracesList traces with enriched data
GET/api/v1/traces/{trace_id}Full trace detail

Agents & Timeline

MethodPathDescription
GET/api/v1/agentsList agents with entry counts and last activity
GET/api/v1/agents/{agent_id}/memory-graphEntity relationship graph
GET/api/v1/agents/{agent_id}/activityActivity timeline
GET/api/v1/agents/{agent_id}/timelineGit-like event log

Memory Cortex

MethodPathDescription
GET/api/v1/briefingRanked knowledge digests for an entity or agent
GET/api/v1/cortex/statusCortex status and digest counts
GET/api/v1/cortex/digestsAll compiled digests
POST/api/v1/eventsIngest an external event

Get a briefing

curl "https://amfs-login.sense-lab.ai/api/v1/briefing?entity_path=checkout-service" \
  -H "X-AMFS-API-Key: <your-api-key>"

Branching (Pro)

MethodPathDescription
POST/api/v1/branchesCreate a branch
GET/api/v1/branchesList branches
GET/api/v1/branches/{name}/diffDiff branch vs. main
POST/api/v1/branches/{name}/mergeMerge into main
POST/api/v1/pull-requestsCreate a pull request
GET/api/v1/pull-requestsList pull requests
POST/api/v1/tagsCreate a snapshot tag
POST/api/v1/rollbackRollback to a point in time
POST/api/v1/forkFork memory to a new agent

Real-time Streaming

Subscribe to memory events via Server-Sent Events:
curl -N "https://amfs-login.sense-lab.ai/api/v1/stream" \
  -H "X-AMFS-API-Key: <your-api-key>"
event: memory_write
data: {"entity_path": "checkout-service", "key": "retry-pattern", "version": 2, ...}

event: outcome
data: {"outcome_ref": "DEP-287", "outcome_type": "success", ...}

Admin

MethodPathDescription
GET/api/v1/admin/api-keysList API keys
POST/api/v1/admin/api-keysCreate an API key
DELETE/api/v1/admin/api-keys/{key_id}Revoke a key
GET/api/v1/admin/auditAudit log
GET/api/v1/admin/teamsList teams
POST/api/v1/admin/teamsCreate a team
GET/api/v1/admin/patternsList detected patterns
POST/api/v1/admin/patterns/scanRun pattern detection

Python Client

import httpx

client = httpx.Client(
    base_url="https://amfs-login.sense-lab.ai",
    headers={"X-AMFS-API-Key": "<your-api-key>"},
)

client.post("/api/v1/entries", json={
    "entity_path": "myapp/auth",
    "key": "session-timeout",
    "value": "30m",
    "confidence": 0.9,
})

entry = client.get("/api/v1/entries/myapp/auth/session-timeout").json()
For Python, the SDK with AMFS_HTTP_URL set is simpler than raw HTTP calls. See the Python guide.