REST

REST API

The Naomi server exposes a REST API for managing agents and the network.

Base URL

http://localhost:3000/api

Agent Endpoints

List All Agents

GET /api/agents

Response:

{
  "agents": [
    {
      "id": "agent-1",
      "config": { ... },
      "network": { ... },
      "isActive": true,
      "lastActivity": 1234567890
    }
  ]
}

Get Agent by ID

Response:

Create Agent

Response:

Update Agent

Delete Agent

Response:

Process Message

Response:

Share Knowledge

Response:

Context Endpoints

Get Agent Context

Response:

Get Shared Context

Clear Agent Context

Response:

Network Endpoints

Get Network Topology

Response:

Connect Agents

Response:

Get Registered Agents

Response:

WebSocket Events

The server also supports WebSocket connections for real-time updates.

Connection

Events

  • agent:created - New agent created

  • agent:processed - Agent processed a message

  • agent:connected - Agents connected

  • context:shared - Context shared between agents

  • context:created - New context message created

Last updated