OPTXOPTX DOCS
Reference

API Reference

WebSocket RPC, REST endpoints, and platform surfaces for OPTX integration.

The OPTX platform exposes a WebSocket API for real-time agent communication and REST endpoints for frontend integration.

WebSocket RPC (JOE Agent)

Connect to the JOE agent via the DOJO Connections tab. Authentication required.

// JOE Agent WebSocket message types
// Connection is managed by the DOJO — no direct endpoint access

// Chat message
{ type: "chat", user: "your-username", content: "Hello JOE" }

// Response format
{
  content: "JOE's response text",
  tensor: "COG/EMO/ENV classification",
  cstb_score: 0.85,  // CSTB attestation score
}

Platform Capabilities

Integrated applications use documented REST and WebSocket surfaces (gaze attestation, chat, task orchestration). Capability probing for private gateways is not published here — see MCP (hedgehog) for the agent porch.

REST Endpoints

MethodPathDescription
POST/api/gaze/storeSubmit gaze tensor data for attestation
GET/api/gaze/historyRetrieve gaze session history
POST/api/verify-sessionVerify subscription and access tier
GET/api/attestation/statusCheck CSTB attestation progress

Agent API bridge

Session, skills, memory, and task routes live behind the authenticated agent bridge. Public docs list the product surfaces only — not admin wallet types or internal capability dumps. See JOE and MCP (hedgehog).

Sessions

MethodPathDescription
GET/api/sessionsList all agent sessions
GET/api/sessions/{id}Get specific session
GET/api/sessions/{id}/messagesGet session messages
DELETE/api/sessions/{id}Delete session

Skills

MethodPathDescription
GET/api/skillsList installed skills (filter by category/search)
GET/api/skills/{id}Get skill with SKILL.md metadata

Memory

MethodPathDescription
GET/api/memoryList all memories
POST/api/memoryStore new memory
POST/api/memory/searchSearch memories with query/filters
GET/api/memory/recallQuick recall
DELETE/api/memory/{id}Delete memory
GET/api/memory/statsMemory backend statistics

Tasks

MethodPathDescription
POST/api/tasksCreate task with reward and capabilities
GET/api/tasksList tasks (filter by status/agent)
GET/api/tasks/{id}Get specific task
POST/api/tasks/{id}/claimClaim task (gaze verification if flagged)
POST/api/tasks/{id}/completeComplete task with result
DELETE/api/tasks/{id}Cancel task
POST/api/tasks/swarmDecompose goal into DAG subtasks via HEDGEHOG
GET/api/tasks/statsTask statistics by status

Config

MethodPathDescription
GET/api/configGet config.yaml + .env (secrets redacted)
POST/api/configUpdate config (dot-notation keys)
GET/api/config/modelGet model/provider config
POST/api/config/modelUpdate model configuration

Wallet & escrow

Metered inference billing and escrow settle on-chain with gaze verification. Exact margin and model SKUs are not published on the public docs site — use the live pricing endpoint in a signed-in environment.

Wallet Status

MethodPathDescription
GET/api/walletAgent wallet overview — balances across all chains
GET/api/wallet/balancesLive SOL + SPL token balances via Helius RPC

Escrow (Task Rewards)

Escrow locks funds when a task is created and releases them on completion. Settlement requires gaze verification via AARON Router.

MethodPathDescription
POST/api/wallet/escrowLock funds for a task reward
GET/api/wallet/escrowList escrows (filter by status/task)
GET/api/wallet/escrow/{id}Get specific escrow
POST/api/wallet/escrow/releaseRelease escrow to recipient (gaze-gated)
POST/api/wallet/escrow/{id}/refundRefund locked/expired escrow

Escrow Lifecycle

Create (locked) → Task Completed → Release (gaze-verified) → On-chain settlement
                → Task Failed    → Refund
                → TTL expired    → Expired → Refund

System Endpoints

MethodPathAuthDescription
GET/healthNoneHealth check + upstream connectivity
GET/api/gateway-statusNoneFeature flags and enhanced mode status
ALL/v1/*MPPPassthrough proxy to the agent gateway