API Reference

Three APIs.
One system.

Each component of the assistant exposes its own REST API. Memory on port 10101, reasoning on 30101 and orchestration on 20020.

Conventions

Before
you call

Base URLhttp://localhost:<port>
FormatJSON · Content-Type: application/json
Memory/brain authBearer token
TenantX-Soma-Tenant
OpenAPI/openapi.json
headers
Authorization: Bearer $SOMA_API_TOKEN
X-Soma-Tenant: my-tenant
Content-Type: application/json
SomaFractalMemory · :10101

Memory

MethodPathDescription
POST/memoriesStores a memory (coordinate + payload).
POST/memories/searchSearches memories by semantic similarity.
POST/graph/linkCreates an edge between two graph nodes.
GET/graph/neighborsNeighbors of a graph node.
GET/graph/pathPath between two graph nodes.
GET/healthz · /readyz · /healthHealth probes and detail.
GET/stats · /ping · /metricsStats, ping and Prometheus metrics.
GET/openapi.jsonOpenAPI specification.
store
curl -X POST localhost:10101/memories \
  -H "Authorization: Bearer $TOKEN" \
  -H "X-Soma-Tenant: my-tenant" \
  -d '{
    "coord": "1.0,2.0,3.0",
    "payload": {"content": "The user prefers dark mode"},
    "memory_type": "semantic"
  }'
search
curl -X POST localhost:10101/memories/search \
  -H "Authorization: Bearer $TOKEN" \
  -H "X-Soma-Tenant: my-tenant" \
  -d '{
    "query": "dark mode",
    "top_k": 5
  }'
health
curl localhost:10101/healthz
# {"kv_store":true,
#  "vector_store":true,
#  "graph_store":true}
SomaBrain · :30101

Reasoning

MethodPathDescription
POST/memory/rememberConsolidates content into cognitive memory.
POST/memory/recallRetrieves context by query.
GET/health · /healthzBrain status.
GET/api/v1/health/API v1 — status.
GET/api/v1/memory/API v1 — memory.
GET/api/v1/cognitive/API v1 — cognitive operations.
remember
curl -X POST localhost:30101/memory/remember \
  -H "Content-Type: application/json" \
  -d '{"content": "Relevant context from the session"}'
recall
curl -X POST localhost:30101/memory/recall \
  -H "Content-Type: application/json" \
  -d '{"query": "what does it know about this user?"}'
SomaAgent01 · :20020

Orchestration

MethodPathDescription
POST/api/v2/auth/tokenObtains an access token.
GET/api/v2/healthOrchestrator status.
GET/api/v2/docsInteractive documentation.
POST/api/v2/memoryAgent memory operations.
POST/api/v2/uploadsFile and attachment uploads.
token
curl -X POST localhost:20020/api/v2/auth/token \
  -H "Content-Type: application/json" \
  -d '{"username":"...","password":"..."}'
health
curl localhost:20020/api/v2/health
Build on Yachaq

The assistant
chat

Integrate the Yachaq assistant into your application through the chat gateway, which manages session, profile and voice.

The gateway receives the message, resolves the yachaq-ai profile, keeps the session context and syncs speech to text and back to speech.

Try the assistant live ↗
POST /api/api_message
{
  "message": "What are the current SRI rates?",
  "context_id": "session-id",
  "agent_profile": "yachaq-ai",
  "lang": "en",
  "attachments": []
}