API Reference

REST API

Programmatic access to the full LogicCycle AI platform. OpenAPI 3.0 compliant.

Authentication

All API requests require a Bearer token. Generate API keys from your dashboard under Settings → API Keys.

curl -H "Authorization: Bearer lc_sk_..." \
     https://api.logiccycleai.co/v1/agents

Agents

GET /v1/agents

List all agents in your workspace. Supports pagination via ?page=1&limit=20.

POST /v1/agents

Create a new agent. Requires engine_id and cycle_id in the request body.

{
  "name": "contract-reviewer",
  "engine_id": "eng_abc123",
  "cycle_id": "cyc_def456",
  "description": "Reviews contracts for risk clauses"
}
POST /v1/agents/:id/run

Execute an agent. Returns a run object with status, output, and trace.

{
  "task": "Analyze contract clauses for liability risk",
  "context": ["doc_id_1", "doc_id_2"],
  "options": {
    "stream": false,
    "include_trace": true
  }
}
DELETE /v1/agents/:id

Delete an agent. This action is irreversible.

Cycles

GET /v1/cycles

List all cycle configurations.

POST /v1/cycles

Create a new cycle definition with convergence thresholds and exit conditions.

{
  "name": "risk-assessment",
  "convergence_threshold": 0.95,
  "max_iterations": 10,
  "exit_conditions": ["confidence_above", "no_drift"]
}

Engines

GET /v1/engines

List available engine configurations.

POST /v1/engines

Create a new engine with model, strategy, and grounding settings.

{
  "model": "gpt-4-turbo",
  "strategy": "chain-of-thought",
  "grounding": "rag",
  "vector_store": "pinecone"
}

Traces & Audit

GET /v1/runs/:id/trace

Retrieve the full reasoning trace for a completed run. Each step includes timestamp, action, confidence score, and grounding status.

GET /v1/audit/logs

Query audit logs with filters: ?agent_id=...&from=...&to=...&status=...