# Managed Agents Provision a private, always-on AI agent that Cohesivity hosts for you — its own isolated compute box, a model source, and the network surface, with zero setup. You say "I want an agent"; Cohesivity launches it, wires it to a model, and gives you one OpenAI-compatible endpoint to talk to it with your existing app key. First agent type: **Hermes** (Nous Research's stateful, long-running CLI agent). **Claimed accounts only.** The agent is account-level: one box per Cohesivity user, reachable by every project you own. ## Plans (flat monthly, from fluid credits) - **Starter — $12/mo:** 4 GB RAM box. - **Pro — $20/mo:** 8 GB RAM box. Compute is a flat monthly fee billed from your fluid credits (scale-to-zero between requests). **A claimed account gets its first month free.** Model inference is billed separately by source (below). ## Provision `POST https://cohesivity.ai/api/agents` with `Authorization: Bearer ` and body `{ "agent_type": "hermes", "plan": "starter" | "pro" }` → `{ status: "active", address, monthly_fee_cents, next_charge_at, trial }`. - `GET https://cohesivity.ai/api/agents` → current status (provisioned, plan, status, next charge). - `DELETE https://cohesivity.ai/api/agents` → unprovision (pauses the box; your data is kept for a 15-day retention window, then the box is terminated — re-provision before then to keep it). - `GET https://cohesivity.ai/api/managed-agents` → catalog, your eligibility, and your current `model_source`. ## Model source Your agent runs on one of two model sources (toggleable): 1. **Your connected Codex subscription** (default when present) — the agent runs on your own ChatGPT/Codex plan; LLM cost lands on that subscription, **$0 against your Cohesivity wallet**. Connect it once (see below). 2. **Cohesivity AI Gateway** — allowlisted OpenAI/Anthropic/Google/xAI models, billed from your fluid credits. Used when you have no connected subscription, or by choice. On rate-limit, Cohesivity suggests the other source rather than silently spilling. There is **no standalone "use Codex directly" product** — a connected Codex subscription exists to power *your managed agent*. ### Connect your Codex subscription (to power the agent) Agent-mediated via OpenAI's official device-code flow — no Cohesivity UI, no key to paste. Account-level *connection*, not a per-tenant resource (do not call `/api/resources/codex`): 1. `POST https://cohesivity.ai/api/codex/connect` with `Authorization: Bearer ` (claimed tenant) → `{ user_code, verification_uri, security_settings_url, wait }`. 2. Tell the human: turn on **Allow device code login** in ChatGPT → Settings → Security (`security_settings_url`), open `verification_uri`, enter `user_code`, and approve. 3. Poll `GET https://cohesivity.ai/api/wait` with the returned `wait` blob until `{ "status": "completed" }`. - `GET https://cohesivity.ai/api/codex` → connection status · `POST https://cohesivity.ai/api/codex/disconnect` → revoke. ## Use the agent Talk to your agent with your **existing app key** — no separate key. OpenAI-compatible: `POST https://cohesivity.ai/edge/managed-agents/v1/chat/completions?key=` with body `{ model, messages, ... }`. The request is forwarded to your private agent box and streamed back; the model runs on your selected source. The app key never reaches the box (Cohesivity resolves a narrow per-agent key server-side). ## Isolation One VM per user (never bin-packed with other tenants). The box holds only a narrow, tenant-scoped agent key — never your wallet-spending app key and never your raw subscription token. It is reachable only through Cohesivity's in-network control path, never publicly.