# AI agents

An AI agent is an autonomous AI bot on its own server in the cloud. The Vibecode platform handles the full lifecycle: infrastructure provisioning, bot registration in Bitrix24, installation and configuration of the Hermes runtime, billing, and updates. The agent's own server is paid from the account wallet separately — it is not included in the Cowork/Code subscription. The agent's AI requests are covered by the Cowork/Code subscription quota when it is connected and active. If the agent's key still runs on the legacy scheme, usage beyond the free allowance is charged to the account wallet; if the key already runs on a subscription seat and the subscription is not active, the request is rejected and nothing is charged.

Control panel: [https://vibecode.bitrix24.com/agents](/agents)

## What an agent includes

An agent is an orchestrator over three components:

| Component | Role |
|---|---|
| **Vibecode API key** | A single endpoint for accessing the Bitrix24 REST API |
| **Bot in Bitrix24** | A bot registered via `imbot`, replies in chats |
| **Server in the cloud** | A VM in Bitrix24 Cloud with the Hermes runtime. The platform picks the plan itself, and the machine runs around the clock |

Everything is created in a single `POST /api/agents` operation. Deletion cascades and removes all three.

## Creation

In the UI:

1. Open [/agents](/agents), click "Create Agent"
2. Specify a name + pick an AI model (default is "auto" — the router picks the model for you)
3. Click "Create" — provisioning runs in the background (~2–3 minutes)

Once ready, the panel shows a prompt preview and a link to the chat with the bot in Bitrix24.

## Models and billing

- AI tokens: when the Cowork/Code subscription is connected and active and the agent's key runs on a subscription seat, usage draws on the subscription quota from the first token. On the legacy (wallet) scheme the first `agentFreeTokens` are free, and usage beyond that is billed by model and charged to the account wallet (see [AI Router](/docs/ai))
- Server: the agent's own server is paid from the account wallet separately, under ServiceType `AGENT` — a per-minute monthly rate. It is not included in the Cowork/Code subscription. An agent on shared placement has no server of its own — there is no separate server line for it
- BYOK (your own OpenAI/Anthropic key): not billed by the platform — only your own provider

## Limitations (beta)

- Cloud servers only (BLACKHOLE mode) — your own servers are no longer supported
- Access to agents is granted by a resolver based on the Bitrix24 account override `Portal.policies.agentsAccess` or the plan policy (`AUTO` / `WAITLIST` / `NONE`); in `WAITLIST` mode, platform-admin approval is required (see `/platform/agents-access`)
- Limit: `maxAgentsPerUser` in Bitrix24 account policies (default 3)
- Policy `agentCreation`: `all` / `admins` / `none`

## Related topics

- [Infrastructure and Black Hole](/docs/infra) — how agent servers work
- [Keys and scopes](/docs/keys-auth) — which scopes an agent needs
- [AI Router](/docs/ai) — LLM providers, BYOK, token billing
- [Bot API](/docs/bots) — if you need your own bot without an AI runtime, see "Managed Bots"

## Related API

Agent management methods are in the session-auth panel `/api/agents/*` (not the V1 API). The V1 API for agents is not published yet — use the UI or contact support.
