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.
API Client
Calling the Web UI API
Mutating API calls require:
- same-origin
OriginorRefererheader - CSRF cookie named
vibe_csrf_token - matching
X-Vibe-CSRF-Tokenheader
Use this local curl pattern:
BASE="http://127.0.0.1:5123"
COOKIE_JAR="$(mktemp)"
CSRF="$(
curl -fsS -c "$COOKIE_JAR" "$BASE/api/csrf-token" \
| python3 -c 'import json,sys; print(json.load(sys.stdin)["csrf_token"])'
)"
curl -fsS -b "$COOKIE_JAR" -c "$COOKIE_JAR" \
-H "Origin: $BASE" \
-H "X-Vibe-CSRF-Token: $CSRF" \
-H "Content-Type: application/json" \
-X POST "$BASE/doctor" \
--data '{}'
For DELETE, use the same cookie jar, Origin, and CSRF header.
When the Web UI is served through Avibe Cloud, the same calls require an authenticated OIDC session cookie issued by /auth/callback. Prefer hitting 127.0.0.1:5123 directly from the local machine for maintenance work.
Do not log full request bodies when they contain tokens or secrets.
Reusable local API helper
For multi-step maintenance, use the bundled helper at scripts/vibe_api.py instead of hand-writing curl commands. The helper handles CSRF, same-origin headers, cookies, JSON encoding, and readable error output.
Resolve paths relative to this skill directory. If the skill is installed at skills/use-avibe, run:
Usage examples:
export VIBE_UI_BASE="http://127.0.0.1:5123"
python3 skills/use-avibe/scripts/vibe_api.py GET /health
python3 skills/use-avibe/scripts/vibe_api.py GET '/api/settings?platform=slack'
python3 skills/use-avibe/scripts/vibe_api.py POST /api/doctor '{}'
python3 skills/use-avibe/scripts/vibe_api.py POST /api/config '{"show_duration":true}'
python3 skills/use-avibe/scripts/vibe_api.py DELETE '/api/users/U123?platform=slack'
Payload can be passed as inline JSON, as @payload.json, or as - to read JSON from stdin.
For a scope update, read the scope's expected_agent_name, then patch only the fields that change:
API_HELPER="skills/use-avibe/scripts/vibe_api.py"
EXPECTED="$(python3 "$API_HELPER" GET '/api/settings?platform=slack' \
| python3 -c 'import json,sys; print(json.dumps(((json.load(sys.stdin).get("channels") or {}).get("C123") or {}).get("expected_agent_name")))')"
python3 "$API_HELPER" PATCH /api/settings/scope "{
\"platform\": \"slack\", \"scope\": \"channel\", \"id\": \"C123\",
\"changes\": {\"enabled\": true, \"routing\": {\"agent_name\": \"codex\", \"model\": \"gpt-5.4\", \"reasoning_effort\": \"high\"}},
\"expected_agent_name\": $EXPECTED
}"