The problem with traditional AI integration: API keys everywhere. In environment variables. In config files. In logs. Visible to freelancers, AI-generated code, and anyone with container access.
Hoody AI’s solution: No API keys in containers. Period.
constauth='container-dev-env';// Only proves "I am this container"
// Or: 'container-1', 'container-2' for numbered containers
// This auth token:
// - Doesn't work outside your infrastructure
// - Dies when container is deleted
// - Can't be used by freelancers elsewhere
// - Is useless if exfiltrated
Key insight:container-X is not an API key — and the gateway never parses the X. Any bearer token starting with container- tells the gateway to authenticate by container identity, which it resolves from the request’s source address on your server (IP-to-container mapping). The suffix is a label for your own readability.
Usage attribution: The gateway attributes usage to the resolved container (and its owning account) regardless of the token suffix, so pick whatever suffix reads best in your code. Per-container usage tracking isn’t implemented yet; when it ships, per-container attribution will let you:
Track AI consumption by specific workloads
Attribute costs to individual clients/projects
Generate detailed billing reports
Suffix choice changes nothing. Numbered identities (container-1) and descriptive ones (container-dev-alice) are treated identically — tracking, when it ships, will key off the resolved container id, not the token string. Name them for your own readability.
Container → Hoody AI (your server) → AI Provider → Response
What Hoody platform knows:
You created a container
Container has AI enabled
Aggregate spend and request counts, for billing
What Hoody platform DOESN’T know:
Your AI prompts
AI responses
What you’re building
The AI gateway runs on your own server. When shadow logging is configured it records request metadata — method, path, source address, status, duration — but never prompt or response bodies, and never your keys. Hoody provisions the upstream provider key for your account, so aggregate spend and request counts are visible for billing. On paid models the upstream provider receives your prompts and responses; free-tier requests reach the same upstream providers through Hoody-operated accounts.
No container token to rotate. Delete the container and its identity dies with it. (The host-side upstream provider key is separate and does have a normal rotation story.)
Beyond container-level access control, the Hoody Kit agent service (hoody-agent) ships hooks that let you enforce policy at the prompt level. A SessionStart hook’s output is injected into the system prompt for the life of the session — “Never execute destructive commands without asking first” — and a UserPromptSubmit hook can append context to, or outright block, a prompt before it is sent. Treat it as a strong default, not a hard boundary: a system prompt steers a model, it does not constrain it the way a firewall constrains a packet.
You can also monitor what an AI agent reads and writes inside one session. A PostToolUse hook matching Read runs your own logging command every time that agent reads a file. Hooks are session-scoped, not a server-wide monitor, and writing one is a fail-closed two-step: mint a single-use nonce, then spend it.
Use descriptive names that indicate purpose and access level:
Terminal window
container-prod-api# Production workload
container-dev-alice# Developer-specific
container-client-acme# Client-specific
container-untrusted-test# Limited permissions
Names are for your own readability only — the gateway does not parse the suffix, so treat naming as documentation, not as an access-control or audit mechanism.
You own the infrastructure, so you can configure your own AI providers directly on the host instead of using Hoody AI credits. However, you’d need to handle the API key management yourself, which reintroduces the security challenges that Hoody AI solves.
If an attacker gains root access to your server, they could potentially access the Hoody AI configuration. Threat model:
Containers remain isolated from each other
Attacker still needs to know which containers exist
You can instantly revoke by deleting containers
Your provider/gateway API keys are stored on the host (in host-side config, plaintext by default); root on the host can read them, just as with any self-hosted AI gateway
This remains far better than scattering the same keys across every container that needs AI access, but treat the host filesystem as part of the key’s trust boundary. The host’s LUKS full-disk encryption is already on and covers the machine being stolen; it does nothing for root on a running host, which is the threat here. Rotate on suspicion rather than relying on the disk layer.
Not currently. Container-level rate limiting is not yet implemented. AI access is controlled at the container level via the ai boolean flag (enabled/disabled only).