HTTP API

August 28, 2026 ยท View on GitHub

The Cordis plugin registers HTTP endpoints on the DSH web server when the webServer service is present. These endpoints are the integration surface for external tools and the web panel.

Base Path

All endpoints are served under /evo/. The pre-rename path /evo-memory/ is still mounted as an alias for backward compatibility.

The web server binds to loopback by default. All responses are JSON.

Endpoints

GET /evo/status

Returns service status.

Response:

{
  "ok": true,
  "databasePath": "~/Library/Application Support/evo/memory.db",
  "busy": false
}
FieldTypeDescription
okbooleanService is operational
databasePathstringPath to SQLite database
busybooleanReflection or consolidation in progress

GET /evo/memories

Lists memory items with optional filtering.

Query Parameters:

ParameterTypeDescription
scopeTypestringFilter by scope type: global, project, etc.
scopeIdstringFilter by scope identifier
scopeKeystringCombined scope filter
kindstringComma-separated list of kinds: fact,constraint
textstringFull-text search
tagsstringTag filter
limitnumberMaximum items to return

Response:

{
  "items": [
    {
      "id": "abc123",
      "scope": { "type": "project", "id": "~/projects/myapp" },
      "kind": "fact",
      "title": "Database uses PostgreSQL",
      "content": "The project uses PostgreSQL 15 with...",
      "tags": ["database", "infrastructure"],
      "source": { "session": "sess_xyz", "turn": 5 },
      "createdAt": "2026-08-01T10:00:00Z",
      "updatedAt": "2026-08-15T14:30:00Z",
      "uses": 12
    }
  ]
}

GET /evo/memories/:id

Returns a single memory item.

Response: Same structure as items in the list, or 404 if not found.

GET /evo/scopes

Returns the scope tree with item counts.

Response:

{
  "scopes": [
    {
      "type": "global",
      "id": null,
      "count": 15
    },
    {
      "type": "project",
      "id": "~/projects/myapp",
      "count": 43
    }
  ]
}

GET /evo/events

Returns recent activity log (reflects, consolidations, imports).

Query Parameters:

ParameterTypeDescription
limitnumberMaximum events to return (newest first)

Response:

{
  "events": [
    {
      "type": "reflect",
      "timestamp": "2026-08-15T14:30:00Z",
      "scope": { "type": "project", "id": "~/projects/myapp" },
      "added": 2,
      "updated": 1,
      "evicted": 0
    }
  ]
}

POST /evo/consolidate

Triggers consolidation for a scope. Consolidation merges related memories, removes duplicates, and enforces capacity limits.

Request Body:

{
  "scope": {
    "type": "project",
    "id": "~/projects/myapp"
  }
}

Response:

{
  "ok": true,
  "before": 45,
  "after": 32,
  "merged": 8,
  "evicted": 5
}

POST /evo/import-workspace

Triggers workspace file import for a directory.

Request Body:

{
  "cwd": "~/projects/myapp",
  "force": false
}
FieldTypeDescription
cwdstringWorking directory to import
forcebooleanRe-import even if already imported

Response:

{
  "ok": true,
  "imported": 5,
  "updated": 2,
  "skipped": 1
}

GET /evo/skills

Lists skills with filtering options.

Query Parameters:

ParameterTypeDescription
scopeTypestringFilter by scope type
scopeIdstringFilter by scope identifier
scopeKeystringCombined scope filter
textstringSearch skill names and bodies
includeDormantbooleanInclude dormant skills
limitnumberMaximum items to return

Response:

{
  "skills": [
    {
      "name": "git-commit-workflow",
      "trigger": "When committing code",
      "path": ".paper/agents/skills/git-commit-workflow",
      "usageCount": 5,
      "dormant": false,
      "promoted": true,
      "scope": { "type": "project", "id": "~/projects/myapp" }
    }
  ]
}

GET /evo/backlog

Returns the replay buffer backlog size for a scope.

Query Parameters:

ParameterTypeDescription
scopeTypestringRequired: scope type
scopeIdstringRequired for non-global: scope identifier
scopeKeystringAlternative: combined scope filter

Response:

{
  "replaySize": 7,
  "scope": { "type": "project", "id": "~/projects/myapp" }
}

The replaySize indicates how many distillation batches are queued for the next consolidation. When this grows large (10+), auto-consolidation may trigger.

Error Responses

Errors return appropriate HTTP status codes with a JSON body:

{
  "error": "Scope not found",
  "code": "SCOPE_NOT_FOUND"
}

Usage Example

# Check status
curl http://localhost:3000/evo/status

# List project memories
curl "http://localhost:3000/evo/memories?scopeType=project&scopeId=~/projects/myapp"

# Search for constraints
curl "http://localhost:3000/evo/memories?kind=constraint&text=test"

# Trigger consolidation
curl -X POST http://localhost:3000/evo/consolidate \
  -H "Content-Type: application/json" \
  -d '{"scope": {"type": "project", "id": "~/projects/myapp"}}'