bloom-openclaw
v1.0.1
Published
Automatic security layer for OpenClaw and Node.js AI agents. Routes all API calls through Bloom for authentication, audit logging, and kill switch.
Maintainers
Readme
bloom-openclaw
Security layer for OpenClaw and Node.js AI agents. Routes all API calls through Bloom for authentication, audit logging, and kill switch.
Why?
OpenClaw is powerful. It has full system access, connects to 50+ services, and can execute shell commands. That's exactly why you need guardrails.
Bloom lets you:
- See every API call your agent makes
- Control which endpoints it can access
- Stop it instantly if something goes wrong
- Detect prompt injection attacks
Installation
npm install bloom-openclawQuick Start (3 minutes)
1. Get your credentials
Sign up at platform.bloomtechnologies.app and create an agent.
2. Set environment variables
export BLOOM_API_KEY=your_api_key
export BLOOM_AGENT_ID=your_agent_id3. Choose your integration method
Option A: CLI wrapper (easiest)
Wrap any command - no code changes needed:
npx bloom-openclaw npx openclaw
npx bloom-openclaw node app.js
npx bloom-openclaw npm startOption B: Add one line to your code
// Add at the very top of your entry file
require('bloom-openclaw').init();
// All fetch() calls are now routed through Bloom
const response = await fetch('https://api.openai.com/v1/chat/completions', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ model: 'gpt-4', messages: [...] })
});Option C: Use the wrapper function directly
const { bloomFetch } = require('bloom-openclaw');
const response = await bloomFetch('https://api.openai.com/v1/chat/completions', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ model: 'gpt-4', messages: [...] })
});Configuration
Environment Variables
| Variable | Required | Description |
|----------|----------|-------------|
| BLOOM_API_KEY | Yes | Your Bloom API key |
| BLOOM_AGENT_ID | Yes | Your Bloom agent ID |
| BLOOM_PROXY_URL | No | Proxy URL (default: https://iam.bloomtechnologies.app) |
| BLOOM_ENABLED | No | Set to false to disable (default: true) |
| BLOOM_DEBUG | No | Set to true for debug logging |
Programmatic Configuration
const bloom = require('bloom-openclaw');
bloom.init({
apiKey: 'your_api_key',
agentId: 'your_agent_id',
proxyUrl: 'https://iam.bloomtechnologies.app',
enabled: true,
debug: false
});API
init(options?)
Initialize Bloom and patch global fetch. Call this once at app startup.
disable()
Disable Bloom and restore original fetch behavior.
enable()
Re-enable Bloom after disabling.
isActive()
Returns true if Bloom is currently active.
bloomFetch(url, options?)
Make a single request through Bloom without patching globally.
What Gets Proxied?
All outgoing HTTP requests made via fetch() are automatically routed through Bloom, except:
localhostand127.0.0.1- Bloom's own endpoints
Dashboard
View all your agent's activity at platform.bloomtechnologies.app:
- Real-time API call logs
- Filter by endpoint, method, or time
- Kill switch to terminate agent access instantly
- Scope controls to limit what endpoints the agent can access
Links
License
MIT
