Skip to main content

Agent402 API

Local Dev: http://localhost:8000
API Prefix: /api/v1
Auth: JWT Bearer (email/password login)
Source: github.com/AINative-Studio/agent402

Public Deployment Coming Soon

Agent402 is not yet publicly deployed. Run locally with Docker or connect to the AINative-hosted instance when available.

git clone https://github.com/AINative-Studio/agent402.git
cd agent402 && docker-compose up
# API: http://localhost:8000
# Docs: http://localhost:8000/docs
Auth Model

Agent402 uses email/password JWT (its own user system). AINative API keys are not accepted. Register at POST /api/v1/auth/register, then log in at POST /api/v1/auth/login.

Agent402 (AgentClaw backend) is an autonomous agent orchestration platform. Agents get persistent personalities, pluggable skills, multi-channel comms (Slack, email, Zalo), WireGuard mesh networking, swarm coordination, and x402 HTTP payment rails.


Authentication

Register

POST /api/v1/auth/register
Content-Type: application/json

{
"email": "dev@example.com",
"password": "SecurePass123!",
"name": "Dev User",
"workspace_id": "your-workspace-id"
}

Login

POST /api/v1/auth/login
Content-Type: application/json

{"email": "dev@example.com", "password": "SecurePass123!"}

Returns {"access_token": "...", "refresh_token": "..."}.

Other Auth Endpoints

MethodPathDescription
GET/api/v1/auth/meCurrent user
POST/api/v1/auth/refreshRefresh JWT
POST/api/v1/auth/logoutLogout
POST/api/v1/auth/change-passwordChange password

Agents

MethodPathDescription
GET/api/v1/agentsList agents
POST/api/v1/agentsCreate agent
GET/api/v1/agents/{id}Get agent
PUT/api/v1/agents/{id}Update agent
DELETE/api/v1/agents/{id}Delete agent
POST/api/v1/agents/{id}/provisionProvision agent (allocate resources)
POST/api/v1/agents/{id}/messageSend message to agent
POST/api/v1/agents/{id}/pausePause agent
POST/api/v1/agents/{id}/resumeResume agent
POST/api/v1/agents/{id}/heartbeatAgent heartbeat
GET/api/v1/agents/{id}/settingsGet agent settings

Agent Personality

MethodPathDescription
GET/api/v1/agents/{id}/personalityGet personality config
POST/api/v1/agents/{id}/personality/initializeInitialize personality
GET/api/v1/agents/{id}/personality/context/systemSystem context
GET/api/v1/agents/{id}/personality/context/taskTask context
GET/api/v1/agents/{id}/personality/context/minimalMinimal context

Swarms

Multi-agent coordination.

MethodPathDescription
GET/api/v1/swarmsList swarms
POST/api/v1/swarmsCreate swarm
GET/api/v1/swarms/{id}Get swarm
PATCH/api/v1/swarms/{id}Update swarm
DELETE/api/v1/swarms/{id}Delete swarm
POST/api/v1/swarms/{id}/agentsAdd agents to swarm
DELETE/api/v1/swarms/{id}/agentsRemove agents
POST/api/v1/swarms/{id}/startStart swarm
POST/api/v1/swarms/{id}/pausePause swarm
POST/api/v1/swarms/{id}/resumeResume swarm
GET/api/v1/swarm/healthSwarm health
GET/api/v1/swarm/timelineActivity timeline
GET/api/v1/swarm/monitoring/statusMonitoring status
GET/api/v1/swarm/alerts/thresholdsAlert thresholds
PUT/api/v1/swarm/alerts/thresholdsUpdate thresholds

Skills

Pluggable capabilities for agents.

MethodPathDescription
GET/api/v1/skillsList installed skills
GET/api/v1/skills/installableAvailable skills
GET/api/v1/skills/readyReady skills
GET/api/v1/skills/missingSkills with missing dependencies
GET/api/v1/skills/{name}Get skill details
POST/api/v1/skills/{name}/installInstall skill
DELETE/api/v1/skills/{name}/installUninstall skill
GET/api/v1/skills/{name}/install-infoInstallation requirements
GET/api/v1/skills/{name}/installation-statusInstallation status
GET/api/v1/agents/{id}/skillsAgent skill list
POST/api/v1/agents/{id}/skillsAttach skill to agent
DELETE/api/v1/agents/{id}/skills/{name}Detach skill
POST/api/v1/agents/{id}/skills/{name}/configureConfigure skill

