Skip to content

Search Documentation

Search across all documentation pages

Agent Routes

All agent routes are POST endpoints under /api/agent/* (except GET /api/agent/info). Every request requires a valid agent key in the Authorization header. See Authentication for details.

Session & Context#

POST /api/agent/session-start#

Initializes a session and returns contextual data: recent episodic memories, important facts, active tasks, constraints, vault listing, active agents, documents, and pending messages.

Scope: read

Body:

FieldTypeDefaultDescription
vaultIdUUIDintegration defaultTarget vault
querystring--Optional query for semantic search within context
summaryOnlybooleantrueReturn clipped summaries instead of full content (saves tokens)
modestring"default"Context profile: default, planning, incident, handoff, deep, minimal, none
maxEpisodicint (0-10)profile defaultOverride max episodic memories
maxFactsint (0-20)profile defaultOverride max facts
maxTasksint (0-10)profile defaultOverride max tasks
maxConstraintsint (0-20)profile defaultOverride max constraints
includeDocumentsstring[]["soul"]Which documents to include: soul, instructions, skills, checks
maxResponseCharsint (2000-100000)16000Budget cap for response size

Response: Session context object with sessionContext, vaults, recentAgents, documents, pendingMessages, changesSinceLastSession, etc.

POST /api/agent/context-checkpoint#

Bulk-saves memories at session end with deduplication, plus an episodic session summary.

Scope: write

Body:

FieldTypeDefaultDescription
memoriesarray (max 50)requiredArray of memory objects to save
sessionSummarystringrequiredSession summary (saved as episodic memory)
vaultIdUUID--Target vault
agentIdstring--Agent identifier
modelIdstring--Model identifier
agentRunIdstring--Run/session identifier (enables idempotency)
dedupbooleantrueEnable multi-layer deduplication

Each memory in the array accepts: content, memoryType, summary, importance, confidence, entities, writeReason, relatedMemoryIds, sourceNoteIds, supersededById, metadata.

Response: { total, created, skipped, failed, durationMs, results[], pendingMessages? }

POST /api/agent/session-track#

Tracks session activity for a running agent session.

Scope: write

POST /api/agent/ingest-turn#

Captures a conversation turn with signal detection for extraction.

Scope: write

Body:

FieldTypeDefaultDescription
contentstring (1-50000)requiredTurn content
role"user" | "assistant"requiredWho produced this turn
vaultIdUUID--Target vault
agentIdstring--Agent identifier
agentRunIdstring--Run identifier
signalThresholdint (0-10)--Custom signal detection threshold
customSignalKeywordsstring[]--Additional keywords for signal detection

Response: { turnId, signalScore, signalKeywords, extractionStatus }


Memory Operations#

POST /api/agent/write-memory#

Writes a single memory with optional deduplication, encryption, and knowledge graph linking.

Scope: write

Body:

FieldTypeDefaultDescription
contentstring (1-100000)requiredMemory content
summarystring (max 2000)--Short summary for token-efficient retrieval
memoryTypestring"fact"Type: fact, skill, preference, constraint, task, episodic, correction
importanceint (1-5)3How important this memory is
confidenceint (1-5)3How confident the agent is
entitiesstring[]--Extracted entities for filtering
dedupbooleanfalseEnable 3-layer deduplication
vaultIdUUID--Target vault
relatedMemoryIdsarray--Related memories with relation types
sourceNoteIdsUUID[]--Notes this memory was derived from
supersededByIdUUID--Memory this supersedes
externalWriteIdstring--Idempotency key
expiresAtdatetime--Auto-expiration timestamp
metadataobject--Arbitrary metadata
writeReasonstring--Why this memory was written

Response: { memoryId, created, idempotent, memoryType, vaultId, dedupAction?, supersededMemoryId? }

POST /api/agent/search-memories#

3-signal hybrid search: vector similarity + blind index + knowledge graph expansion, fused with Reciprocal Rank Fusion (RRF).

Scope: read, search

Body:

FieldTypeDefaultDescription
querystring (1-10000)requiredSearch query
topKint (1-50)10Number of results
thresholdfloat (0-1)0.4Minimum similarity score
vaultIdUUID--Scope to vault
memoryTypestring--Filter by memory type
includeArchivedbooleanfalseInclude archived memories
decayHalfLifeint (1-365)30Temporal decay half-life in days
diversityfloat (0-1)0.7MMR diversity parameter

Response: { searchMode, memories[], unitsUsed, embeddingTokens, semanticMatchCount, blindIndexMatchCount, graphExpansionCount }

POST /api/agent/read-memories#

Reads full content of specific memories by ID.

Scope: read

POST /api/agent/get-related-memories#

Retrieves memories related to a given memory via the knowledge graph.

Scope: read

POST /api/agent/update-memory#

Updates an existing memory's content, metadata, or importance.

Scope: write

POST /api/agent/archive-memory#

Archives a memory (soft delete). Archived memories are excluded from search by default.

Scope: write

POST /api/agent/cleanup-memories#

Bulk cleanup of old or low-importance memories.

Scope: write


Task Management#

POST /api/agent/create-task#

Creates a task (stored as a task-type memory) with status tracking and assignment.

Scope: write

Body:

FieldTypeDefaultDescription
titlestring (1-10000)requiredTask title
descriptionstring (max 100000)--Detailed description
statusstring"todo"Status: backlog, todo, in_progress, done, blocked
priorityint (1-5)3Task priority (maps to importance)
assignedAgentIdstring--Agent to assign the task to
doneWhenstring--Completion criteria
vaultIdUUID--Target vault
dedupbooleanfalseEnable deduplication
externalWriteIdstring--Idempotency key

Response: { taskId, created, status, vaultId, dedupAction?, supersededTaskId? }

POST /api/agent/update-task#

Updates a task's status, priority, or metadata.

Scope: write

POST /api/agent/list-tasks#

Lists tasks with filtering by status and assignment.

Scope: read


Notes#

POST /api/agent/create-note#

Creates an encrypted note with optional folder placement.

Scope: write

POST /api/agent/read-note#

Reads a single note by ID with decrypted content.

Scope: read

POST /api/agent/read-notes#

Reads multiple notes by ID in a single request.

Scope: read

POST /api/agent/update-note#

Updates a note's title, content, or tags.

Scope: write

POST /api/agent/delete-note#

Soft-deletes (trashes) a note.

Scope: write

POST /api/agent/move-note#

Moves a note to a different folder.

Scope: write

POST /api/agent/search-notes#

Searches notes by title, tags, or content.

Scope: read, search

POST /api/agent/list-notes#

Lists notes in a vault or folder.

Scope: read

POST /api/agent/semantic-search#

Vector-based semantic search across notes using embeddings.

Scope: read, search

Body:

FieldTypeDefaultDescription
querystring (1-10000)requiredSearch query
topKint (1-50)10Number of results
thresholdfloat (0-1)0.5Minimum similarity
vaultIdUUID--Scope to vault

Response: { notes[], embeddingTokens }

POST /api/agent/search-and-read#

Combined search and read in a single request -- searches notes, then returns full decrypted content of top matches.

Scope: read, search


Knowledge Graph#

POST /api/agent/add-link#

Creates a typed link between two nodes (memories or notes).

Scope: write

Body:

FieldTypeDescription
sourceType"note" | "memory"Source node type
sourceIdUUIDSource node ID
targetType"note" | "memory"Target node type
targetIdUUIDTarget node ID
relationTypestringRelation: wiki_link, derived_from, contradicts, refines, part_of, supersedes, source_of, references, manual
labelstring (max 500)Optional encrypted label

Response: { linkId, created, sourceType, sourceId, targetType, targetId, relationType }

POST /api/agent/remove-link#

Removes a knowledge graph link.

Scope: write

POST /api/agent/get-links#

Gets all links for a given node.

Scope: read

POST /api/agent/explore-graph#

Multi-hop graph traversal with optional semantic search entry points. Expands from seed nodes through knowledge graph relations.

Scope: read

Body:

FieldTypeDefaultDescription
querystring--Semantic search to find entry points
nodeIdUUID--Start from a specific node
nodeType"note" | "memory"--Type of the start node
maxHopsint (1-5)2Maximum traversal depth
maxNodesint (1-200)50Maximum nodes to return
vaultIdUUID--Scope to vault

Response: { entryPoints[], nodes[], edges[], stats: { totalNodes, totalEdges, maxHopReached } }


Folders & Vaults#

POST /api/agent/create-folder#

Creates a folder for organizing notes.

Scope: write

POST /api/agent/list-folders#

Lists folders in a vault.

Scope: read

POST /api/agent/create-vault#

Creates a new vault.

Scope: write

POST /api/agent/list-vaults#

Lists all accessible vaults with note counts.

Scope: read


Agent Messaging#

POST /api/agent/send-message#

Sends an encrypted message to another agent, a user, or broadcasts to all agents.

Scope: write

Body:

FieldTypeDefaultDescription
targetIdstringrequiredTarget: agent ID, "user", or "*" (broadcast)
targetTypestringauto-derived"agent", "user", or "broadcast"
categorystring"info"Category: directive, question, info, task, alert
priorityint (1-5)3Message priority
subjectstring (max 200)--Message subject line
contentstring (1-10240)requiredMessage body
vaultIdUUID--Vault context
expiresInDaysint (1-365)30Days until message expires
templatestring--Template: task_assignment, status_update, alert, question
parentMessageIdUUID--Parent message for threading

Response: { messageId, created, targetId, targetType, category }

POST /api/agent/read-messages#

Reads messages received by this agent.

Scope: read

POST /api/agent/pending-messages#

Fetches unread pending messages.

Scope: read

POST /api/agent/ack-message#

Acknowledges receipt of a message.

Scope: write

POST /api/agent/list-active-agents#

Lists recently active agents in the vault.

Scope: read


Documents & Settings#

POST /api/agent/read-document#

Reads a vault document (soul, instructions, skills, or checks).

Scope: read

Body:

FieldTypeDescription
documentTypestringOne of: soul, instructions, skills, checks
vaultIdUUIDTarget vault (required)

Response: { documentType, content, inheritMode, agentEditable, appendOnly, templateVersion }

POST /api/agent/update-document#

Updates a vault document (if agentEditable is true).

Scope: write

POST /api/agent/get-settings#

Gets vault settings.

Scope: read

POST /api/agent/update-settings#

Updates vault settings.

Scope: admin


Utility#

GET /api/agent/info#

Returns the current agent key's permissions and vault access (the only GET route).

Scope: none (any valid key)