Memorylayer

Hosted memory runtime for agents

API explorer

Know the shape before you wire it.

Memorylayer exposes plain HTTP endpoints for service discovery, workspace memory, ingestion, and the hosted MCP bridge. These fixtures show the contract without needing a live key.

12

request and response fixtures

2

auth modes: public discovery and workspace key

HTTP

no required vendor SDK or local daemon

discover ingest recall handoff
PublicManifest, capabilities, examples, and MCP tool catalog.
PrivateWorkspace memory routes require a workspace API key.
BridgeUse { tool, args } for the hosted MCP-compatible call path.

Request fixtures

These examples are stable enough for docs, generated clients, and agent setup screens.

Use JSON
GET public

Service status

Check whether the hosted service is alive and read public counts.

/api/service/status

No request body
{ "capabilities": 230, "database": "postgres", "features": 29, "mcp_tools": 60, "runtime": "vps", "service": "memorylayer", "status": "ok" }
GET public

Service manifest

Load the route map and public integration counts for client setup screens.

/api/service/manifest

No request body
{ "counts": { "api_examples": 12, "capabilities": 250 }, "routes": { "api_examples": "https://memorylayer.run/api/examples", "docs": "https://memorylayer.run/docs", "mcp_manifest": "https://memorylayer.run/api/mcp/manifest" }, "service": "memorylayer" }
GET public

MCP manifest

Discover grouped tools, auth headers, and workspace bridge URL templates.

/api/mcp/manifest

No request body
{ "auth": [ "Authorization: Bearer \u003cworkspace-api-key\u003e", "X-API-Key: \u003cworkspace-api-key\u003e" ], "tool_groups": [ { "name": "Retrieval", "tools": [ { "name": "recall_context" } ] } ], "transport": "http-json", "workspace_call_url_template": "https://memorylayer.run/api/workspaces/{slug}/mcp" }
GET workspace key

Workspace bootstrap

Fetch workspace-specific URLs, headers, starter skills, and tool discovery.

/api/workspaces/{slug}/bootstrap

No request body
{ "auth": { "headers": [ "Authorization: Bearer \u003cworkspace-api-key\u003e", "X-API-Key: \u003cworkspace-api-key\u003e" ] }, "endpoints": { "mcp": "https://memorylayer.run/api/workspaces/demo/mcp" }, "skills": [ { "name": "workspace-memory" } ], "workspace": { "slug": "demo" } }
GET workspace key

Connection kit

Return a normalized client profile with endpoints, MCP config, skills, and startup calls.

/api/workspaces/{slug}/connect

No request body
{ "endpoints": { "mcp": "https://memorylayer.run/api/workspaces/demo/mcp" }, "service": { "base_url": "https://memorylayer.run", "name": "Memorylayer" }, "startup_calls": [ { "method": "GET", "name": "bootstrap" } ], "workspace": { "slug": "demo" } }
GET workspace key

Env template

Return a plain text env block for local scripts, workers, and agent launchers.

/api/workspaces/{slug}/env

No request body
{ "text": "MEMORYLAYER_URL=\"https://memorylayer.run\"\nMEMORYLAYER_WORKSPACE=\"demo\"\nMEMORYLAYER_KEY=\"engram_...\"" }
POST workspace key

Recall context

Ask the bridge for compact context before an agent starts work.

/api/workspaces/{slug}/mcp

{ "args": { "max_tokens": 1200, "query": "current project state" }, "tool": "recall_context" }
{ "ok": true, "result": "Relevant memory context...", "tool": "recall_context" }
POST workspace key

Session checkpoint

Save a compact handoff after meaningful work or deployment.

/api/workspaces/{slug}/mcp

{ "args": { "limit": 8, "note": "Shipped API explorer" }, "tool": "session_checkpoint" }
{ "ok": true, "result": { "saved": true }, "tool": "session_checkpoint" }
POST workspace key

Batch ingest

Import notes, transcripts, reports, or pipeline output as memories.

/api/workspaces/{slug}/ingest

{ "items": [ "Release deployed", "Next: test onboarding" ], "memory_type": "fact", "source_name": "handoff.md", "source_type": "handoff" }
{ "memory_ids": [ "mem_1", "mem_2" ], "ok": true, "run": { "items": 2, "source_name": "handoff.md" } }
GET workspace key

Usage feed

Read recent API calls, per-route totals, and key activity.

/api/workspaces/{slug}/usage

No request body
{ "recent_events": [ { "route": "/api/workspaces/demo/mcp", "status_code": 200 } ], "route_counts": [ { "count": 14, "route": "/api/workspaces/demo/mcp" } ] }
GET workspace key

Recent export

Export the latest workspace memories for backup, inspection, or migration checks.

/api/workspaces/{slug}/export/recent

No request body
{ "memories": [ { "content": "API explorer deployed", "layer": "episodic", "memory_type": "fact" } ], "workspace": "demo" }
POST workspace key

Error shape

All service errors return a direct detail message that clients can show or log.

/api/workspaces/{slug}/mcp

{ "args": {}, "tool": "unknown_tool" }
{ "detail": "Unsupported tool: unknown_tool" }

Client rule

Start with `/api/service/manifest`, then choose either direct workspace routes or the MCP bridge. Keep workspace keys server-side when possible.