Tasks

MethodPathDescription
GET/api/v1/tasksList tasks
POST/api/v1/tasksCreate task
GET/api/v1/tasks/{id}Get task
DELETE/api/v1/tasks/{id}Delete task
GET/api/v1/tasks/{id}/historyTask history
GET/api/v1/tasks/statsTask statistics
GET/api/v1/tasks/queueTask queue
GET/api/v1/tasks/active-leasesActive task leases

Conversations

MethodPathDescription
GET/api/v1/conversationsList conversations
POST/api/v1/conversationsCreate conversation
GET/api/v1/conversations/{id}Get conversation
DELETE/api/v1/conversations/{id}Delete conversation
GET/api/v1/conversations/{id}/messagesGet messages
POST/api/v1/conversations/{id}/messagesAdd message
POST/api/v1/conversations/{id}/attach-agentAttach agent
GET/api/v1/conversations/{id}/contextContext window
GET/api/v1/conversations/{id}/searchSearch messages
POST/api/v1/conversations/{id}/archiveArchive

Channels (OpenClaw)

Multi-channel communication: Slack, email, Zalo, bot tokens.

MethodPathDescription
GET/api/v1/openclaw/channels/availableAvailable channel types
GET/api/v1/openclaw/channels/configuredConfigured channels
POST/api/v1/openclaw/channels/loginAuthenticate channel
POST/api/v1/openclaw/channels/add/slackAdd Slack channel
POST/api/v1/openclaw/channels/add/bot-tokenAdd bot token channel
DELETE/api/v1/openclaw/channels/removeRemove channel
GET/api/v1/openclaw/channels/{channel}/statusChannel status
GET/api/v1/agents/{id}/channelsAgent's channels

Zalo

MethodPathDescription
POST/api/v1/zalo/connectConnect Zalo
GET/api/v1/zalo/oauth/authorizeOAuth authorize
GET/api/v1/zalo/statusZalo status

Networking (WireGuard Mesh)

Secure agent mesh networking.

MethodPathDescription
GET/api/v1/network/peersList peers
GET/api/v1/network/topologyNetwork topology
GET/api/v1/network/ip-poolIP pool
POST/api/v1/wireguard/provisionProvision WireGuard peer
GET/api/v1/wireguard/peersList WireGuard peers
GET/api/v1/wireguard/healthWireGuard health
GET/api/v1/wireguard/qualityConnection quality
GET/api/v1/wireguard/pool/statsPool statistics

Security & API Keys

MethodPathDescription
GET/api/v1/api-keysList configured service API keys
POST/api/v1/api-keys/{service}Store API key for service
POST/api/v1/api-keys/{service}/verifyVerify API key
GET/api/v1/settings/api-keysSettings: API keys
POST/api/v1/settings/api-keysAdd key
DELETE/api/v1/settings/api-keys/{id}Remove key
POST/api/v1/settings/api-keys/testTest key
GET/api/v1/security/audit-logsAudit logs
GET/api/v1/security/tokensActive tokens
POST/api/v1/security/tokensIssue token
POST/api/v1/security/tokens/{jti}/rotateRotate token

Team

MethodPathDescription
GET/api/v1/team/membersList members
POST/api/v1/team/members/inviteInvite member
PATCH/api/v1/team/members/{id}/roleUpdate role
DELETE/api/v1/team/members/{id}Remove member
POST/api/v1/team/members/accept-invite/{token}Accept invite

Templates

MethodPathDescription
GET/api/v1/templatesList agent templates
GET/api/v1/templates/{id}Get template
POST/api/v1/templates/seedSeed default templates

Health & Metrics

MethodPathDescription
GET/healthService health
GET/metricsPrometheus metrics
GET/rate-limit-statusRate limit status
GET/api/v1/db/healthDB health
GET/api/v1/db/pool-statsDB pool stats
GET/api/v1/metricsApp metrics