Skip to content

Latest commit

 

History

History
64 lines (46 loc) · 1.83 KB

api_reference.md

File metadata and controls

64 lines (46 loc) · 1.83 KB

API Reference

The FastAPI application provides a RESTful interface and a Server-Sent Events (SSE) stream for real-time interaction.

UI Endpoints

  • GET /: Serves the primary glassmorphism dashboard (HTML).
  • GET /api/docs: Interactive Swagger UI for API testing.

System & Health

GET /api/health

Checks the configuration status of Circle APIs, LLM API keys, and network connectivity. Response:

{
  "status": "online",
  "circle_configured": true,
  "llm_configured": true,
  "blockchain": "ARC-TESTNET"
}

Research Pipeline

POST /api/research

Submits a new research task. Launches the Manager Agent asynchronously. Payload:

{
  "task": "Analyze the impact of AI on smart contracts.",
  "target_language": "Spanish"
}

Response: Returns a run_id and streaming URLs.

GET /api/research/{run_id}/stream

Connects to an SSE (Server-Sent Events) stream. Emits real-time logs from the Manager Agent and Specialists as the pipeline executes.

GET /api/research/{run_id}/result

Fetches the final aggregated JSON result for a completed run.

GET /api/x402/payments

Lists all x402 nanopayments made by Tier-3 Data Agents during the session.

GET /api/x402/endpoints

Lists all available x402-gated premium data endpoints and their prices.

Reputation & Agents (ERC-8004)

GET /api/agents

Returns the full roster of agents alongside their current ERC-8004 reputation scores, total tasks completed, and total USDC earned.

GET /api/agents/{agent_id}

Returns the detailed reputation profile for a single agent.

Circle Wallets

GET /api/wallets

Lists all known developer-controlled wallets associated with the current Wallet Set.

GET /api/wallets/{wallet_id}/balance

Retrieves the real-time USDC balance for a specific wallet directly from the Arc blockchain.