curl -X POST "http://localhost:8000/api/v2/agents/my-agent/remember" \
-H "X-Session-Token: your_session_token" \
-H "Content-Type: application/json" \
-d '{
"content": "User prefers email communication",
"type": "preference",
"confidence": 0.9,
"tags": ["communication"],
"source": "agent",
"provenance": "explicit_statement"
}'
{
"memory_id": "b7c3cf31-e537-49f1-abc4-c50ac6adeac5",
"agent_id": "my-agent",
"session_id": "9f733fdb-ebf2-494e-8eb6-fb3320d6020d",
"namespace": "memanto_agent_my-agent",
"status": "queued",
"confidence": 0.9,
"provenance": "explicit_statement"
}
{
"detail": "Missing session token. Use X-Session-Token header."
}
{
"detail": {
"error": "InvalidSessionToken",
"message": "Invalid session token: Not enough segments",
"details": {}
}
}
{
"detail": [
{
"type": "missing",
"loc": ["body", "content"],
"msg": "Field required",
"input": {}
}
]
}
{
"detail": [
{
"type": "less_than_equal",
"loc": ["body", "confidence"],
"msg": "Input should be less than or equal to 1",
"input": 1.5
}
]
}
{
"detail": {
"error": "InternalServerError",
"message": "An unexpected error occurred",
"details": {
"original_error": "Session is for agent 'other-agent', cannot access 'my-agent'"
}
}
}
{
"detail": {
"error": "text_too_long",
"message": "Memory content exceeds maximum length of 10000 characters",
"actual_length": 12000,
"max_length": 10000
}
}
Data
Remember
Store a single memory for the agent in the active session namespace.
POST
/
api
/
v2
/
agents
/
{agent_id}
/
remember
curl -X POST "http://localhost:8000/api/v2/agents/my-agent/remember" \
-H "X-Session-Token: your_session_token" \
-H "Content-Type: application/json" \
-d '{
"content": "User prefers email communication",
"type": "preference",
"confidence": 0.9,
"tags": ["communication"],
"source": "agent",
"provenance": "explicit_statement"
}'
{
"memory_id": "b7c3cf31-e537-49f1-abc4-c50ac6adeac5",
"agent_id": "my-agent",
"session_id": "9f733fdb-ebf2-494e-8eb6-fb3320d6020d",
"namespace": "memanto_agent_my-agent",
"status": "queued",
"confidence": 0.9,
"provenance": "explicit_statement"
}
{
"detail": "Missing session token. Use X-Session-Token header."
}
{
"detail": {
"error": "InvalidSessionToken",
"message": "Invalid session token: Not enough segments",
"details": {}
}
}
{
"detail": [
{
"type": "missing",
"loc": ["body", "content"],
"msg": "Field required",
"input": {}
}
]
}
{
"detail": [
{
"type": "less_than_equal",
"loc": ["body", "confidence"],
"msg": "Input should be less than or equal to 1",
"input": 1.5
}
]
}
{
"detail": {
"error": "InternalServerError",
"message": "An unexpected error occurred",
"details": {
"original_error": "Session is for agent 'other-agent', cannot access 'my-agent'"
}
}
}
{
"detail": {
"error": "text_too_long",
"message": "Memory content exceeds maximum length of 10000 characters",
"actual_length": 12000,
"max_length": 10000
}
}
Overview
Stores one memory in the agent’s Moorcheh namespace scoped by the active session. Fields are sent as JSON in the request body only (no query-string parameters).Authentication
API clients do not send an API key orAuthorization header.
Session token from Activate Agent. Must match
agent_id.Path Parameters
Body
Memory text to store (max length enforced by the server; typically up to 10,000 characters).
Memory category (e.g.
fact, preference, instruction, decision, goal, …). Must be one of the supported Memanto memory types.Optional list of tag strings. Up to 20 tags of 1–64 characters each. Tags can’t contain a comma (tags are stored comma-separated) or a line break or other control character, can’t start with
#, and can’t contain prompt-injection directives such as ignore previous instructions or a leading system:; those are rejected with 422. Structured tags such as project:apollo are fine.Open label for who wrote the memory — not a fixed enum. Use
user, agent, or a specific writer such as cursor, codex, or claude_code for per-writer attribution. Letters, digits, ., _, - only, max 64 characters.How the memory was obtained:
explicit_statement, inferred, observed, validated, corrected, imported.curl -X POST "http://localhost:8000/api/v2/agents/my-agent/remember" \
-H "X-Session-Token: your_session_token" \
-H "Content-Type: application/json" \
-d '{
"content": "User prefers email communication",
"type": "preference",
"confidence": 0.9,
"tags": ["communication"],
"source": "agent",
"provenance": "explicit_statement"
}'
{
"memory_id": "b7c3cf31-e537-49f1-abc4-c50ac6adeac5",
"agent_id": "my-agent",
"session_id": "9f733fdb-ebf2-494e-8eb6-fb3320d6020d",
"namespace": "memanto_agent_my-agent",
"status": "queued",
"confidence": 0.9,
"provenance": "explicit_statement"
}
{
"detail": "Missing session token. Use X-Session-Token header."
}
{
"detail": {
"error": "InvalidSessionToken",
"message": "Invalid session token: Not enough segments",
"details": {}
}
}
{
"detail": [
{
"type": "missing",
"loc": ["body", "content"],
"msg": "Field required",
"input": {}
}
]
}
{
"detail": [
{
"type": "less_than_equal",
"loc": ["body", "confidence"],
"msg": "Input should be less than or equal to 1",
"input": 1.5
}
]
}
{
"detail": {
"error": "InternalServerError",
"message": "An unexpected error occurred",
"details": {
"original_error": "Session is for agent 'other-agent', cannot access 'my-agent'"
}
}
}
{
"detail": {
"error": "text_too_long",
"message": "Memory content exceeds maximum length of 10000 characters",
"actual_length": 12000,
"max_length": 10000
}
}
Next Steps
- Recall to search stored memories
- Generate AI Answer using the agent’s context