@matthias-hausberger/beige 0.1.0 β 0.1.1
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.
- package/README.md +94 -158
- package/config.schema.json +352 -0
- package/dist/channels/tui.js +4 -4
- package/dist/channels/tui.js.map +1 -1
- package/dist/cli.js +36 -32
- package/dist/cli.js.map +1 -1
- package/dist/config/loader.js +2 -2
- package/dist/config/loader.js.map +1 -1
- package/dist/config/schema.d.ts +151 -86
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/schema.js +139 -13
- package/dist/config/schema.js.map +1 -1
- package/dist/gateway/gateway.d.ts.map +1 -1
- package/dist/gateway/gateway.js +3 -3
- package/dist/gateway/gateway.js.map +1 -1
- package/dist/gateway/provider-health.js +2 -2
- package/dist/gateway/provider-health.js.map +1 -1
- package/dist/gateway/session-settings.js +2 -2
- package/dist/gateway/session-settings.js.map +1 -1
- package/dist/gateway/sessions.js +2 -2
- package/dist/gateway/sessions.js.map +1 -1
- package/dist/install.d.ts +6 -20
- package/dist/install.d.ts.map +1 -1
- package/dist/install.js +15 -33
- package/dist/install.js.map +1 -1
- package/dist/paths.d.ts +22 -0
- package/dist/paths.d.ts.map +1 -0
- package/dist/paths.js +30 -0
- package/dist/paths.js.map +1 -0
- package/dist/sandbox/manager.js +2 -2
- package/dist/sandbox/manager.js.map +1 -1
- package/dist/test/fixtures.js +5 -5
- package/dist/test/fixtures.js.map +1 -1
- package/dist/toolkit/installer.d.ts.map +1 -1
- package/dist/toolkit/installer.js +14 -12
- package/dist/toolkit/installer.js.map +1 -1
- package/dist/toolkit/registry.d.ts.map +1 -1
- package/dist/toolkit/registry.js +20 -13
- package/dist/toolkit/registry.js.map +1 -1
- package/package.json +5 -3
- package/tools/kv/index.ts +7 -2
package/README.md
CHANGED
|
@@ -1,210 +1,146 @@
|
|
|
1
|
-
# Beige
|
|
2
|
-
|
|
3
1
|
Secure, sandboxed agent system. Let agents write and execute code β safely.
|
|
4
2
|
|
|
5
|
-
|
|
3
|
+
**[Documentation](https://beige.mintlify.app)** β Full docs at beige.mintlify.app
|
|
6
4
|
|
|
7
|
-
|
|
5
|
+
---
|
|
8
6
|
|
|
9
|
-
|
|
7
|
+
## Why Beige?
|
|
10
8
|
|
|
11
|
-
|
|
12
|
-
- π **Sandboxed** β Every agent runs in its own Docker container. No access to host env vars, secrets, or files.
|
|
13
|
-
- π **Audited** β Every tool call is logged with agent identity, args, timing, and permission decision.
|
|
14
|
-
- π‘οΈ **Policy-enforced** β Deny by default. Agents can only use tools explicitly granted in config.
|
|
15
|
-
- π **Extensible** β Add tools as simple packages. They mount into sandboxes read-only.
|
|
16
|
-
- π€ **LLM-agnostic** β Uses [pi SDK](https://pi.dev) for LLM interaction. Supports Anthropic, OpenAI, ZAI, and more.
|
|
9
|
+
Traditional tool-calling requires the LLM to invoke tools one at a time. Each result goes back through the model, wasting tokens and time. Complex workflows require dozens of individual tool calls.
|
|
17
10
|
|
|
18
|
-
|
|
11
|
+
**Beige agents can write and run code.** Instead of calling a tool 20 times, the agent writes a script that does it in a loop. The LLM only sees the final result.
|
|
19
12
|
|
|
20
|
-
Beige has two install modes. Pick the one that fits you.
|
|
21
13
|
|
|
22
|
-
|
|
14
|
+
| Beige | Traditional LLM |
|
|
15
|
+
| ------------------------------------------------------------------ | ---------------------------------------------------------- |
|
|
16
|
+
| **1 round-trip** β agent writes a script, runs it, gets one result | **20 round-trips** β each tool call goes through the model |
|
|
17
|
+
| 20 KV lookups happen inside the sandbox | 20Γ the latency, 20Γ the token overhead |
|
|
23
18
|
|
|
24
|
-
|
|
19
|
+
|
|
20
|
+
### Beige β write then exec
|
|
21
|
+
|
|
22
|
+
The agent writes a TypeScript file, then executes it. One round-trip to the LLM.
|
|
23
|
+
|
|
24
|
+
```typescript fetch-users.ts
|
|
25
|
+
const users = [];
|
|
26
|
+
for (let i = 1; i <= 20; i++) {
|
|
27
|
+
const result = await exec(`/tools/bin/kv get user:${i}`);
|
|
28
|
+
users.push(JSON.parse(result));
|
|
29
|
+
}
|
|
30
|
+
console.log(JSON.stringify(users));
|
|
31
|
+
```
|
|
25
32
|
|
|
26
33
|
```bash
|
|
27
|
-
|
|
34
|
+
write /workspace/fetch-users.ts
|
|
35
|
+
exec deno run /workspace/fetch-users.ts
|
|
28
36
|
```
|
|
29
37
|
|
|
30
|
-
|
|
38
|
+
**Result returned to LLM:** one JSON array β done.
|
|
31
39
|
|
|
32
|
-
|
|
33
|
-
export ANTHROPIC_API_KEY="sk-ant-..."
|
|
40
|
+
**Every tool call β including the ones called by a script β is routed through the gateway.** The gateway checks permissions, enforces policy, and ensures secrets never reach the sandbox.
|
|
34
41
|
|
|
35
|
-
|
|
36
|
-
beige gateway start
|
|
42
|
+
### Traditional LLM
|
|
37
43
|
|
|
38
|
-
|
|
39
|
-
|
|
44
|
+
Without a code runtime the LLM must call the tool once per item. Slow, unsafe, error-prone, not easily reproducible:
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
β tool_call: kv get user:1
|
|
48
|
+
β result: {"id":1,"name":"Alice"}
|
|
49
|
+
β tool_call: kv get user:2
|
|
50
|
+
β result: {"id":2,"name":"Bob"}
|
|
51
|
+
... 18 more calls ...
|
|
40
52
|
```
|
|
41
53
|
|
|
42
|
-
|
|
54
|
+
---
|
|
43
55
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
56
|
+
## Key Principles
|
|
57
|
+
|
|
58
|
+
- **Sandboxed** β Every agent runs in its own Docker container. No access to host env vars, secrets, or files.
|
|
59
|
+
- **Audited** β Every tool call is logged with agent identity, args, timing, and permission decision.
|
|
60
|
+
- **Policy-enforced** β Deny by default. Agents can only use tools explicitly granted in config.
|
|
61
|
+
- **Extensible** β Add tools as simple packages. They mount into sandboxes read-only.
|
|
62
|
+
- **LLM-agnostic** β Uses [pi SDK](https://pi.dev) for LLM interaction. Supports Anthropic, OpenAI, ZAI, and more.
|
|
47
63
|
|
|
48
|
-
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## Quick Start
|
|
49
67
|
|
|
50
68
|
**Prerequisites:** Node.js 22+, Docker
|
|
51
69
|
|
|
70
|
+
Install Beige globally:
|
|
71
|
+
|
|
52
72
|
```bash
|
|
53
|
-
|
|
54
|
-
cd beige
|
|
55
|
-
npm install
|
|
56
|
-
npm run build:sandbox # build the sandbox Docker image
|
|
73
|
+
npm install -g matthias-hausberger/beige
|
|
57
74
|
```
|
|
58
75
|
|
|
59
|
-
|
|
76
|
+
Set your Anthropic API key (you can also set this in your `~/.beige/config.json5` config after you started the gateway for the first time):
|
|
60
77
|
|
|
61
78
|
```bash
|
|
62
|
-
cp examples/config.json5 ~/.beige/config.json5
|
|
63
|
-
# Edit ~/.beige/config.json5: set your API key and adjust tool paths
|
|
64
79
|
export ANTHROPIC_API_KEY="sk-ant-..."
|
|
80
|
+
```
|
|
65
81
|
|
|
66
|
-
|
|
67
|
-
npx tsx src/cli.ts gateway start --foreground
|
|
82
|
+
Start the gateway:
|
|
68
83
|
|
|
69
|
-
|
|
70
|
-
|
|
84
|
+
```bash
|
|
85
|
+
beige gateway start
|
|
71
86
|
```
|
|
72
87
|
|
|
73
|
-
|
|
88
|
+
Open the TUI. Alternatively you can also use [Telegram](https://beige.mintlify.app/channels/telegram) or add your own channel plugin:
|
|
74
89
|
|
|
75
|
-
|
|
90
|
+
```bash
|
|
91
|
+
beige tui
|
|
92
|
+
```
|
|
76
93
|
|
|
77
|
-
|
|
94
|
+
On first run, Beige creates `~/.beige/` with a default config and the bundled KV tool.
|
|
78
95
|
|
|
79
|
-
|
|
80
|
-
|---------|-------------|
|
|
81
|
-
| `/new` | Start a fresh conversation session |
|
|
82
|
-
| `/resume` | Pick a previous session to continue |
|
|
83
|
-
| `/sessions` | List saved sessions for the current agent |
|
|
84
|
-
| `/agent [name]` | Switch to a different beige agent (with tab-completion) |
|
|
96
|
+
You can also use **[any other LLM Provider](https://beige.mintlify.app/agents/providers)**.
|
|
85
97
|
|
|
86
|
-
|
|
98
|
+
See the [installation guide](https://beige.mintlify.app/installation) for details.
|
|
87
99
|
|
|
88
|
-
|
|
89
|
-
Channels
|
|
90
|
-
βββ TUI (pi interactive mode)
|
|
91
|
-
βββ Telegram bot
|
|
92
|
-
β
|
|
93
|
-
βΌ
|
|
94
|
-
Gateway (always running)
|
|
95
|
-
βββ Agent Manager β LLM (via pi SDK) β Core Tools
|
|
96
|
-
β β
|
|
97
|
-
β βΌ
|
|
98
|
-
β Docker Sandbox
|
|
99
|
-
β βββ /workspace (rw)
|
|
100
|
-
β βββ /tools/bin (ro)
|
|
101
|
-
β βββ /tools/packages (ro)
|
|
102
|
-
β
|
|
103
|
-
βββ Unix Socket β Tool launchers call back to gateway
|
|
104
|
-
β
|
|
105
|
-
βΌ
|
|
106
|
-
Policy Engine β Audit Logger β Tool Runner
|
|
107
|
-
```
|
|
100
|
+
---
|
|
108
101
|
|
|
109
102
|
## Documentation
|
|
110
103
|
|
|
111
|
-
Full documentation
|
|
112
|
-
|
|
113
|
-
| Section | Description |
|
|
114
|
-
|---------|-------------|
|
|
115
|
-
| [**Introduction**](https://beige.mintlify.app/introduction) | What Beige is, why we built it, and how it works |
|
|
116
|
-
| [**Getting Started**](https://beige.mintlify.app/getting-started) | Install and run your first agent |
|
|
117
|
-
| [**The Gateway**](https://beige.mintlify.app/gateway) | Deep dive into architecture and security |
|
|
118
|
-
| [**Agents**](https://beige.mintlify.app/agents) | Configure providers, models, tools, and skills |
|
|
119
|
-
| [**Channels & Tools**](https://beige.mintlify.app/channels-and-tools) | TUI, Telegram, HTTP API, and extensibility |
|
|
120
|
-
|
|
121
|
-
### Reference Documentation
|
|
122
|
-
|
|
123
|
-
- [Configuration Reference](docs/configuration.mdx) β Complete config file reference
|
|
124
|
-
- [Tools Reference](docs/tools.mdx) β Tool packages, launchers, socket protocol
|
|
125
|
-
- [Toolkits Reference](docs/toolkits.mdx) β Installing and creating toolkits
|
|
126
|
-
- [Skills Reference](docs/skills.mdx) β Creating knowledge packages
|
|
127
|
-
- [HTTP API Reference](docs/api.mdx) β Full REST API reference
|
|
128
|
-
- [Security Model](docs/security-model.mdx) β Threat model and defense in depth
|
|
129
|
-
|
|
130
|
-
### Design Documents
|
|
131
|
-
|
|
132
|
-
- [Vision](docs/design/vision.md) β Original design goals
|
|
133
|
-
- [Use Cases](docs/design/usecases.md) β Personal use cases that motivated the project
|
|
134
|
-
|
|
135
|
-
### External Resources
|
|
136
|
-
|
|
137
|
-
- [pi SDK](https://pi.dev) β The LLM SDK that powers Beige
|
|
138
|
-
- [OpenClaw](https://openclaw.ai) β Inspiration for personal agents
|
|
139
|
-
- ["What if you don't need MCP?"](https://mariozechner.at/posts/2025-11-02-what-if-you-dont-need-mcp/) β Why CLI tools beat MCP bloat
|
|
140
|
-
- ["Code Mode"](https://blog.cloudflare.com/code-mode/) β Why LLMs are better at writing code than calling tools
|
|
141
|
-
|
|
142
|
-
## Configuration
|
|
143
|
-
|
|
144
|
-
Config is a single JSON5 file (JSON with comments) at `~/.beige/config.json5`. See [examples/config.json5](examples/config.json5) for a template.
|
|
145
|
-
|
|
146
|
-
```json5
|
|
147
|
-
{
|
|
148
|
-
llm: {
|
|
149
|
-
providers: {
|
|
150
|
-
anthropic: { apiKey: "${ANTHROPIC_API_KEY}" },
|
|
151
|
-
},
|
|
152
|
-
},
|
|
153
|
-
tools: {
|
|
154
|
-
kv: { path: "./tools/kv", target: "gateway" },
|
|
155
|
-
},
|
|
156
|
-
agents: {
|
|
157
|
-
assistant: {
|
|
158
|
-
model: { provider: "anthropic", model: "claude-sonnet-4-20250514" },
|
|
159
|
-
tools: ["kv"],
|
|
160
|
-
},
|
|
161
|
-
},
|
|
162
|
-
channels: {
|
|
163
|
-
telegram: {
|
|
164
|
-
enabled: true,
|
|
165
|
-
token: "${TELEGRAM_BOT_TOKEN}",
|
|
166
|
-
allowedUsers: [123456789],
|
|
167
|
-
agentMapping: { default: "assistant" },
|
|
168
|
-
},
|
|
169
|
-
},
|
|
170
|
-
}
|
|
171
|
-
```
|
|
104
|
+
Full documentation at **[beige.mintlify.app](https://beige.mintlify.app)**:
|
|
172
105
|
|
|
173
|
-
## Tools
|
|
174
106
|
|
|
175
|
-
|
|
107
|
+
| Section | Description |
|
|
108
|
+
| ------------------------------------------------------------------- | ------------------------------------------- |
|
|
109
|
+
| [Getting Started](https://beige.mintlify.app/installation) | Install and run your first agent |
|
|
110
|
+
| [Gateway](https://beige.mintlify.app/gateway) | Core concepts, tool calls, operations |
|
|
111
|
+
| [Agents](https://beige.mintlify.app/agents) | Configure providers, models, tools, skills |
|
|
112
|
+
| [Channels](https://beige.mintlify.app/channels) | TUI, Telegram, HTTP API |
|
|
113
|
+
| [Tools](https://beige.mintlify.app/tools) | Core tools, building custom tools, toolkits |
|
|
114
|
+
| [Config Reference](https://beige.mintlify.app/agents/configuration) | Complete config file reference |
|
|
115
|
+
| [CLI Reference](https://beige.mintlify.app/cli) | All CLI commands and flags |
|
|
176
116
|
|
|
177
|
-
```
|
|
178
|
-
tools/my-tool/
|
|
179
|
-
βββ tool.json # Name, description, commands
|
|
180
|
-
βββ index.ts # Handler (gateway-targeted) or logic (sandbox-targeted)
|
|
181
|
-
βββ README.md # Documentation (mounted into sandbox for agent context)
|
|
182
|
-
```
|
|
183
117
|
|
|
184
|
-
|
|
118
|
+
---
|
|
185
119
|
|
|
186
|
-
##
|
|
120
|
+
## Contributing
|
|
187
121
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
122
|
+
All contributions are welcome. See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup.
|
|
123
|
+
|
|
124
|
+
For source installs, Beige runs entirely inside the repo β no files are written to your home directory.
|
|
125
|
+
|
|
126
|
+
Clone and install:
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
git clone https://github.com/matthias-hausberger/beige.git
|
|
130
|
+
cd beige
|
|
131
|
+
pnpm install
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
Run setup:
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
pnpm run beige setup
|
|
138
|
+
```
|
|
193
139
|
|
|
194
|
-
|
|
140
|
+
This sets `BEIGE_HOME=./.beige` automatically, so the repo is self-contained.
|
|
195
141
|
|
|
196
|
-
|
|
197
|
-
- [x] Config system
|
|
198
|
-
- [x] Docker sandbox manager
|
|
199
|
-
- [x] Core tools (read, write, patch, exec)
|
|
200
|
-
- [x] Unix socket server for tool routing
|
|
201
|
-
- [x] Policy engine
|
|
202
|
-
- [x] Audit logging
|
|
203
|
-
- [x] KV tool (gateway-hosted)
|
|
204
|
-
- [x] Telegram channel (GrammY)
|
|
205
|
-
- [x] Interactive TUI (via pi SDK InteractiveMode)
|
|
206
|
-
- [x] LLM integration via pi SDK
|
|
142
|
+
---
|
|
207
143
|
|
|
208
144
|
## License
|
|
209
145
|
|
|
210
|
-
MIT
|
|
146
|
+
MIT
|
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "BeigeConfig",
|
|
4
|
+
"description": "Beige configuration file (config.json5). JSON5 format β comments and trailing commas are allowed.",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": [
|
|
7
|
+
"llm",
|
|
8
|
+
"tools",
|
|
9
|
+
"agents"
|
|
10
|
+
],
|
|
11
|
+
"properties": {
|
|
12
|
+
"llm": {
|
|
13
|
+
"title": "LLMConfig",
|
|
14
|
+
"type": "object",
|
|
15
|
+
"required": [
|
|
16
|
+
"providers"
|
|
17
|
+
],
|
|
18
|
+
"properties": {
|
|
19
|
+
"providers": {
|
|
20
|
+
"description": "Named LLM providers. Each key becomes a provider name agents can reference.",
|
|
21
|
+
"type": "object",
|
|
22
|
+
"patternProperties": {
|
|
23
|
+
"^(.*)$": {
|
|
24
|
+
"title": "LLMProviderConfig",
|
|
25
|
+
"type": "object",
|
|
26
|
+
"properties": {
|
|
27
|
+
"apiKey": {
|
|
28
|
+
"description": "API key. Use \"${VAR_NAME}\" to read from environment. Not required for local providers (e.g. Ollama).",
|
|
29
|
+
"type": "string"
|
|
30
|
+
},
|
|
31
|
+
"baseUrl": {
|
|
32
|
+
"description": "Custom API endpoint URL. Required for non-built-in providers (ZAI, Groq, Ollama, etc.).",
|
|
33
|
+
"type": "string"
|
|
34
|
+
},
|
|
35
|
+
"api": {
|
|
36
|
+
"description": "API protocol. Auto-set for built-in providers (anthropic, openai, google). Required for custom providers.",
|
|
37
|
+
"anyOf": [
|
|
38
|
+
{
|
|
39
|
+
"const": "anthropic-messages",
|
|
40
|
+
"type": "string"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"const": "openai-completions",
|
|
44
|
+
"type": "string"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"const": "openai-responses",
|
|
48
|
+
"type": "string"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"const": "google-generative-ai",
|
|
52
|
+
"type": "string"
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"tools": {
|
|
63
|
+
"description": "Tool registry. Each key becomes the tool name used in agent configs and /tools/bin/.",
|
|
64
|
+
"type": "object",
|
|
65
|
+
"patternProperties": {
|
|
66
|
+
"^(.*)$": {
|
|
67
|
+
"title": "ToolConfig",
|
|
68
|
+
"type": "object",
|
|
69
|
+
"required": [
|
|
70
|
+
"path",
|
|
71
|
+
"target"
|
|
72
|
+
],
|
|
73
|
+
"properties": {
|
|
74
|
+
"path": {
|
|
75
|
+
"description": "Path to the tool package directory. Resolved relative to the config file unless absolute.",
|
|
76
|
+
"type": "string"
|
|
77
|
+
},
|
|
78
|
+
"target": {
|
|
79
|
+
"description": "\"gateway\" runs the handler on the host process. \"sandbox\" is planned.",
|
|
80
|
+
"anyOf": [
|
|
81
|
+
{
|
|
82
|
+
"const": "gateway",
|
|
83
|
+
"type": "string"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"const": "sandbox",
|
|
87
|
+
"type": "string"
|
|
88
|
+
}
|
|
89
|
+
]
|
|
90
|
+
},
|
|
91
|
+
"config": {
|
|
92
|
+
"description": "Arbitrary config object passed to createHandler(config) at startup",
|
|
93
|
+
"type": "object",
|
|
94
|
+
"patternProperties": {
|
|
95
|
+
"^(.*)$": {}
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
"_toolkit": {
|
|
99
|
+
"description": "Internal: set by the loader for tools auto-discovered from toolkits",
|
|
100
|
+
"type": "string"
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"skills": {
|
|
107
|
+
"description": "Skill registry. Each key becomes the skill name used in agent configs.",
|
|
108
|
+
"type": "object",
|
|
109
|
+
"patternProperties": {
|
|
110
|
+
"^(.*)$": {
|
|
111
|
+
"title": "SkillConfig",
|
|
112
|
+
"type": "object",
|
|
113
|
+
"required": [
|
|
114
|
+
"path"
|
|
115
|
+
],
|
|
116
|
+
"properties": {
|
|
117
|
+
"path": {
|
|
118
|
+
"description": "Path to the skill package directory. Resolved relative to the config file unless absolute.",
|
|
119
|
+
"type": "string"
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
"agents": {
|
|
126
|
+
"description": "Agent definitions. Each agent gets its own Docker sandbox, Unix socket, and LLM session.",
|
|
127
|
+
"type": "object",
|
|
128
|
+
"patternProperties": {
|
|
129
|
+
"^(.*)$": {
|
|
130
|
+
"title": "AgentConfig",
|
|
131
|
+
"type": "object",
|
|
132
|
+
"required": [
|
|
133
|
+
"model",
|
|
134
|
+
"tools"
|
|
135
|
+
],
|
|
136
|
+
"properties": {
|
|
137
|
+
"model": {
|
|
138
|
+
"title": "ModelRef",
|
|
139
|
+
"type": "object",
|
|
140
|
+
"required": [
|
|
141
|
+
"provider",
|
|
142
|
+
"model"
|
|
143
|
+
],
|
|
144
|
+
"properties": {
|
|
145
|
+
"provider": {
|
|
146
|
+
"description": "Provider name β must match a key in llm.providers",
|
|
147
|
+
"type": "string"
|
|
148
|
+
},
|
|
149
|
+
"model": {
|
|
150
|
+
"description": "Model ID as the provider expects it",
|
|
151
|
+
"type": "string"
|
|
152
|
+
},
|
|
153
|
+
"thinkingLevel": {
|
|
154
|
+
"description": "Extended thinking budget. Only affects models that support it.",
|
|
155
|
+
"anyOf": [
|
|
156
|
+
{
|
|
157
|
+
"const": "off",
|
|
158
|
+
"type": "string"
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"const": "minimal",
|
|
162
|
+
"type": "string"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"const": "low",
|
|
166
|
+
"type": "string"
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"const": "medium",
|
|
170
|
+
"type": "string"
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"const": "high",
|
|
174
|
+
"type": "string"
|
|
175
|
+
}
|
|
176
|
+
]
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
"fallbackModels": {
|
|
181
|
+
"description": "Fallback models tried in order when the primary model fails or is rate-limited",
|
|
182
|
+
"type": "array",
|
|
183
|
+
"items": {
|
|
184
|
+
"title": "ModelRef",
|
|
185
|
+
"type": "object",
|
|
186
|
+
"required": [
|
|
187
|
+
"provider",
|
|
188
|
+
"model"
|
|
189
|
+
],
|
|
190
|
+
"properties": {
|
|
191
|
+
"provider": {
|
|
192
|
+
"description": "Provider name β must match a key in llm.providers",
|
|
193
|
+
"type": "string"
|
|
194
|
+
},
|
|
195
|
+
"model": {
|
|
196
|
+
"description": "Model ID as the provider expects it",
|
|
197
|
+
"type": "string"
|
|
198
|
+
},
|
|
199
|
+
"thinkingLevel": {
|
|
200
|
+
"description": "Extended thinking budget. Only affects models that support it.",
|
|
201
|
+
"anyOf": [
|
|
202
|
+
{
|
|
203
|
+
"const": "off",
|
|
204
|
+
"type": "string"
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"const": "minimal",
|
|
208
|
+
"type": "string"
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
"const": "low",
|
|
212
|
+
"type": "string"
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
"const": "medium",
|
|
216
|
+
"type": "string"
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"const": "high",
|
|
220
|
+
"type": "string"
|
|
221
|
+
}
|
|
222
|
+
]
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
},
|
|
227
|
+
"tools": {
|
|
228
|
+
"description": "Tool names from the tools registry that this agent can invoke",
|
|
229
|
+
"type": "array",
|
|
230
|
+
"items": {
|
|
231
|
+
"type": "string"
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
"skills": {
|
|
235
|
+
"description": "Skill names from the skills registry mounted into this agent's sandbox",
|
|
236
|
+
"type": "array",
|
|
237
|
+
"items": {
|
|
238
|
+
"type": "string"
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
"sandbox": {
|
|
242
|
+
"title": "SandboxConfig",
|
|
243
|
+
"type": "object",
|
|
244
|
+
"properties": {
|
|
245
|
+
"image": {
|
|
246
|
+
"description": "Docker image name. Default: \"beige-sandbox:latest\"",
|
|
247
|
+
"type": "string"
|
|
248
|
+
},
|
|
249
|
+
"extraMounts": {
|
|
250
|
+
"description": "Additional hostβcontainer bind mounts. Reduces isolation β use carefully.",
|
|
251
|
+
"type": "object",
|
|
252
|
+
"patternProperties": {
|
|
253
|
+
"^(.*)$": {
|
|
254
|
+
"type": "string"
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
"extraEnv": {
|
|
259
|
+
"description": "Environment variables passed to the container. Visible to the agent β never use for secrets.",
|
|
260
|
+
"type": "object",
|
|
261
|
+
"patternProperties": {
|
|
262
|
+
"^(.*)$": {
|
|
263
|
+
"type": "string"
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
},
|
|
273
|
+
"gateway": {
|
|
274
|
+
"title": "GatewayServerConfig",
|
|
275
|
+
"type": "object",
|
|
276
|
+
"properties": {
|
|
277
|
+
"host": {
|
|
278
|
+
"description": "HTTP API bind address. Default: \"127.0.0.1\"",
|
|
279
|
+
"type": "string"
|
|
280
|
+
},
|
|
281
|
+
"port": {
|
|
282
|
+
"description": "HTTP API port. Default: 7433",
|
|
283
|
+
"type": "number"
|
|
284
|
+
},
|
|
285
|
+
"logFile": {
|
|
286
|
+
"description": "Daemon stdout/stderr log file. Default: ~/.beige/logs/gateway.log",
|
|
287
|
+
"type": "string"
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
},
|
|
291
|
+
"channels": {
|
|
292
|
+
"title": "ChannelsConfig",
|
|
293
|
+
"type": "object",
|
|
294
|
+
"properties": {
|
|
295
|
+
"telegram": {
|
|
296
|
+
"title": "TelegramChannelConfig",
|
|
297
|
+
"type": "object",
|
|
298
|
+
"required": [
|
|
299
|
+
"enabled",
|
|
300
|
+
"token",
|
|
301
|
+
"allowedUsers",
|
|
302
|
+
"agentMapping"
|
|
303
|
+
],
|
|
304
|
+
"properties": {
|
|
305
|
+
"enabled": {
|
|
306
|
+
"description": "Set to true to activate the Telegram bot",
|
|
307
|
+
"type": "boolean"
|
|
308
|
+
},
|
|
309
|
+
"token": {
|
|
310
|
+
"description": "Telegram bot token from @BotFather. Use \"${TELEGRAM_BOT_TOKEN}\".",
|
|
311
|
+
"type": "string"
|
|
312
|
+
},
|
|
313
|
+
"allowedUsers": {
|
|
314
|
+
"description": "Telegram user IDs permitted to interact with the bot. All others are silently ignored.",
|
|
315
|
+
"type": "array",
|
|
316
|
+
"items": {
|
|
317
|
+
"type": "number"
|
|
318
|
+
}
|
|
319
|
+
},
|
|
320
|
+
"agentMapping": {
|
|
321
|
+
"description": "Maps Telegram chats to agents",
|
|
322
|
+
"type": "object",
|
|
323
|
+
"required": [
|
|
324
|
+
"default"
|
|
325
|
+
],
|
|
326
|
+
"properties": {
|
|
327
|
+
"default": {
|
|
328
|
+
"description": "Agent name that handles all incoming messages",
|
|
329
|
+
"type": "string"
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
},
|
|
333
|
+
"defaults": {
|
|
334
|
+
"title": "ChannelDefaultSettings",
|
|
335
|
+
"type": "object",
|
|
336
|
+
"properties": {
|
|
337
|
+
"verbose": {
|
|
338
|
+
"description": "Send a notification for every tool call the agent makes (e.g. π§ exec: ls). Default: false",
|
|
339
|
+
"type": "boolean"
|
|
340
|
+
},
|
|
341
|
+
"streaming": {
|
|
342
|
+
"description": "Stream responses to the user in real-time. Default: true",
|
|
343
|
+
"type": "boolean"
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
}
|