Comprehensive API documentation for mnemosyne AI Memory. All endpoints are under
/api/.
- Authentication
- Response Format
- Error Codes
- Rate Limits
- Core System
- Robots & Projects
- Hardware
- AI & Agents
- Missions & Navigation
- Communications
- Telemetry & Monitoring
- Streaming (SSE)
- Integrations
- WebSocket Endpoints
Critical API routes require an API key. Set the mnemosyne_API_KEY environment variable in production.
Development Mode: If mnemosyne_API_KEY is not set and NODE_ENV=development, authentication is skipped.
Production Mode: mnemosyne_API_KEY must be set. Requests without a valid key receive 401 Unauthorized.
The API key can be provided in three ways:
- Header (preferred):
x-api-key: YOUR_KEY - Authorization header:
Authorization: Bearer YOUR_KEY - Query parameter:
?api_key=YOUR_KEY
| Route | Methods | Auth Required |
|---|---|---|
/api/mcp |
POST | Yes |
/api/system |
POST | Yes |
/api/flash |
POST | Yes |
/api/hardware-bridge |
POST | Yes |
All API endpoints return JSON in a consistent format:
{
"success": true,
"data": { ... }
}{
"success": false,
"error": "Description of the error"
}{
"success": true,
"data": {
"items": [ ... ],
"total": 100,
"page": 1,
"pageSize": 50
}
}| Status Code | Meaning | Description |
|---|---|---|
| 200 | OK | Request succeeded |
| 400 | Bad Request | Invalid input, missing required fields |
| 401 | Unauthorized | Invalid or missing API key |
| 404 | Not Found | Resource not found |
| 405 | Method Not Allowed | HTTP method not supported for this endpoint |
| 500 | Internal Server Error | Server-side error |
| Tier | Limit | Window |
|---|---|---|
| Default | 100 requests | 1 minute |
| SSE Streams | 5 concurrent | Per client |
| Agent Chat | 10 requests | 1 minute |
| MCP Tools | 20 requests | 1 minute |
Rate limiting is handled by the Caddy reverse proxy in production deployments.
System health check. Returns system status, version, and device counts.
Auth: Not required
Response:
{
"success": true,
"data": {
"system": "mnemosyne AI Memory",
"version": "2.0.0",
"mode": "simulation",
"uptime": {
"seconds": 3600,
"formatted": "1h 0m 0s"
},
"timestamp": "2025-01-15T10:30:00.000Z",
"devices": {
"total": 8,
"active": 5,
"detected": 2,
"error": 0,
"offline": 1
}
}
}Get system configuration and status.
Auth: Not required
Response:
{
"success": true,
"data": {
"name": "mnemosyne IOT",
"version": "2.0.0",
"mode": "simulation",
"region": "Aceh Utara",
"homePosition": { "lat": 4.9125, "lng": 97.1347 },
"uptime": 3600000,
"uptimeFormatted": "1h 0m 0s",
"devices": { "total": 8, "active": 5 },
"activeMission": null,
"agents": {
"hermes": { "enabled": true, "status": "online" },
"picoclaw": { "enabled": true, "status": "online" }
},
"session": null,
"alerts": { "unread": 0 },
"config": { ... }
}
}Update system configuration.
Auth: Required
Request:
{
"configs": [
{ "key": "system.name", "value": "My Robot", "category": "general" }
]
}Response:
{
"success": true,
"data": { "updated": 1 }
}System health diagnostics.
Auth: Not required
Response:
{
"success": true,
"data": {
"checks": [
{ "name": "Database", "status": "healthy", "latency": 5 },
{ "name": "Serial Port", "status": "healthy", "latency": 12 }
],
"overall": "healthy",
"timestamp": "2025-01-15T10:30:00.000Z"
}
}Boot sequence management.
GET Response:
{
"success": true,
"data": {
"steps": [
{ "id": "1", "name": "Database Init", "status": "completed", "order": 1 },
{ "id": "2", "name": "Hardware Scan", "status": "completed", "order": 2 },
{ "id": "3", "name": "Agent Startup", "status": "running", "order": 3 }
],
"currentStep": 3,
"status": "booting"
}
}List all robot templates.
Response:
{
"success": true,
"data": {
"templates": [
{
"id": "tpl-001",
"name": "Quadcopter",
"description": "4-motor UAV for photography & survey",
"category": "drone",
"icon": "🚁",
"difficulty": "intermediate",
"estimatedBuildHours": 8,
"isOfficial": true,
"version": "1.0.0"
}
]
}
}Create a custom robot template.
Request:
{
"name": "My Custom Drone",
"description": "Custom drone configuration",
"category": "drone",
"requiredHardware": "[{\"type\": \"flight_controller\", \"name\": \"Pixhawk\"}]",
"capabilities": "[\"gps\", \"camera\"]"
}Get, update, or delete a specific template.
List all robot projects.
Response:
{
"success": true,
"data": {
"projects": [
{
"id": "proj-001",
"name": "Field Mapping Drone",
"status": "active",
"buildProgress": 85,
"currentStep": "calibration",
"templateId": "tpl-001"
}
]
}
}Create a new robot project from a template.
Request:
{
"name": "My Drone",
"templateId": "tpl-001",
"description": "Agricultural mapping drone"
}Get, update, or delete a specific project.
List all hardware devices with stats.
Response:
{
"success": true,
"data": {
"devices": [
{
"id": "hw-001",
"name": "Pixhawk 4",
"deviceType": "flight_controller",
"protocol": "uart",
"status": "active",
"vendorId": "0x26AC",
"productId": "0x0012",
"port": "/dev/ttyACM0",
"firmware": "ArduPilot 4.5.1",
"lastSeen": "2025-01-15T10:30:00.000Z",
"profiles": [
{ "id": "p1", "adapterName": "MAVLink 2", "config": "{}", "isDefault": true }
]
}
],
"stats": {
"total": 8,
"byStatus": { "active": 5, "detected": 2, "offline": 1 },
"byType": { "flight_controller": 1, "companion_computer": 1 }
}
}
}Register a new hardware device or scan for devices.
Request (Scan):
{
"action": "scan"
}Request (Register):
{
"name": "BME280 Sensor",
"deviceType": "sensor",
"protocol": "i2c",
"address": "0x76",
"port": "/dev/i2c-1"
}Hardware bus operations (Serial, I2C, SPI, GPIO).
GET Response:
{
"success": true,
"data": {
"buses": [
{ "busType": "serial", "busPath": "/dev/ttyACM0", "status": "available" },
{ "busType": "i2c", "busPath": "/dev/i2c-1", "status": "available" }
]
}
}Driver management.
GET Response:
{
"success": true,
"data": {
"drivers": [
{ "id": "drv-001", "name": "MAVLink 2", "version": "1.0.0", "status": "loaded", "supportedDevices": ["pixhawk"] }
]
}
}Hardware auto-detection.
POST Response:
{
"success": true,
"data": {
"scanned": true,
"newDevices": 1,
"updatedDevices": 3,
"offlineDevices": 0,
"devices": [ ... ]
}
}Firmware flashing operations.
GET Response:
{
"success": true,
"data": {
"firmware": [
{ "target": "pixhawk", "version": "4.5.1", "releaseDate": "2024-01-15", "size": 1048576 }
],
"activeOperations": [],
"operationHistory": []
}
}Get agent messages and status.
Response:
{
"success": true,
"data": {
"messages": [
{
"id": "msg-001",
"agent": "hermes",
"role": "assistant",
"content": "System ready for mission.",
"metadata": null,
"timestamp": "2025-01-15T10:30:00.000Z",
"missionId": "mission-001"
}
],
"agentStatus": {
"hermes": { "enabled": true, "status": "online", "lastMessage": null },
"picoclaw": { "enabled": true, "status": "online", "lastMessage": null }
}
}
}Manage agent configuration.
Request:
{
"action": "configure",
"agent": "hermes",
"enabled": true
}Send a message to an agent.
Request:
{
"prompt": "Plan a mapping mission near Lhoksukon",
"agent": "hermes",
"includeContext": true,
"missionId": "mission-001"
}Response:
{
"success": true,
"data": {
"id": "msg-new",
"agent": "hermes",
"role": "assistant",
"content": "I've designed a mapping mission...",
"timestamp": "2025-01-15T10:30:00.000Z"
}
}Agent orchestrator control.
GET Response:
{
"success": true,
"data": {
"orchestrator": {
"running": true,
"uptime": 3600,
"registeredAgents": ["hermes", "picoclaw", "sentinel", "navigator", "comms_guard", "data_steward"],
"activeAgents": ["sentinel", "navigator", "comms_guard", "data_steward"],
"taskQueueSize": 3,
"tasksCompleted": 150,
"tasksFailed": 2,
"messagesProcessed": 89,
"lastTick": "2025-01-15T10:30:00.000Z"
},
"agents": {
"hermes": { "name": "hermes", "type": "llm", "state": "idle", "capabilities": [...] },
"sentinel": { "name": "sentinel", "type": "rule", "state": "acting", "capabilities": [...] }
},
"taskQueue": [ ... ],
"communicationLog": [ ... ]
}
}POST Actions:
| Action | Description | Required Fields |
|---|---|---|
start |
Start orchestrator with all agents | — |
stop |
Stop orchestrator | — |
submit_task |
Submit a task to the queue | type, agent, payload |
cancel_task |
Cancel a pending task | taskId |
send_message |
Send inter-agent message | from, to, type, payload |
register_agent |
Register a default agent | agentName |
unregister_agent |
Unregister an agent | agentName |
Sentinel safety monitoring.
GET Response:
{
"success": true,
"data": {
"sentinel": { "name": "sentinel", "state": "acting", "tasksCompleted": 500 },
"lastCheckResult": {
"timestamp": "2025-01-15T10:30:00.000Z",
"safe": true,
"criticalCount": 0,
"warningCount": 1,
"alerts": [...],
"actions": [],
"telemetryAge": 2000
},
"currentSafetyCheck": {
"safe": true,
"alertCount": 1,
"alerts": [...]
},
"config": {
"checkInterval": 2000,
"thresholds": { ... },
"autoEmergencyActions": true,
"escalationToHermes": true
}
}
}POST Actions:
| Action | Description | Fields |
|---|---|---|
manual_check |
Trigger an immediate safety check | — |
configure |
Update safety thresholds | thresholds |
Direct LLM chat completions.
Request:
{
"messages": [
{ "role": "user", "content": "Plan a survey mission" }
],
"model": "default",
"temperature": 0.7,
"maxTokens": 2048
}AI memory CRUD operations.
GET Response:
{
"success": true,
"data": {
"memories": [
{
"id": "mem-001",
"category": "learning",
"key": "optimal_mapping_altitude",
"value": "{\"altitude\": 50, \"gsd\": 2.0}",
"confidence": 0.92,
"accessCount": 15,
"isSynced": true
}
]
}
}Self-learning engine.
Face detection and tracking operations.
AI-powered testing.
List all missions.
Response:
{
"success": true,
"data": {
"missions": [
{
"id": "mission-001",
"name": "Pemetaan Lhoksukon",
"description": "Area mapping of Lhoksukon fields",
"type": "mapping",
"status": "active",
"prompt": "Peta area persawahan di Lhoksukon",
"waypoints": "[{\"lat\":4.9125,\"lng\":97.1347,\"alt\":50,\"action\":\"takeoff\"}]",
"altitude": 80,
"speed": 5,
"overlapFront": 75,
"overlapSide": 65,
"startedAt": "2025-01-15T10:00:00.000Z",
"completedAt": null,
"createdAt": "2025-01-15T09:30:00.000Z"
}
]
}
}Create a new mission.
Request:
{
"name": "Field Mapping",
"type": "mapping",
"prompt": "Map the area near Lhoksukon",
"altitude": 80,
"speed": 5,
"overlapFront": 75,
"overlapSide": 65
}Get, update, or delete a specific mission.
List navigation plans.
Create a navigation plan (autopilot, field mapping, delivery, RTH).
Request (Delivery):
{
"name": "Delivery to Station B",
"type": "delivery",
"waypoints": "[{\"lat\":4.9125,\"lng\":97.1347},{\"lat\":4.9145,\"lng\":97.1367}]",
"homePosition": "{\"lat\":4.9125,\"lng\":97.1347,\"alt\":0}"
}Request (RTH Emergency):
{
"name": "Emergency RTH",
"type": "rth",
"homePosition": "{\"lat\":4.9125,\"lng\":97.1347,\"alt\":0}"
}Get, update, or delete a navigation plan.
List communication channels.
Response:
{
"success": true,
"data": {
"channels": [
{
"id": "ch-001",
"type": "telegram",
"name": "Hermes Telegram Bot",
"status": "connected",
"isEnabled": true
}
]
}
}Create a communication channel.
Get, update, or delete a channel.
Send a Telegram message.
Request:
{
"message": "Mission started",
"chatId": "123456789"
}Voice/TTS operations.
Beep alert operations.
Get telemetry data.
Response:
{
"success": true,
"data": {
"readings": [
{ "id": "tel-001", "metric": "battery_voltage", "value": 14.8, "unit": "V", "source": "sensor", "timestamp": "2025-01-15T10:30:00.000Z" }
],
"snapshot": {
"battery_voltage": 14.8,
"altitude": 50,
"speed": 5,
"signal_strength": -45,
"temperature": 28
}
}
}Record a new telemetry reading.
Power source management.
GET Response:
{
"success": true,
"data": {
"sources": [
{
"id": "ps-001",
"type": "battery",
"name": "LiPo 4S 6000mAh",
"status": "charging",
"voltage": 15.2,
"current": 2.1,
"temperature": 32.5,
"currentLevel": 85
}
],
"status": {
"mainBattery": { "voltage": 15.2, "percentage": 85, "estimatedMinutes": 120 },
"solar": { "voltage": 18.5, "isCharging": true, "wattage": 22 },
"emergencyMode": false
}
}
}Alert management.
GET Response:
{
"success": true,
"data": {
"alerts": [
{
"id": "alert-001",
"level": "warning",
"source": "sentinel",
"title": "Battery Low",
"message": "Battery voltage at 13.5V",
"category": "safety",
"isRead": false,
"isResolved": false,
"timestamp": "2025-01-15T10:30:00.000Z"
}
]
}
}Calibration records.
Real-time telemetry stream via Server-Sent Events.
Auth: Not required
Event Format:
event: telemetry
data: {"battery_voltage":14.8,"altitude":50,"speed":5,"timestamp":"2025-01-15T10:30:00.000Z"}
event: telemetry
data: {"battery_voltage":14.7,"altitude":51,"speed":4.8,"timestamp":"2025-01-15T10:30:05.000Z"}
Client Usage:
const eventSource = new EventSource('/api/stream/telemetry')
eventSource.addEventListener('telemetry', (event) => {
const data = JSON.parse(event.data)
console.log(data)
})Real-time alert stream via SSE.
Event Format:
event: alert
data: {"level":"warning","source":"sentinel","title":"Battery Low","message":"Voltage at 13.5V"}
event: alert
data: {"level":"critical","source":"sentinel","title":"Signal Lost","message":"No telemetry for 10s"}
Testing progress stream via SSE.
List available MCP tools and their statuses.
Response:
{
"success": true,
"data": {
"tools": [
{
"name": "mavlink_command",
"description": "Send MAVLink commands to the flight controller",
"status": "available",
"inputSchema": { ... }
},
{
"name": "telemetry_query",
"description": "Query historical telemetry data",
"status": "available",
"inputSchema": { ... }
}
],
"totalTools": 6,
"availableTools": 6
}
}Execute an MCP tool.
Auth: Required
Request:
{
"tool": "safety_assessment",
"arguments": {
"useLiveTelemetry": true
}
}Available Tools:
| Tool | Description | Auth |
|---|---|---|
mavlink_command |
Send MAVLink commands (ARM, DISARM, TAKEOFF, LAND, RTL) | Required |
telemetry_query |
Query historical telemetry data | Required |
mission_generate |
Generate mission waypoints with AI | Required |
hardware_diagnostic |
Run hardware diagnostics | Required |
calibration_control |
Control calibration processes | Required |
safety_assessment |
Run PicoClaw safety assessment | Required |
MCP JSON-RPC 2.0 transport endpoint.
Request:
{
"jsonrpc": "2.0",
"method": "tools/list",
"id": 1
}IDE extension bridge (VSCode, Cursor, Neovim, JetBrains).
Robot assembly step management.
URL: ws://localhost:8081 (or via Caddy gateway with ?XTransformPort=8081)
Purpose: Real-time communication between IDE extensions and the mnemosyne AI Memory platform.
Events:
| Event | Direction | Description |
|---|---|---|
connect |
Client → Server | IDE extension connects |
heartbeat |
Bidirectional | Connection keep-alive |
command |
Client → Server | Execute a platform command |
status |
Server → Client | Platform status update |
alert |
Server → Client | Real-time alert notification |
Last updated: 2025