Sending Messages

What you'll accomplish: Send messages to agents via interactive chat, one-shot CLI commands, the REST API, and channels.

Interactive chat

hoziron chat

Opens a persistent chat session with your default agent. Type messages, get responses. Ctrl+C to exit.

One-shot messages (CLI)

hoziron message my-agent "Summarize the key points of our renewal process"

One-shot messages are ideal for scripting and automation.

REST API

curl -X POST http://localhost:4200/agents/{id}/messages \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer hzk_..." \
  -d '{"content": "How many open claims do we have?"}'

Channels (Slack, Teams)

Set up a channel bridge:

hoziron channel setup slack

Once configured, agents respond to messages in the connected channel.

Session management

Each agent maintains its own conversation history. To reset:

# Via API
curl -X POST http://localhost:4200/agents/{id}/session/reset

To clear history entirely:

curl -X DELETE http://localhost:4200/agents/{id}/history

Multi-context access

If you manage multiple Hoziron instances:

# Add contexts
hoziron context add production --url https://hoziron.prod.internal --auth local --api-key-env HOZIRON_PROD_KEY
hoziron context add staging --url https://hoziron.staging.internal --auth none

# Switch context
hoziron context use production

# Or per-command
hoziron --context staging message my-agent "test message"

Next steps


Related: