Make your computer a home for your AI partner. Avibe is the local-first Agent OS: Vibey, its built-in AI partner, works out of the box, and Claude Code, Codex & OpenCode run unchanged beside it — reach them from your browser, phone, or any chat app.
Channels, Users, and Routing
Changing one scope
PATCH /api/settings/scope changes only the fields it names on one channel, Telegram topic, or bound DM user. Use it for every single-scope edit:
{
"platform": "slack",
"scope": "channel",
"id": "C123",
"changes": {
"enabled": true,
"routing": {"agent_name": "codex", "model": "gpt-5.4", "reasoning_effort": "high"}
},
"expected_agent_name": "<the scope's current expected_agent_name>"
}
scopeischannel,thread(Telegram topics only; add"thread_id"), oruser(the user must already be bound).- Channels and topics take
enabled,show_message_types,custom_cwd,require_mention,require_bind,routing; users takedisplay_name,enabled,show_message_types,custom_cwd,routing. Admin rights keepPOST /api/users/<user_id>/admin. routingmerges key by key into the stored route. A request withroutingmust carryexpected_agent_name: copy it from the scope's latest read (nullfor a scope inheriting the default Agent). If another writer changed the scope's Agent since, the request fails withsettings_conflict(409); read again and retry.- The response's
settingsis the stored row; verify from it.
Channel settings
GET /api/settings?platform=<platform>- returns channel settings, user settings, and bind codes for one platform
POST /api/settings- payload:
{"platform": "<platform>", "channels": {...}} - replaces the entire
channelsmap for that platform; keep it for bulk imports and usePATCH /api/settings/scopefor anything else
- payload:
Channel entry shape:
{
"enabled": true,
"show_message_types": ["assistant"],
"custom_cwd": "/path/to/repo",
"require_mention": null,
"require_bind": null,
"routing": {
"agent_name": "codex",
"model": "gpt-5.4",
"reasoning_effort": "high",
"opencode_agent": null,
"claude_agent": null,
"codex_agent": "reviewer"
},
"expected_agent_name": "codex"
}
Field meanings:
enabled: whether this channel is allowed to use Avibeshow_message_types: visible intermediate messages; allowed values aresystem,assistant,toolcallcustom_cwd: scope-level working directory override; empty string ornullmeans use global defaultrequire_mention:nullinherits the platform default,truerequires mention,falsedisables mention gating for that channelrequire_bind:null/falselets any channel member use the bot (current default);truegates the channel to bound users only — messages from unbound senders are silently ignored (no denial reply), while the bot's own replies stay visible to everyone. Enforced in the shared auth pipeline, so it applies on every platform. Bind is platform-wide, sorequire_bindmeans "is this sender a bound user", not a per-channel allowlist.routing.agent_name: Vibe Agent name for this scope, ornullto inherit the default Agentrouting.model: scope-level model override for the selected Agent;nulluses the Agent's own modelrouting.reasoning_effort: scope-level reasoning override for the selected Agent;nulluses the Agent's ownrouting.<backend>_agent: the native subagent that backend runs for this scopeexpected_agent_name(read-only): the Agent this view of the route is based on; send it back with routing changes- Older releases also used
routing.<backend>_model/routing.<backend>_reasoning_effort. They are retired: never returned or stored, and only read to fill an unsetmodel/reasoning_efforton that built-in backend's route. Do not send them.
DM users and bind codes
GET /api/users?platform=<platform>- returns bound DM users for one platform
POST /api/users- payload:
{"platform": "<platform>", "users": {...}} - writes each included user as a whole row and keeps the others; use
PATCH /api/settings/scopewith"scope": "user"to change a user's fields
- payload:
POST /api/users/<user_id>/admin- payload:
{"platform": "<platform>", "is_admin": true}
- payload:
DELETE /api/users/<user_id>?platform=<platform>- removes a bound user; this is the reliable way to revoke DM access
GET /api/bind-codes- returns all bind codes
POST /api/bind-codes- payload:
{"type": "one_time"}or{"type": "expiring", "expires_at": "2026-04-18"}
- payload:
DELETE /api/bind-codes/<code>- deactivates a bind code
GET /api/setup/first-bind-code- returns an existing valid setup bind code or creates a new one-time code
Change a user's routing, cwd, visibility, or enabled flag with PATCH /api/settings/scope ("scope": "user"); POST /api/users is not a field patch.
User entry shape:
{
"display_name": "Alice",
"is_admin": false,
"bound_at": "2026-03-20T12:34:56+00:00",
"enabled": true,
"show_message_types": ["assistant"],
"custom_cwd": "/path/to/repo",
"routing": {
"agent_name": "claude",
"model": "claude-sonnet-4-6",
"reasoning_effort": "high",
"opencode_agent": null,
"claude_agent": "reviewer",
"codex_agent": null
},
"expected_agent_name": "claude"
}
DM caveat: current DM authorization checks whether the user is bound, not whether enabled is true. If the user wants to revoke DM access, use DELETE /api/users/<user_id>?platform=<platform> instead of only setting enabled to false.
Scope and Precedence Rules
Agent selection
Agent resolution priority is:
- existing Agent Session backend snapshot, when the message belongs to an existing session/thread
- scope-level
routing.agent_nameof the channel, topic, or DM user, for new sessions - global default Vibe Agent from the Agent catalog
- registered backend compatibility fallback, only when no enabled default Agent is available
If the user names a specific channel or DM and wants a specific Agent, use the scope API, not global /api/config. New routing is Agent-based.
Working directory
Working directory resolution is:
custom_cwdon the target channel or user scoperuntime.default_cwdfrom/api/config
Message visibility
show_message_types is scope-local. Preserve existing values unless the user wants an explicit replacement.
If a user asks for "vault messages", "internal messages", or "tool execution messages", map that request to show_message_types. Current Avibe does not expose a separate vault field.
Mention policy
require_mention works like this:
null: inherit platform default from/api/configtrue: require mention in that channelfalse: do not require mention in that channel
Recipes
Route one Slack channel to Codex
Goal:
- enable Slack channel
C123 - route it to Codex
- use Codex subagent
reviewer - use model
gpt-5.4 - set reasoning
high
API flow:
GET /api/settings?platform=slackand notechannels.C123.expected_agent_name(nullwhen the channel has no row yet)PATCH /api/settings/scopewith thatexpected_agent_name:
{
"platform": "slack",
"scope": "channel",
"id": "C123",
"changes": {
"enabled": true,
"routing": {
"agent_name": "codex",
"codex_agent": "reviewer",
"model": "gpt-5.4",
"reasoning_effort": "high"
}
},
"expected_agent_name": null
}
- verify the response's
settings.routing
Route one channel to OpenCode with a subagent
Use PATCH /api/settings/scope and set:
routing.agent_name = "opencode"routing.opencode_agent = "<agent>"routing.model = "<model>"if requestedrouting.reasoning_effort = "<effort>"if requested
If the user wants OpenCode-native defaults, providers, MCP servers, skills, plugins, or API credentials, use OpenCode config instead of Avibe scope routing.
Route one scope to Claude with model and reasoning
Use PATCH /api/settings/scope ("scope": "channel" or "user") and set:
routing.agent_name = "claude"routing.claude_agent = "<agent>"if requestedrouting.model = "<model>"routing.reasoning_effort = "<effort>"
The API normalizes Claude reasoning for incompatible model combinations; verify by reading back the saved payload.
Show tool execution messages in one channel
Use PATCH /api/settings/scope with the target channel's show_message_types plus toolcall.
Preserve existing system and assistant values unless the user asked for a full replacement.
Generate a DM bind code
Use POST /api/bind-codes:
{
"type": "one_time"
}
For an expiring code:
{
"type": "expiring",
"expires_at": "2026-04-18"
}
Do not expose bind codes unless the user explicitly asks for them.