The full stack
| Layer | What it solves | Project |
|---|---|---|
| Runtime isolation | Each agent gets its own container, filesystem, and process space. No ambient access to the host. | NanoClaw |
| Credential isolation | Agents never hold raw API keys. Credentials are injected at the proxy level per-request. | OneCLI |
| Policy enforcement | Rules control what agents can access, which operations are allowed, and how often. | OneCLI |
How it works
NanoClaw runs each agent in a Docker container. OneCLI runs as a sidecar (or shared service) that acts as the HTTP gateway for all agent traffic. When NanoClaw spawns an agent container, it configures the agent to route HTTP traffic through OneCLI’s gateway.- NanoClaw creates a Docker container for the agent
- The container’s
HTTP_PROXY/HTTPS_PROXYenvironment variables point to OneCLI’s gateway - The agent makes normal HTTP requests. It doesn’t know OneCLI exists
- OneCLI checks rules (block/rate-limit), injects credentials, and forwards the request
- The response flows back to the agent
Setup
Prerequisites
- Docker running on your machine
- OneCLI running (see Quickstart)
- NanoClaw installed (github.com/qwibitai/nanoclaw)
1. Start OneCLI
2. Configure agents and credentials in OneCLI
You can do this through the dashboard at localhost:10254, or automate it with the OneCLI CLI:- CLI (recommended for automation)
- Dashboard
3. Configure NanoClaw to route through OneCLI
When NanoClaw spawns agent containers, configure them to use OneCLI as their HTTP proxy. The agent containers need:HTTP_PROXYandHTTPS_PROXYpointing to OneCLI’s gateway- The OneCLI CA certificate for HTTPS interception
- A
Proxy-Authorizationheader with the agent’s access token
applyContainerConfig() handles all of this automatically:
Per-agent policies
Since each NanoClaw agent gets its own OneCLI agent identity, you can set different rules per agent:- Your “email-agent” can read emails but not delete them
- Your “code-agent” can access GitHub but not Slack
- Your “research-agent” has read-only access to everything, rate-limited to 100 requests per hour