Skip to main content

API Reference

All endpoints are served by the FastAPI application on the configured port (default 8000).

Interactive docs available at http://localhost:8000/docs.

Root

MethodEndpointDescription
GET/Health check — returns organism name, version, alive status

Engine

MethodEndpointDescription
GET/engine/statusEngine health + capabilities list
GET/engine/pulseOrganism vital signs (heartbeat count, uptime, errors)
POST/engine/pipelineRegister a new pipeline
GET/engine/pipelinesList all registered pipelines
POST/engine/runCompile and execute a pipeline by name
POST/engine/compileCompile pipeline source without executing
POST/engine/reflexRegister an auto-triggered reflex
GET/engine/reflexesList all active reflexes
POST/engine/emitFire an event to the nervous system
GET/engine/eventsRecent event log
GET/engine/healthPer-pipeline health scores
GET/engine/brainBrain state + recent decisions

Cortex (Memory)

MethodEndpointDescription
POST/cortex/rememberStore a memory
GET/cortex/recallSearch memories by query
GET/cortex/recentRetrieve recent memories
GET/cortex/statsCortex statistics (total memories, avg importance, etc.)

Request / Response Examples

Register a Pipeline

curl -X POST http://localhost:8000/engine/pipeline \
-H "Content-Type: application/json" \
-d '{
"name": "scanner",
"source": "pipeline scanner { print(\"scanning\") }"
}'

Response:

{
"status": "registered",
"name": "scanner"
}

Run a Pipeline

curl -X POST http://localhost:8000/engine/run \
-H "Content-Type: application/json" \
-d '{"name": "scanner"}'

Response:

{
"status": "success",
"pipeline": "scanner",
"output": ["scanning"],
"execution_time_ms": 12
}

Store a Memory

curl -X POST http://localhost:8000/cortex/remember \
-H "Content-Type: application/json" \
-d '{
"content": "Discovered anomalous traffic pattern",
"tags": ["security", "anomaly"],
"importance": 0.9
}'

Response:

{
"status": "remembered",
"id": "mem_a7f3c2"
}

Search Memories

curl "http://localhost:8000/cortex/recall?query=anomaly&limit=5"

Response:

{
"results": [
{
"content": "Discovered anomalous traffic pattern",
"tags": ["security", "anomaly"],
"importance": 0.9,
"relevance": 0.92,
"created_at": "2026-03-06T08:30:00"
}
]
}

Fire an Event

curl -X POST http://localhost:8000/engine/emit \
-H "Content-Type: application/json" \
-d '{"event": "scan_complete", "data": {"targets_found": 3}}'

Next: Advanced →