Skip to main content
POST
/
api
/
v2
/
agents
/
{agent_id}
/
activate
curl -X POST "http://localhost:8000/api/v2/agents/my-agent/activate"
{
  "session_id": "9f733fdb-ebf2-494e-8eb6-fb3320d6020d",
  "session_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "agent_id": "my-agent",
  "namespace": "memanto_agent_my-agent",
  "started_at": "2026-05-09T02:40:00.313078Z",
  "expires_at": "2026-05-09T08:40:00.313078Z",
  "pattern": "support",
  "status": "active"
}

Overview

Starts a new session for the specified agent and returns a JWT session token that authorizes subsequent memory operations (remember, recall, answer, etc.). The session is initialized with the server’s default duration (typically 6 hours) and tracked in ~/.memanto/sessions/. The endpoint takes no request body; session duration is controlled by server configuration (SESSION_DEFAULT_DURATION_HOURS).

Authentication

API clients do not send an API key or Authorization header.

Path Parameters

agent_id
string
required
The unique identifier of the agent to activate.
curl -X POST "http://localhost:8000/api/v2/agents/my-agent/activate"
{
  "session_id": "9f733fdb-ebf2-494e-8eb6-fb3320d6020d",
  "session_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "agent_id": "my-agent",
  "namespace": "memanto_agent_my-agent",
  "started_at": "2026-05-09T02:40:00.313078Z",
  "expires_at": "2026-05-09T08:40:00.313078Z",
  "pattern": "support",
  "status": "active"
}

Next Steps

After activating an agent, store the returned session_token and use it in the X-Session-Token header for: