agentgate 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +50 -10
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -60,21 +60,60 @@ The server runs on port 3050 by default. Set `PORT` environment variable to chan
60
60
  3. Add service accounts (OAuth or API tokens depending on service)
61
61
  4. Create API keys for your agents via CLI
62
62
 
63
- ## API Key Management
63
+ ## Using with Clawdbot / OpenClaw
64
64
 
65
- Manage API keys in the admin UI at `/ui/keys`, or via CLI:
65
+ > ⚠️ **IMPORTANT:** Do NOT run agentgate on the same machine as your AI agent (Clawdbot, OpenClaw, etc.). If the agent has local filesystem access, it could read the database directly and bypass all security controls. Always run agentgate on a **separate, isolated machine** that agents can only reach over the network.
66
66
 
67
- ```bash
68
- # List all API keys
69
- npm run keys list
67
+ ### Configure Your Agent
68
+
69
+ Add agentgate to your agent's `TOOLS.md`:
70
+
71
+ ```markdown
72
+ ### agentgate
73
+ - Base URL: `https://your-agentgate-server.com`
74
+ - Bearer token: `rms_your_key_here`
75
+ - **URL pattern:** `/api/{service}/{accountName}/...`
76
+ - **Reads (GET):** Execute immediately
77
+ - **Writes (POST/PUT/DELETE):** Queue for human approval
78
+
79
+ #### Write Queue
80
+ # Submit write request
81
+ POST /api/queue/{service}/{accountName}/submit
82
+ body: { requests: [{method, path, body}], comment: "why" }
83
+
84
+ # Check status
85
+ GET /api/queue/{service}/{accountName}/status/{id}
86
+ ```
87
+
88
+ Or include in your agent's system prompt:
89
+
90
+ ```
91
+ You have access to agentgate at https://your-server.com
92
+ API key: rms_your_key_here
93
+
94
+ For reads: GET /api/{service}/{account}/path
95
+ For writes: POST to /api/queue/{service}/{account}/submit with {requests, comment}
96
+
97
+ Always include a clear comment explaining your intent for write operations.
98
+ A human will review and approve before execution.
99
+ ```
100
+
101
+ ### Generate a Skill File
70
102
 
71
- # Create a new key
72
- npm run keys create <name>
103
+ agentgate can generate an [AgentSkill](https://docs.openclaw.ai/tools/skills) compatible file:
73
104
 
74
- # Delete a key
75
- npm run keys delete <id>
105
+ ```bash
106
+ curl -H "Authorization: Bearer rms_your_key" \
107
+ https://your-server.com/api/skill > SKILL.md
76
108
  ```
77
109
 
110
+
111
+
112
+ ## API Key Management
113
+
114
+ Create and manage API keys for your agents in the admin UI at `/ui/keys`.
115
+
116
+
78
117
  ## Usage
79
118
 
80
119
  Agents make requests with the API key in the Authorization header:
@@ -207,10 +246,11 @@ BASE_URL=https://agentgate.yourdomain.com npm start
207
246
  ## TODO
208
247
 
209
248
  - [ ] Per-agent service access control - different agents can access different services/accounts
210
-
211
249
  - [ ] Fine-grained endpoint control per service - whitelist/blacklist individual endpoints (even for read operations)
212
250
 
213
251
  ## License
214
252
 
215
253
  ISC
216
254
 
255
+
256
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentgate",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "type": "module",
5
5
  "description": "API gateway for AI agents with human-in-the-loop write approval",
6
6
  "main": "src/index.js",