Skip to content

API Tokens

API tokens let scripts, CI/CD pipelines, and third-party tools authenticate to Memory without an interactive login. Tokens are scoped to a project and carry only the permissions you grant.

All tokens use the prefix emt_ (e.g. emt_abc123...). Tokens are:

  • Scoped to a specific project
  • Revocable at any time
  • Auditable — lastUsedAt tracks recent activity
  • Stored as a bcrypt hash — the plaintext value is only shown at creation

Terminal window
memory tokens create \
--name "CI/CD Pipeline" \
--scopes "documents:read,search,agents:write" \
--project my-project

The CLI also accepts presets: --scopes read (the read-only set), --scopes write (the write set, which also implies the matching reads) or --scopes read,write for both.


Scope Access
documents:read Read documents
documents:write Create and update documents
documents:delete Delete documents
ingest:write Trigger document ingestion/parsing
chunks:read Read document chunks
chunks:write Create and update chunks
graph:read Read graph objects
graph:write Create and update graph objects
graph:search:read Graph vector search
search Run hybrid and semantic search (MCP)
search:read Unified REST search
journal:read Read the project journal
extraction:read View extraction jobs
extraction:write Manage extraction jobs
tasks:read Read tasks
tasks:write Resolve and cancel tasks
notifications:read Read notifications
notifications:write Mark notifications as read
user-activity:read View the activity log
user-activity:write Write activity entries
schema:read Read type definitions and template packs
schema:write Install and modify schemas
agents:read Read agents, runs, definitions, questions
agents:write Trigger agents, respond to questions, manage hooks
projects:read Read project metadata and members
projects:write Update project settings and members

Assign only the scopes your integration needs. The full list, including branch, skill and admin scopes, is in Security and Scopes.

The CLI also accepts two presets: --scopes read (the read-only set above) and --scopes write (documents, graph, schema, agents and project writes, plus the REST write scopes the retired data:write umbrella used to imply). Combine them with --scopes read,write.


Terminal window
memory --project-token emt_abc123... agents list
# or via environment variable:
export MEMORY_PROJECT_API_KEY=emt_abc123...
memory agents list

Terminal window
memory tokens list --project my-project
GET /api/projects/{projectId}/tokens

Response shows token metadata but never the plaintext value. Use tokenPrefix to identify which token is which.


Terminal window
memory tokens revoke <token-id> --project my-project
DELETE /api/projects/{projectId}/tokens/{tokenId}

The token is invalidated immediately. Any requests using it will receive 401 Unauthorized.


# GitHub Actions
- name: Trigger nightly agent
run: |
memory agents trigger $AGENT_ID --project $PROJECT_ID
env:
MEMORY_SERVER_URL: https://api.example.com
MEMORY_PROJECT_API_KEY: ${{ secrets.MEMORY_TOKEN }}