Overview
The ArgentOS gateway exposes a WebSocket-based RPC interface on port 18789 (configurable). All dashboard interactions, CLI commands, and external integrations communicate through this protocol.
The protocol uses JSON-RPC style messages: each request has a method and params, each response returns a result or error.
Connection
WebSocket URL
Authentication
After connecting, the client must authenticate with a challenge-response:
Server sends challenge
Server sends connect.challenge event with a nonce
Client responds
Client responds with the gateway token (from ~/.argentos/argent.json or ARGENT_GATEWAY_TOKEN)
Server validates
Server validates and grants access
The gateway token is auto-generated on first run. It can be found in argent.json under gateway.token or retrieved via argent gateway status.
Client Registration
On successful auth, the client registers with:
Client modes:
operator — Full access (dashboard, CLI)
node — Limited access (compute nodes)
device — Device access (paired devices)
Server-Sent Events
The gateway pushes events to connected clients:
Chat Methods
chat.send
Send a message to the agent and receive a streaming response.
Response streams via agent events with token deltas.
chat.history
Retrieve chat history for a session.
chat.abort
Stop a running agent turn.
Agent Methods
agent
Send a command to the agent (general purpose).
agent.wait
Wait for a running agent turn to complete.
agent.identity.get
Get the agent’s identity information.
Configuration Methods
config.get
Get the current configuration.
config.set
Set a configuration value.
config.patch
Apply multiple configuration changes atomically.
config.schema
Get the full configuration schema.
Session Methods
sessions.list
List all agent sessions.
sessions.preview
Preview a session’s content.
sessions.reset
Reset a session (clear history).
sessions.compact
Compact a session (summarize and truncate old messages).
Cron Methods
cron.list
List all cron jobs.
cron.add
Create a new cron job.
cron.update
Update an existing cron job.
cron.run
Force-run a cron job.
cron.remove
Delete a cron job.
Model Methods
models.list
List available models and providers.
Returns provider registry entries with model capabilities, pricing, and availability status.
Knowledge Methods
knowledge.search
Search the knowledge library.
knowledge.ingest
Ingest a document into the knowledge library.
knowledge.library.list
List documents in the knowledge library.
knowledge.collections.list
List all knowledge collections.
Execution Worker Methods
execution.worker.status
Get execution worker status and metrics.
execution.worker.runNow
Trigger an immediate execution worker cycle.
execution.worker.pause / resume
Pause or resume the execution worker.
Channel Methods
channels.status
Get status of all configured channels.
send
Send an outbound message through a channel.
Health & Status Methods
health
Get gateway health status.
status
Get comprehensive system status.
system-presence
Get current agent presence state.
TTS Methods
tts.status
Get TTS provider status.
tts.convert
Convert text to speech.
Agents Methods
agents.list
List all configured agents.
agents.files.list / get / set
Manage agent alignment documents.
Error Codes
Scopes
Methods are grouped into access scopes:
Key Files