Memorylayer

Hosted memory runtime for agents

Examples

Real calls for real agents.

Use these snippets to connect an agent, ingestion job, or monitoring script to a hosted Memorylayer workspace.

VariablesSet MEMORYLAYER_URL, SLUG, and MEMORYLAYER_KEY first.
AuthUse Authorization: Bearer or X-API-Key.
ObserveEvery authenticated call appears in workspace usage.

Copyable recipes

Each recipe maps to a concrete hosted feature.

Codex-style handoff

Load bootstrap Recall recent context Work normally Remember outcome
curl -H "Authorization: Bearer $MEMORYLAYER_KEY" "$MEMORYLAYER_URL/api/workspaces/$SLUG/bootstrap"

Hosted MCP bridge

List bridge tools POST tool name and args Store audit trail
curl -X POST -H "Authorization: Bearer $MEMORYLAYER_KEY" -H "Content-Type: application/json" -d '{"tool":"recall_recent","args":{"limit":5}}' "$MEMORYLAYER_URL/api/workspaces/$SLUG/mcp"

Ingestion pipeline

Create a service key POST memories Watch usage events
curl -X POST -H "Authorization: Bearer $MEMORYLAYER_KEY" -H "Content-Type: application/json" -d '{"content":"Deployment completed","layer":"episodic","memory_type":"fact"}' "$MEMORYLAYER_URL/api/workspaces/$SLUG/remember"

Usage monitor

Poll usage endpoint Group by route Rotate quiet or noisy keys
curl -H "Authorization: Bearer $MEMORYLAYER_KEY" "$MEMORYLAYER_URL/api/workspaces/$SLUG/usage"

Environment block

A shared setup block for shell scripts and agent launchers.

export MEMORYLAYER_URL="https://memorylayer.run" export SLUG="your-workspace" export MEMORYLAYER_KEY="engram_..."