My AI Agents Share a Server. Here’s How I Keep Them Out of Each Other’s Way
Описание и применение
Множественные ИИ‑агенты, работающие на одном сервере, конфликтуют из‑за общего аккаунта. Создавая отдельный tenant и уникальный API‑ключ для каждого агента, можно изолировать их, вращать ключи без простоя и при необходимости отключать отдельного агента, не затрагивая остальных.
Задача
Multiple AI agents sharing a single server caused deployment conflicts and lack of isolation, making it hard to stop or manage individual agents without affecting others.
Результат
Agents operate in isolated tenant spaces, preventing cross‑agent interference. Key rotation is seamless, and misbehaving agents can be stopped instantly without affecting others.
Рабочий процесс
- Create a tenant per agent using the bootstrap token via POST /v1/tenants/register
- Store the returned tenant_id and first API key for admin use
- Create a second, agent‑specific API key with an optional expiry via POST /v1/auth/keys
- Configure the agent to use its dedicated key
- Rotate keys by creating a new key, letting the agent use it, then revoking the old key via DELETE /v1/auth/keys/{id}
- To stop an agent, revoke its key or suspend the tenant via DELETE /v1/tenant and reactivate with the admin token if needed
Доказательства
Creating a tenant is one request with the bootstrap token in a header: curl -s -X POST "$AH_URL/v1/tenants/register" -H "X-Bootstrap-Token: $AH_BOOTSTRAP_TOKEN" -H "Content-Type: application/json" -d '{"name":"blog-agent", "email":"[email protected]"}' # {"tenant_id":"3f9a...","api_key":"8c41....d07e..."}
- Дата записи: 2026-10-23T15:11:32.561Z