docs: restructure READMEs and add i18n documentation (#1729)
Restructure all 6 README files (en, zh, ja, fr, pt-br, vi) from
~1200-1580 lines down to ~250 lines each. Long sections (Chat Apps,
Providers, Configuration, Docker, Spawn Tasks, Troubleshooting, Tools)
are extracted into dedicated docs under docs/{lang}/ subdirectories.
Changes:
- Split README content into 7 sub-documents per language (42 new files)
- Update News section with v0.2.3/v0.2.1/v0.2.0/20K milestones
- Add 3 new Features (MCP Support, Vision Pipeline, Smart Routing)
- Complete CLI reference (14 commands, was 7)
- Fix Go badge 1.21+ -> 1.25+ (matches go.mod)
- Add LoongArch to architecture badge
- Fix Install section: hardcoded v0.1.1 -> latest/download URL
- Add Termux GitHub links
- Fix currency symbol placement ($599 not 599$)
- Add missing channels (Feishu, Slack, IRC, OneBot, MaixCam, Pico)
- Add missing providers (Kimi, Minimax, Avian, Mistral, Longcat, ModelScope)
- Add missing security docs (allow_read/write_paths, allow_remote, symlink)
- Remove incorrect azure from Providers table (azure uses model_list only)
- Cross-verified all claims against source code
Co-authored-by: BeaconCat <BeaconCat@users.noreply.github.com>
2026-03-18 07:26:39 +00:00
# ⚙️ Configuration Guide
> Back to [README](../README.md)
## ⚙️ Configuration
Config file: `~/.picoclaw/config.json`
2026-04-17 03:41:36 +00:00
> **Security Configuration:** For storing API keys, tokens, and other sensitive data, see the [Security Configuration Guide](../security/security_configuration.md).
2026-03-25 13:20:54 +00:00
docs: restructure READMEs and add i18n documentation (#1729)
Restructure all 6 README files (en, zh, ja, fr, pt-br, vi) from
~1200-1580 lines down to ~250 lines each. Long sections (Chat Apps,
Providers, Configuration, Docker, Spawn Tasks, Troubleshooting, Tools)
are extracted into dedicated docs under docs/{lang}/ subdirectories.
Changes:
- Split README content into 7 sub-documents per language (42 new files)
- Update News section with v0.2.3/v0.2.1/v0.2.0/20K milestones
- Add 3 new Features (MCP Support, Vision Pipeline, Smart Routing)
- Complete CLI reference (14 commands, was 7)
- Fix Go badge 1.21+ -> 1.25+ (matches go.mod)
- Add LoongArch to architecture badge
- Fix Install section: hardcoded v0.1.1 -> latest/download URL
- Add Termux GitHub links
- Fix currency symbol placement ($599 not 599$)
- Add missing channels (Feishu, Slack, IRC, OneBot, MaixCam, Pico)
- Add missing providers (Kimi, Minimax, Avian, Mistral, Longcat, ModelScope)
- Add missing security docs (allow_read/write_paths, allow_remote, symlink)
- Remove incorrect azure from Providers table (azure uses model_list only)
- Cross-verified all claims against source code
Co-authored-by: BeaconCat <BeaconCat@users.noreply.github.com>
2026-03-18 07:26:39 +00:00
### Environment Variables
You can override default paths using environment variables. This is useful for portable installations, containerized deployments, or running picoclaw as a system service. These variables are independent and control different paths.
| Variable | Description | Default Path |
|-------------------|-----------------------------------------------------------------------------------------------------------------------------------------|---------------------------|
| `PICOCLAW_CONFIG` | Overrides the path to the configuration file. This directly tells picoclaw which `config.json` to load, ignoring all other locations. | `~/.picoclaw/config.json` |
| `PICOCLAW_HOME` | Overrides the root directory for picoclaw data. This changes the default location of the `workspace` and other data directories. | `~/.picoclaw` |
**Examples:**
```bash
# Run picoclaw using a specific config file
# The workspace path will be read from within that config file
PICOCLAW_CONFIG=/etc/picoclaw/production.json picoclaw gateway
# Run picoclaw with all its data stored in /opt/picoclaw
# Config will be loaded from the default ~/.picoclaw/config.json
# Workspace will be created at /opt/picoclaw/workspace
PICOCLAW_HOME=/opt/picoclaw picoclaw agent
# Use both for a fully customized setup
PICOCLAW_HOME=/srv/picoclaw PICOCLAW_CONFIG=/srv/picoclaw/main.json picoclaw gateway
```
2026-03-26 01:32:56 +00:00
### Gateway Log Level
`gateway.log_level` controls Gateway log verbosity and is configurable in `config.json` .
```json
{
"gateway": {
2026-03-30 06:44:32 +00:00
"log_level": "warn"
2026-03-26 01:32:56 +00:00
}
}
```
2026-03-30 06:44:32 +00:00
When omitted, the default is `warn` . Supported values: `debug` , `info` , `warn` , `error` , `fatal` .
2026-03-26 01:32:56 +00:00
You can also override this with the environment variable `PICOCLAW_LOG_LEVEL` .
docs: restructure READMEs and add i18n documentation (#1729)
Restructure all 6 README files (en, zh, ja, fr, pt-br, vi) from
~1200-1580 lines down to ~250 lines each. Long sections (Chat Apps,
Providers, Configuration, Docker, Spawn Tasks, Troubleshooting, Tools)
are extracted into dedicated docs under docs/{lang}/ subdirectories.
Changes:
- Split README content into 7 sub-documents per language (42 new files)
- Update News section with v0.2.3/v0.2.1/v0.2.0/20K milestones
- Add 3 new Features (MCP Support, Vision Pipeline, Smart Routing)
- Complete CLI reference (14 commands, was 7)
- Fix Go badge 1.21+ -> 1.25+ (matches go.mod)
- Add LoongArch to architecture badge
- Fix Install section: hardcoded v0.1.1 -> latest/download URL
- Add Termux GitHub links
- Fix currency symbol placement ($599 not 599$)
- Add missing channels (Feishu, Slack, IRC, OneBot, MaixCam, Pico)
- Add missing providers (Kimi, Minimax, Avian, Mistral, Longcat, ModelScope)
- Add missing security docs (allow_read/write_paths, allow_remote, symlink)
- Remove incorrect azure from Providers table (azure uses model_list only)
- Cross-verified all claims against source code
Co-authored-by: BeaconCat <BeaconCat@users.noreply.github.com>
2026-03-18 07:26:39 +00:00
### Workspace Layout
PicoClaw stores data in your configured workspace (default: `~/.picoclaw/workspace` ):
```
~/.picoclaw/workspace/
├── sessions/ # Conversation sessions and history
├── memory/ # Long-term memory (MEMORY.md)
├── state/ # Persistent state (last channel, etc.)
├── cron/ # Scheduled jobs database
├── skills/ # Custom skills
2026-03-19 03:30:08 +00:00
├── AGENT.md # Agent behavior guide
docs: restructure READMEs and add i18n documentation (#1729)
Restructure all 6 README files (en, zh, ja, fr, pt-br, vi) from
~1200-1580 lines down to ~250 lines each. Long sections (Chat Apps,
Providers, Configuration, Docker, Spawn Tasks, Troubleshooting, Tools)
are extracted into dedicated docs under docs/{lang}/ subdirectories.
Changes:
- Split README content into 7 sub-documents per language (42 new files)
- Update News section with v0.2.3/v0.2.1/v0.2.0/20K milestones
- Add 3 new Features (MCP Support, Vision Pipeline, Smart Routing)
- Complete CLI reference (14 commands, was 7)
- Fix Go badge 1.21+ -> 1.25+ (matches go.mod)
- Add LoongArch to architecture badge
- Fix Install section: hardcoded v0.1.1 -> latest/download URL
- Add Termux GitHub links
- Fix currency symbol placement ($599 not 599$)
- Add missing channels (Feishu, Slack, IRC, OneBot, MaixCam, Pico)
- Add missing providers (Kimi, Minimax, Avian, Mistral, Longcat, ModelScope)
- Add missing security docs (allow_read/write_paths, allow_remote, symlink)
- Remove incorrect azure from Providers table (azure uses model_list only)
- Cross-verified all claims against source code
Co-authored-by: BeaconCat <BeaconCat@users.noreply.github.com>
2026-03-18 07:26:39 +00:00
├── HEARTBEAT.md # Periodic task prompts (checked every 30 min)
├── IDENTITY.md # Agent identity
├── SOUL.md # Agent soul
└── USER.md # User preferences
```
2026-03-19 03:30:08 +00:00
> **Note:** Changes to `AGENT.md`, `SOUL.md`, `USER.md` and `memory/MEMORY.md` are automatically detected at runtime via file modification time (mtime) tracking. You do **not** need to restart the gateway after editing these files — the agent picks up the new content on the next request.
2026-03-29 05:11:43 +00:00
### Web launcher dashboard
2026-04-21 10:04:15 +00:00
**picoclaw-launcher** serves a browser UI that requires password sign-in first. On first run, open `/launcher-setup` to create the dashboard password. Later manual sign-ins use `/launcher-login` .
2026-03-29 05:11:43 +00:00
- **Config file**: Same directory as `config.json` (or the file pointed to by `PICOCLAW_CONFIG` ). The launcher-specific file is `launcher-config.json` .
2026-04-21 10:04:15 +00:00
- **Password storage**: On supported platforms, the password is stored as a bcrypt hash in `launcher-auth.db` . On platforms where the SQLite password store is unavailable, the bcrypt hash is stored in `launcher-config.json` .
- **Legacy migration**: Older `launcher_token` values are migrated once into password login and removed from saved launcher config.
- **Local auto-login**: When the launcher auto-opens a local browser after startup, it uses a one-shot loopback-only bootstrap endpoint to set the session cookie automatically.
- **Unsupported auth paths**: URL token login (`?token=...`), `PICOCLAW_LAUNCHER_TOKEN` , and `Authorization: Bearer` dashboard auth are no longer supported.
2026-03-29 05:11:43 +00:00
- **Sign-out**: Use ** `POST /api/auth/logout` ** with ** `Content-Type: application/json` ** (body may be `{}` ). Do not rely on a GET URL for logout (CSRF-safe pattern).
- **Brute-force**: ** `POST /api/auth/login` ** is **rate-limited per client IP per minute** (HTTP 429 when exceeded).
2026-04-21 10:04:15 +00:00
- **Session lifetime**: The HttpOnly session cookie lasts about **31 days** by default, but sessions are invalidated when the launcher process restarts.
2026-03-29 05:11:43 +00:00
docs: restructure READMEs and add i18n documentation (#1729)
Restructure all 6 README files (en, zh, ja, fr, pt-br, vi) from
~1200-1580 lines down to ~250 lines each. Long sections (Chat Apps,
Providers, Configuration, Docker, Spawn Tasks, Troubleshooting, Tools)
are extracted into dedicated docs under docs/{lang}/ subdirectories.
Changes:
- Split README content into 7 sub-documents per language (42 new files)
- Update News section with v0.2.3/v0.2.1/v0.2.0/20K milestones
- Add 3 new Features (MCP Support, Vision Pipeline, Smart Routing)
- Complete CLI reference (14 commands, was 7)
- Fix Go badge 1.21+ -> 1.25+ (matches go.mod)
- Add LoongArch to architecture badge
- Fix Install section: hardcoded v0.1.1 -> latest/download URL
- Add Termux GitHub links
- Fix currency symbol placement ($599 not 599$)
- Add missing channels (Feishu, Slack, IRC, OneBot, MaixCam, Pico)
- Add missing providers (Kimi, Minimax, Avian, Mistral, Longcat, ModelScope)
- Add missing security docs (allow_read/write_paths, allow_remote, symlink)
- Remove incorrect azure from Providers table (azure uses model_list only)
- Cross-verified all claims against source code
Co-authored-by: BeaconCat <BeaconCat@users.noreply.github.com>
2026-03-18 07:26:39 +00:00
### Skill Sources
By default, skills are loaded from:
1. `~/.picoclaw/workspace/skills` (workspace)
2. `~/.picoclaw/skills` (global)
docs: fix inaccuracies, add translations, and expand channel docs (#1837)
## Config field fixes (cross-verified against Go source)
- MaixCam: server_address → host + port
- IRC: use_tls → tls, channels_to_join → channels (all 6 languages)
- WeCom AI Bot: callback port 18791 → 18790
- credential_encryption: base_url → api_base, add required model field,
remove incorrect passphrase-only mode docs
- providers.md: agents.defaults.model → model_name (×4), remove
non-existent session.backlog_limit
- migration guide, troubleshooting: agents.defaults.model → model_name
- ANTIGRAVITY_AUTH: fix file path, Go 1.21 → 1.25, model → model_name
- spawn-tasks: fix truncated file, add Heartbeat introduction
- tools_configuration: add Tavily/SearXNG/GLMSearch, exec allow_remote/
timeout_seconds/custom_allow_patterns, cron allow_command, skills
github/search_cache, clawhub timeout/max_zip_size/max_response_size
- configuration: fix builtin skills path (build-time embedded, not cwd),
HEARTBEAT.md marked auto-generated
## Broken link fixes (15 total)
- chat-apps.md: WeCom/Matrix links with wrong relative paths
- providers.md: migration link with extra docs/ prefix
- hardware-compatibility.md: README links with wrong depth (all 5 langs)
- chat-apps.md: WhatsApp dead links → anchor links (zh/ja)
## Getting-started accuracy
- README (all 6 langs): add picoclaw.io as recommended download,
add missing picoclaw model CLI command
- docker.md: clarify first-run trigger condition (all 6 langs)
- configuration.md: fix builtin skills path description (all 6 langs)
## QQ channel
- Add quick setup via q.qq.com/qqbot/openclaw (one-click bot creation)
- Add manual setup as fallback (all 6 languages)
## Feishu channel
- Update setup flow: WebSocket/SDK mode, no webhook URL needed
- Preserve Lark international domain note (all 6 languages)
## chat-apps.md
- Add Feishu, Slack, IRC, OneBot detail sections (all 6 languages)
- Add MaixCam section to ja/fr/pt-br/vi
- Fix all channel doc links to point to correct language version
## New translations (25 files, 5 docs × 5 languages)
debug.md, credential_encryption.md, hardware-compatibility.md,
ANTIGRAVITY_AUTH.md, ANTIGRAVITY_USAGE.md → zh/ja/fr/pt-br/vi
## Channel docs (6 languages each, 60 new files)
telegram, discord, qq, feishu, maixcam, dingtalk, line, slack, onebot,
wecom/wecom_aibot, wecom/wecom_app, wecom/wecom_bot
Co-authored-by: BeaconCat <BeaconCat@users.noreply.github.com>
2026-03-20 14:37:05 +00:00
3. `<binary-embedded-path>/skills` (builtin, set at build time)
docs: restructure READMEs and add i18n documentation (#1729)
Restructure all 6 README files (en, zh, ja, fr, pt-br, vi) from
~1200-1580 lines down to ~250 lines each. Long sections (Chat Apps,
Providers, Configuration, Docker, Spawn Tasks, Troubleshooting, Tools)
are extracted into dedicated docs under docs/{lang}/ subdirectories.
Changes:
- Split README content into 7 sub-documents per language (42 new files)
- Update News section with v0.2.3/v0.2.1/v0.2.0/20K milestones
- Add 3 new Features (MCP Support, Vision Pipeline, Smart Routing)
- Complete CLI reference (14 commands, was 7)
- Fix Go badge 1.21+ -> 1.25+ (matches go.mod)
- Add LoongArch to architecture badge
- Fix Install section: hardcoded v0.1.1 -> latest/download URL
- Add Termux GitHub links
- Fix currency symbol placement ($599 not 599$)
- Add missing channels (Feishu, Slack, IRC, OneBot, MaixCam, Pico)
- Add missing providers (Kimi, Minimax, Avian, Mistral, Longcat, ModelScope)
- Add missing security docs (allow_read/write_paths, allow_remote, symlink)
- Remove incorrect azure from Providers table (azure uses model_list only)
- Cross-verified all claims against source code
Co-authored-by: BeaconCat <BeaconCat@users.noreply.github.com>
2026-03-18 07:26:39 +00:00
For advanced/test setups, you can override the builtin skills root with:
```bash
export PICOCLAW_BUILTIN_SKILLS=/path/to/skills
```
2026-03-22 14:33:25 +00:00
### Using Skills From Chat Channels
2026-04-15 17:38:30 +00:00
Once skills are installed, and MCP servers are configured, you can inspect and force them directly from a chat channel:
2026-03-22 14:33:25 +00:00
- `/list skills` shows the installed skill names available to the current agent.
2026-04-15 17:38:30 +00:00
- `/list mcp` shows configured MCP servers with enabled/deferred/connected status.
- `/show mcp <server>` shows the active tools exposed by a connected MCP server.
2026-03-22 14:33:25 +00:00
- `/use <skill> <message>` forces a specific skill for a single request.
- `/use <skill>` arms that skill for your next message in the same chat session.
- `/use clear` cancels a pending skill override created by `/use <skill>` .
2026-04-16 02:53:09 +00:00
- `/btw <question>` asks an immediate side question without changing the current session history. `/btw` is handled as a no-tool query and does not enter the normal tool-execution flow.
2026-03-22 14:33:25 +00:00
Examples:
```text
/list skills
2026-04-15 17:38:30 +00:00
/list mcp
/show mcp github
2026-03-22 14:33:25 +00:00
/use git explain how to squash the last 3 commits
2026-04-16 02:53:09 +00:00
/btw remind me what we already decided about the deploy plan
2026-03-22 14:33:25 +00:00
/use italiapersonalfinance
dammi le ultime news
```
docs: restructure READMEs and add i18n documentation (#1729)
Restructure all 6 README files (en, zh, ja, fr, pt-br, vi) from
~1200-1580 lines down to ~250 lines each. Long sections (Chat Apps,
Providers, Configuration, Docker, Spawn Tasks, Troubleshooting, Tools)
are extracted into dedicated docs under docs/{lang}/ subdirectories.
Changes:
- Split README content into 7 sub-documents per language (42 new files)
- Update News section with v0.2.3/v0.2.1/v0.2.0/20K milestones
- Add 3 new Features (MCP Support, Vision Pipeline, Smart Routing)
- Complete CLI reference (14 commands, was 7)
- Fix Go badge 1.21+ -> 1.25+ (matches go.mod)
- Add LoongArch to architecture badge
- Fix Install section: hardcoded v0.1.1 -> latest/download URL
- Add Termux GitHub links
- Fix currency symbol placement ($599 not 599$)
- Add missing channels (Feishu, Slack, IRC, OneBot, MaixCam, Pico)
- Add missing providers (Kimi, Minimax, Avian, Mistral, Longcat, ModelScope)
- Add missing security docs (allow_read/write_paths, allow_remote, symlink)
- Remove incorrect azure from Providers table (azure uses model_list only)
- Cross-verified all claims against source code
Co-authored-by: BeaconCat <BeaconCat@users.noreply.github.com>
2026-03-18 07:26:39 +00:00
### Unified Command Execution Policy
- Generic slash commands are executed through a single path in `pkg/agent/loop.go` via `commands.Executor` .
2026-04-16 02:53:09 +00:00
- Channel adapters no longer consume generic commands locally; they forward inbound text to the bus/agent path. Telegram still auto-registers supported commands such as `/start` , `/help` , `/show` , `/list` , `/use` , and `/btw` at startup.
docs: restructure READMEs and add i18n documentation (#1729)
Restructure all 6 README files (en, zh, ja, fr, pt-br, vi) from
~1200-1580 lines down to ~250 lines each. Long sections (Chat Apps,
Providers, Configuration, Docker, Spawn Tasks, Troubleshooting, Tools)
are extracted into dedicated docs under docs/{lang}/ subdirectories.
Changes:
- Split README content into 7 sub-documents per language (42 new files)
- Update News section with v0.2.3/v0.2.1/v0.2.0/20K milestones
- Add 3 new Features (MCP Support, Vision Pipeline, Smart Routing)
- Complete CLI reference (14 commands, was 7)
- Fix Go badge 1.21+ -> 1.25+ (matches go.mod)
- Add LoongArch to architecture badge
- Fix Install section: hardcoded v0.1.1 -> latest/download URL
- Add Termux GitHub links
- Fix currency symbol placement ($599 not 599$)
- Add missing channels (Feishu, Slack, IRC, OneBot, MaixCam, Pico)
- Add missing providers (Kimi, Minimax, Avian, Mistral, Longcat, ModelScope)
- Add missing security docs (allow_read/write_paths, allow_remote, symlink)
- Remove incorrect azure from Providers table (azure uses model_list only)
- Cross-verified all claims against source code
Co-authored-by: BeaconCat <BeaconCat@users.noreply.github.com>
2026-03-18 07:26:39 +00:00
- Unknown slash command (for example `/foo` ) passes through to normal LLM processing.
- Registered but unsupported command on the current channel (for example `/show` on WhatsApp) returns an explicit user-facing error and stops further processing.
2026-03-19 15:30:25 +00:00
2026-04-17 13:25:18 +00:00
### Session Isolation
Session scope controls how much memory is shared between chats, users, threads, and spaces.
- Use `session.dimensions` for the global default.
- Use `session_dimensions` on a dispatch rule for one routed exception.
For step-by-step recipes and isolation patterns, see the [Session Guide ](session-guide.md ).
2026-04-01 13:34:49 +00:00
### Routing
2026-03-19 15:30:25 +00:00
2026-04-01 14:13:04 +00:00
Routing is configured through `agents.dispatch.rules` .
2026-03-19 15:30:25 +00:00
2026-04-01 14:13:04 +00:00
Each rule matches against the normalized inbound context produced by channels.
Rules are evaluated from top to bottom. The first matching rule wins. If no
rule matches, PicoClaw falls back to the configured default agent.
2026-03-19 15:30:25 +00:00
2026-04-01 14:13:04 +00:00
Supported match fields:
* `channel`
* `account`
* `space`
* `chat`
* `topic`
* `sender`
* `mentioned`
Match values use the same scope vocabulary as the session system:
* `space` : `workspace:t001` , `guild:123456`
* `chat` : `direct:user123` , `group:-100123` , `channel:c123`
* `topic` : `topic:42`
* `sender` : a normalized sender identifier for the platform
Rules may optionally override the global `session.dimensions` value through
`session_dimensions` . This allows routing and session allocation to stay aligned
without reintroducing the old `bindings` or `dm_scope` formats.
Example:
```json
{
"agents": {
"list": [
{ "id": "main", "default": true },
{ "id": "support" },
{ "id": "sales" }
],
"dispatch": {
"rules": [
{
"name": "vip in support group",
"agent": "sales",
"when": {
"channel": "telegram",
"chat": "group:-1001234567890",
"sender": "12345"
},
"session_dimensions": ["chat", "sender"]
},
{
"name": "telegram support group",
"agent": "support",
"when": {
"channel": "telegram",
"chat": "group:-1001234567890"
},
"session_dimensions": ["chat"]
}
]
}
},
"session": {
"dimensions": ["chat"]
}
}
```
In the example above, the VIP rule must appear before the broader group rule.
Because routing is strictly ordered, more specific rules should be placed
earlier and broader fallback rules later.
2026-03-19 15:30:25 +00:00
2026-04-17 13:25:18 +00:00
For more complete routing and model-tier examples, see the [Routing Guide ](routing-guide.md ).
docs: restructure READMEs and add i18n documentation (#1729)
Restructure all 6 README files (en, zh, ja, fr, pt-br, vi) from
~1200-1580 lines down to ~250 lines each. Long sections (Chat Apps,
Providers, Configuration, Docker, Spawn Tasks, Troubleshooting, Tools)
are extracted into dedicated docs under docs/{lang}/ subdirectories.
Changes:
- Split README content into 7 sub-documents per language (42 new files)
- Update News section with v0.2.3/v0.2.1/v0.2.0/20K milestones
- Add 3 new Features (MCP Support, Vision Pipeline, Smart Routing)
- Complete CLI reference (14 commands, was 7)
- Fix Go badge 1.21+ -> 1.25+ (matches go.mod)
- Add LoongArch to architecture badge
- Fix Install section: hardcoded v0.1.1 -> latest/download URL
- Add Termux GitHub links
- Fix currency symbol placement ($599 not 599$)
- Add missing channels (Feishu, Slack, IRC, OneBot, MaixCam, Pico)
- Add missing providers (Kimi, Minimax, Avian, Mistral, Longcat, ModelScope)
- Add missing security docs (allow_read/write_paths, allow_remote, symlink)
- Remove incorrect azure from Providers table (azure uses model_list only)
- Cross-verified all claims against source code
Co-authored-by: BeaconCat <BeaconCat@users.noreply.github.com>
2026-03-18 07:26:39 +00:00
### 🔒 Security Sandbox
PicoClaw runs in a sandboxed environment by default. The agent can only access files and execute commands within the configured workspace.
#### Default Configuration
```json
{
"agents": {
"defaults": {
"workspace": "~/.picoclaw/workspace",
"restrict_to_workspace": true
}
}
}
```
| Option | Default | Description |
| ----------------------- | ----------------------- | ----------------------------------------- |
| `workspace` | `~/.picoclaw/workspace` | Working directory for the agent |
| `restrict_to_workspace` | `true` | Restrict file/command access to workspace |
#### Protected Tools
When `restrict_to_workspace: true` , the following tools are sandboxed:
| Tool | Function | Restriction |
| ------------- | ---------------- | -------------------------------------- |
| `read_file` | Read files | Only files within workspace |
| `write_file` | Write files | Only files within workspace |
| `list_dir` | List directories | Only directories within workspace |
| `edit_file` | Edit files | Only files within workspace |
| `append_file` | Append to files | Only files within workspace |
| `exec` | Execute commands | Command paths must be within workspace |
#### Additional Exec Protection
Even with `restrict_to_workspace: false` , the `exec` tool blocks these dangerous commands:
* `rm -rf` , `del /f` , `rmdir /s` — Bulk deletion
* `format` , `mkfs` , `diskpart` — Disk formatting
* `dd if=` — Disk imaging
* Writing to `/dev/sd[a-z]` — Direct disk writes
* `shutdown` , `reboot` , `poweroff` — System shutdown
* Fork bomb `:(){ :|:& };:`
### File Access Control
| Config Key | Type | Default | Description |
|------------|------|---------|-------------|
| `tools.allow_read_paths` | string[] | `[]` | Additional paths allowed for reading outside workspace |
| `tools.allow_write_paths` | string[] | `[]` | Additional paths allowed for writing outside workspace |
2026-04-02 10:49:08 +00:00
### Read File Mode
`read_file` has two mutually exclusive implementations selected by config. PicoClaw registers exactly one of them at startup:
| Config Key | Type | Default | Description |
|------------|------|---------|-------------|
| `tools.read_file.enabled` | bool | `true` | Enables the `read_file` tool |
| `tools.read_file.mode` | string | `bytes` | Selects the `read_file` implementation: `bytes` or `lines` |
| `tools.read_file.max_read_file_size` | int | `65536` | Maximum bytes returned by `read_file` |
#### Mode: `bytes`
Optimized for arbitrary files and binary-safe pagination.
Parameters:
* `path` (required): File path
* `offset` (optional): Starting byte offset, default `0`
* `length` (optional): Maximum number of bytes to read, default `max_read_file_size`
Use `bytes` when:
* You may read binary files
* You want deterministic byte-range pagination
#### Mode: `lines`
Text-oriented behavior, optimized for source files, markdown, logs, and configs. The tool reads sequentially by line and stops when the configured byte budget is reached.
Parameters:
* `path` (required): File path
* `start_line` (optional): Starting line number, 1-indexed and inclusive, default `1`
* `max_lines` (optional): Maximum number of lines to read, default = all remaining lines until EOF or byte budget
Behavior notes:
* Binary-looking files are rejected with guidance to switch `read_file` to `mode = bytes`
* Extremely long single lines are truncated rather than skipped
Use `mode = lines` when:
* The agent mostly reads text files
* You want line-based pagination in prompts and tool calls
* You want cleaner chunks for code review, logs, and documentation
#### Example
```json
{
"tools": {
"read_file": {
"enabled": true,
"mode": "lines",
"max_read_file_size": 65536
}
}
}
```
docs: restructure READMEs and add i18n documentation (#1729)
Restructure all 6 README files (en, zh, ja, fr, pt-br, vi) from
~1200-1580 lines down to ~250 lines each. Long sections (Chat Apps,
Providers, Configuration, Docker, Spawn Tasks, Troubleshooting, Tools)
are extracted into dedicated docs under docs/{lang}/ subdirectories.
Changes:
- Split README content into 7 sub-documents per language (42 new files)
- Update News section with v0.2.3/v0.2.1/v0.2.0/20K milestones
- Add 3 new Features (MCP Support, Vision Pipeline, Smart Routing)
- Complete CLI reference (14 commands, was 7)
- Fix Go badge 1.21+ -> 1.25+ (matches go.mod)
- Add LoongArch to architecture badge
- Fix Install section: hardcoded v0.1.1 -> latest/download URL
- Add Termux GitHub links
- Fix currency symbol placement ($599 not 599$)
- Add missing channels (Feishu, Slack, IRC, OneBot, MaixCam, Pico)
- Add missing providers (Kimi, Minimax, Avian, Mistral, Longcat, ModelScope)
- Add missing security docs (allow_read/write_paths, allow_remote, symlink)
- Remove incorrect azure from Providers table (azure uses model_list only)
- Cross-verified all claims against source code
Co-authored-by: BeaconCat <BeaconCat@users.noreply.github.com>
2026-03-18 07:26:39 +00:00
### Exec Security
| Config Key | Type | Default | Description |
|------------|------|---------|-------------|
| `tools.exec.allow_remote` | bool | `false` | Allow exec tool from remote channels (Telegram/Discord etc.) |
| `tools.exec.enable_deny_patterns` | bool | `true` | Enable dangerous command interception |
| `tools.exec.custom_deny_patterns` | string[] | `[]` | Custom regex patterns to block |
| `tools.exec.custom_allow_patterns` | string[] | `[]` | Custom regex patterns to allow |
> **Security Note:** Symlink protection is enabled by default — all file paths are resolved through `filepath.EvalSymlinks` before whitelist matching, preventing symlink escape attacks.
#### Known Limitation: Child Processes From Build Tools
The exec safety guard only inspects the command line PicoClaw launches directly. It does not recursively inspect child
processes spawned by allowed developer tools such as `make` , `go run` , `cargo` , `npm run` , or custom build scripts.
That means a top-level command can still compile or launch other binaries after it passes the initial guard check. In
practice, treat build scripts, Makefiles, package scripts, and generated binaries as executable code that needs the same
level of review as a direct shell command.
For higher-risk environments:
* Review build scripts before execution.
* Prefer approval/manual review for compile-and-run workflows.
* Run PicoClaw inside a container or VM if you need stronger isolation than the built-in guard provides.
#### Error Examples
```
[ERROR] tool: Tool execution failed
{tool=exec, error=Command blocked by safety guard (path outside working dir)}
```
```
[ERROR] tool: Tool execution failed
{tool=exec, error=Command blocked by safety guard (dangerous pattern detected)}
```
#### Disabling Restrictions (Security Risk)
If you need the agent to access paths outside the workspace:
**Method 1: Config file**
```json
{
"agents": {
"defaults": {
"restrict_to_workspace": false
}
}
}
```
**Method 2: Environment variable**
```bash
export PICOCLAW_AGENTS_DEFAULTS_RESTRICT_TO_WORKSPACE=false
```
> ⚠️ **Warning**: Disabling this restriction allows the agent to access any path on your system. Use with caution in controlled environments only.
#### Security Boundary Consistency
The `restrict_to_workspace` setting applies consistently across all execution paths:
| Execution Path | Security Boundary |
| ---------------- | ---------------------------- |
| Main Agent | `restrict_to_workspace` ✅ |
| Subagent / Spawn | Inherits same restriction ✅ |
| Heartbeat tasks | Inherits same restriction ✅ |
All paths share the same workspace restriction — there's no way to bypass the security boundary through subagents or scheduled tasks.
### Heartbeat (Periodic Tasks)
PicoClaw can perform periodic tasks automatically. Create a `HEARTBEAT.md` file in your workspace:
```markdown
# Periodic Tasks
- Check my email for important messages
- Review my calendar for upcoming events
- Check the weather forecast
```
The agent will read this file every 30 minutes (configurable) and execute any tasks using available tools.
#### Async Tasks with Spawn
For long-running tasks (web search, API calls), use the `spawn` tool to create a **subagent** :
```markdown
# Periodic Tasks
2026-03-22 16:51:27 +00:00
## Quick Tasks (respond directly)
- Report current time
## Long Tasks (use spawn for async)
- Search the web for AI news and summarize
- Check email and report important messages
```
**Key behaviors:**
| Feature | Description |
| ----------------------- | --------------------------------------------------------- |
| **spawn** | Creates async subagent, doesn't block heartbeat |
| **Independent context** | Subagent has its own context, no session history |
| **message tool** | Subagent communicates with user directly via message tool |
| **Non-blocking** | After spawning, heartbeat continues to next task |
#### How Subagent Communication Works
```
Heartbeat triggers
↓
Agent reads HEARTBEAT.md
↓
For long task: spawn subagent
↓ ↓
Continue to next task Subagent works independently
↓ ↓
All tasks done Subagent uses "message" tool
↓ ↓
Respond HEARTBEAT_OK User receives result directly
```
The subagent has access to tools (message, web_search, etc.) and can communicate with the user independently without going through the main agent.
**Configuration:**
```json
{
"heartbeat": {
"enabled": true,
"interval": 30
}
}
```
| Option | Default | Description |
| ---------- | ------- | ---------------------------------- |
| `enabled` | `true` | Enable/disable heartbeat |
| `interval` | `30` | Check interval in minutes (min: 5) |
**Environment variables:**
* `PICOCLAW_HEARTBEAT_ENABLED=false` to disable
* `PICOCLAW_HEARTBEAT_INTERVAL=60` to change interval
### Providers
> [!NOTE]
> Groq provides free voice transcription via Whisper. If configured, audio messages from any channel will be automatically transcribed at the agent level.
| Provider | Purpose | Get API Key |
| ------------ | --------------------------------------- | ------------------------------------------------------------ |
| `gemini` | LLM (Gemini direct) | [aistudio.google.com ](https://aistudio.google.com ) |
| `zhipu` | LLM (Zhipu direct) | [bigmodel.cn ](https://bigmodel.cn ) |
| `volcengine` | LLM (Volcengine direct) | [volcengine.com ](https://www.volcengine.com/activity/codingplan?utm_campaign=PicoClaw&utm_content=PicoClaw&utm_medium=devrel&utm_source=OWO&utm_term=PicoClaw ) |
| `openrouter` | LLM (recommended, access to all models) | [openrouter.ai ](https://openrouter.ai ) |
| `anthropic` | LLM (Claude direct) | [console.anthropic.com ](https://console.anthropic.com ) |
| `openai` | LLM (GPT direct) | [platform.openai.com ](https://platform.openai.com ) |
| `deepseek` | LLM (DeepSeek direct) | [platform.deepseek.com ](https://platform.deepseek.com ) |
| `qwen` | LLM (Qwen direct) | [dashscope.console.aliyun.com ](https://dashscope.console.aliyun.com ) |
| `groq` | LLM + **Voice transcription** (Whisper) | [console.groq.com ](https://console.groq.com ) |
| `cerebras` | LLM (Cerebras direct) | [cerebras.ai ](https://cerebras.ai ) |
| `vivgrid` | LLM (Vivgrid direct) | [vivgrid.com ](https://vivgrid.com ) |
### Model Configuration (model_list)
2026-04-22 03:28:47 +00:00
> **What's New?** PicoClaw now prefers explicit `provider` + native `model` configuration (for example `"provider": "zhipu", "model": "glm-4.7"`). The legacy single-field `provider/model` form remains supported for compatibility when `provider` is omitted.
2026-03-22 16:51:27 +00:00
This design also enables **multi-agent support** with flexible provider selection:
- **Different agents, different providers**: Each agent can use its own LLM provider
- **Model fallbacks**: Configure primary and fallback models for resilience
2026-03-30 09:59:56 +00:00
- **Load balancing**: Distribute requests across multiple endpoints or keys
2026-03-22 16:51:27 +00:00
- **Centralized configuration**: Manage all providers in one place
2026-03-30 09:59:56 +00:00
- **Model enable/disable**: Use the `enabled` field to temporarily disable a model without removing its configuration
2026-03-22 16:51:27 +00:00
2026-03-24 05:38:13 +00:00
#### 🔒 Security Configuration (Recommended)
PicoClaw supports separating sensitive data (API keys, tokens, secrets) from your main configuration by storing them in a `.security.yml` file.
**Key Benefits:**
- **Security**: Sensitive data is never in your main config file
- **Easy sharing**: Share config.json without exposing API keys
- **Version control**: Add `.security.yml` to `.gitignore`
- **Flexible deployment**: Different environments can use different security files
**Quick Setup:**
1. Create `~/.picoclaw/.security.yml` with your API keys:
```yaml
model_list:
gpt-5.4:
api_keys:
- "sk-proj-your-actual-openai-key"
claude-sonnet-4.6:
api_keys:
- "sk-ant-your-actual-anthropic-key"
channels:
telegram:
token: "your-telegram-bot-token"
web:
brave:
api_keys:
- "BSAyour-brave-api-key"
glm_search:
api_key: "your-glm-search-api-key"
```
2. Set proper permissions:
```bash
chmod 600 ~/.picoclaw/.security.yml
```
3. Remove sensitive fields from `config.json` (recommended):
```json
{
"model_list": [
{
"model_name": "gpt-5.4",
2026-04-22 03:28:47 +00:00
"provider": "openai",
"model": "gpt-5.4"
2026-03-24 05:38:13 +00:00
// api_key loaded from .security.yml
}
],
2026-04-11 16:57:26 +00:00
"channel_list": {
2026-03-24 05:38:13 +00:00
"telegram": {
2026-04-11 16:57:26 +00:00
"enabled": true,
2026-04-13 16:00:13 +00:00
"type": "telegram",
2026-03-24 05:38:13 +00:00
// token loaded from .security.yml
}
}
}
```
**How it works:**
- Values from `.security.yml` are automatically mapped to config fields
- No special syntax needed — just omit sensitive fields from config.json
- If a field exists in both files, `.security.yml` value takes precedence
- You can mix direct values in config.json with security values
2026-04-17 03:41:36 +00:00
For complete documentation, see [`../security/security_configuration.md` ](../security/security_configuration.md ).
2026-03-24 05:38:13 +00:00
2026-03-22 16:51:27 +00:00
#### All Supported Vendors
2026-04-22 03:28:47 +00:00
| Vendor | `provider` Value | Default API Base | Protocol | API Key |
2026-03-22 16:51:27 +00:00
| ----------------------- | ----------------- | --------------------------------------------------- | --------- | ---------------------------------------------------------------- |
2026-04-22 03:28:47 +00:00
| **OpenAI** | `openai` | `https://api.openai.com/v1` | OpenAI | [Get Key ](https://platform.openai.com ) |
| **Anthropic** | `anthropic` | `https://api.anthropic.com/v1` | Anthropic | [Get Key ](https://console.anthropic.com ) |
| **智谱 AI (GLM)** | `zhipu` | `https://open.bigmodel.cn/api/paas/v4` | OpenAI | [Get Key ](https://open.bigmodel.cn/usercenter/proj-mgmt/apikeys ) |
| **DeepSeek** | `deepseek` | `https://api.deepseek.com/v1` | OpenAI | [Get Key ](https://platform.deepseek.com ) |
| **Google Gemini** | `gemini` | `https://generativelanguage.googleapis.com/v1beta` | Gemini | [Get Key ](https://aistudio.google.com/api-keys ) |
| **Groq** | `groq` | `https://api.groq.com/openai/v1` | OpenAI | [Get Key ](https://console.groq.com ) |
| **Moonshot** | `moonshot` | `https://api.moonshot.cn/v1` | OpenAI | [Get Key ](https://platform.moonshot.cn ) |
| **通义千问 (Qwen)** | `qwen` | `https://dashscope.aliyuncs.com/compatible-mode/v1` | OpenAI | [Get Key ](https://dashscope.console.aliyun.com ) |
| **NVIDIA** | `nvidia` | `https://integrate.api.nvidia.com/v1` | OpenAI | [Get Key ](https://build.nvidia.com ) |
| **Ollama** | `ollama` | `http://localhost:11434/v1` | OpenAI | Local (no key needed) |
| **LM Studio** | `lmstudio` | `http://localhost:1234/v1` | OpenAI | Optional (local default: no key) |
| **OpenRouter** | `openrouter` | `https://openrouter.ai/api/v1` | OpenAI | [Get Key ](https://openrouter.ai/keys ) |
| **LiteLLM Proxy** | `litellm` | `http://localhost:4000/v1` | OpenAI | Your LiteLLM proxy key |
| **VLLM** | `vllm` | `http://localhost:8000/v1` | OpenAI | Local |
| **Cerebras** | `cerebras` | `https://api.cerebras.ai/v1` | OpenAI | [Get Key ](https://cerebras.ai ) |
| **VolcEngine (Doubao)** | `volcengine` | `https://ark.cn-beijing.volces.com/api/v3` | OpenAI | [Get Key ](https://www.volcengine.com/activity/codingplan?utm_campaign=PicoClaw&utm_content=PicoClaw&utm_medium=devrel&utm_source=OWO&utm_term=PicoClaw ) |
| **神算云** | `shengsuanyun` | `https://router.shengsuanyun.com/api/v1` | OpenAI | — |
| **BytePlus** | `byteplus` | `https://ark.ap-southeast.bytepluses.com/api/v3` | OpenAI | [Get Key ](https://www.byteplus.com ) |
| **Vivgrid** | `vivgrid` | `https://api.vivgrid.com/v1` | OpenAI | [Get Key ](https://vivgrid.com ) |
| **LongCat** | `longcat` | `https://api.longcat.chat/openai` | OpenAI | [Get Key ](https://longcat.chat/platform ) |
| **ModelScope (魔搭)** | `modelscope` | `https://api-inference.modelscope.cn/v1` | OpenAI | [Get Token ](https://modelscope.cn/my/tokens ) |
| **Antigravity** | `antigravity` | Google Cloud | Custom | OAuth only |
| **GitHub Copilot** | `github-copilot` | `localhost:4321` | gRPC | — |
2026-03-22 16:51:27 +00:00
#### Basic Configuration
```json
{
"model_list": [
{
"model_name": "ark-code-latest",
2026-04-22 03:28:47 +00:00
"provider": "volcengine",
"model": "ark-code-latest",
2026-03-30 09:59:56 +00:00
"api_keys": ["sk-your-api-key"]
2026-03-22 16:51:27 +00:00
},
{
"model_name": "gpt-5.4",
2026-04-22 03:28:47 +00:00
"provider": "openai",
"model": "gpt-5.4",
2026-03-30 09:59:56 +00:00
"api_keys": ["sk-your-openai-key"]
2026-03-22 16:51:27 +00:00
},
{
"model_name": "claude-sonnet-4.6",
2026-04-22 03:28:47 +00:00
"provider": "anthropic",
"model": "claude-sonnet-4.6",
2026-03-30 09:59:56 +00:00
"api_keys": ["sk-ant-your-key"]
2026-03-22 16:51:27 +00:00
},
{
"model_name": "glm-4.7",
2026-04-22 03:28:47 +00:00
"provider": "zhipu",
"model": "glm-4.7",
2026-03-30 09:59:56 +00:00
"api_keys": ["your-zhipu-key"]
2026-03-22 16:51:27 +00:00
}
],
"agents": {
"defaults": {
"model": "gpt-5.4"
}
}
}
```
2026-03-30 09:59:56 +00:00
> **Security Note**: You can remove `api_keys` fields from your config and store them in `.security.yml` instead. See [Security Configuration](#-security-configuration-recommended) above for details.
>
> **Note**: The `enabled` field can be set to `false` to disable a model entry without removing it. When omitted, it defaults to `true` during migration for models that have API keys.
2026-03-24 05:38:13 +00:00
2026-04-22 03:28:47 +00:00
Resolution rules:
- Prefer explicit `"provider": "openai", "model": "gpt-5.4"` .
- If `provider` is set, PicoClaw sends `model` unchanged.
- If `provider` is omitted, PicoClaw treats the first `/` segment in `model` as the provider and everything after that first `/` as the runtime model ID.
- This means `"model": "openrouter/openai/gpt-5.4"` still works as a compatibility form and sends `openai/gpt-5.4` to OpenRouter.
2026-03-22 16:51:27 +00:00
#### Vendor-Specific Examples
2026-03-24 05:38:13 +00:00
> **Tip**: You can omit `api_key` fields and store them in `.security.yml` for better security. See [Security Configuration](#-security-configuration-recommended).
2026-03-22 16:51:27 +00:00
< details >
< summary > < b > OpenAI< / b > < / summary >
```json
{
"model_name": "gpt-5.4",
2026-04-22 03:28:47 +00:00
"provider": "openai",
"model": "gpt-5.4"
2026-03-24 05:38:13 +00:00
// api_key: set in .security.yml
2026-03-22 16:51:27 +00:00
}
```
< / details >
< details >
< summary > < b > VolcEngine (Doubao)< / b > < / summary >
```json
{
"model_name": "ark-code-latest",
2026-04-22 03:28:47 +00:00
"provider": "volcengine",
"model": "ark-code-latest"
2026-03-24 05:38:13 +00:00
// api_key: set in .security.yml
2026-03-22 16:51:27 +00:00
}
```
< / details >
< details >
< summary > < b > 智谱 AI (GLM)< / b > < / summary >
```json
{
"model_name": "glm-4.7",
2026-04-22 03:28:47 +00:00
"provider": "zhipu",
"model": "glm-4.7"
2026-03-24 05:38:13 +00:00
// api_key: set in .security.yml
2026-03-22 16:51:27 +00:00
}
```
< / details >
< details >
< summary > < b > DeepSeek< / b > < / summary >
```json
{
"model_name": "deepseek-chat",
2026-04-22 03:28:47 +00:00
"provider": "deepseek",
"model": "deepseek-chat"
2026-03-24 05:38:13 +00:00
// api_key: set in .security.yml
2026-03-22 16:51:27 +00:00
}
```
< / details >
< details >
< summary > < b > Anthropic< / b > < / summary >
```json
{
"model_name": "claude-sonnet-4.6",
2026-04-22 03:28:47 +00:00
"provider": "anthropic",
"model": "claude-sonnet-4.6"
2026-03-24 05:38:13 +00:00
// api_key: set in .security.yml
2026-03-22 16:51:27 +00:00
}
```
> Run `picoclaw auth login --provider anthropic` to paste your API token.
For direct Anthropic API access or custom endpoints that only support Anthropic's native message format:
```json
{
"model_name": "claude-opus-4-6",
2026-04-22 03:28:47 +00:00
"provider": "anthropic-messages",
"model": "claude-opus-4-6",
2026-03-30 09:59:56 +00:00
"api_keys": ["sk-ant-your-key"],
2026-03-22 16:51:27 +00:00
"api_base": "https://api.anthropic.com"
}
```
> Use `anthropic-messages` when the endpoint requires Anthropic's native `/v1/messages` format instead of OpenAI-compatible `/v1/chat/completions`.
< / details >
< details >
< summary > < b > Ollama (local)< / b > < / summary >
```json
{
"model_name": "llama3",
2026-04-22 03:28:47 +00:00
"provider": "ollama",
"model": "llama3"
2026-03-22 16:51:27 +00:00
}
```
< / details >
2026-03-31 06:48:18 +00:00
< details >
< summary > < b > LM Studio (local)< / b > < / summary >
```json
{
"model_name": "lmstudio-local",
2026-04-22 03:28:47 +00:00
"provider": "lmstudio",
"model": "openai/gpt-oss-20b"
2026-03-31 06:48:18 +00:00
}
```
`api_base` defaults to `http://localhost:1234/v1` . API key is optional unless your LM Studio server enables authentication.< br />
2026-04-22 03:28:47 +00:00
With explicit `provider` , PicoClaw sends `openai/gpt-oss-20b` unchanged to LM Studio. The legacy compatibility form `"model": "lmstudio/openai/gpt-oss-20b"` still resolves to the same upstream model ID when `provider` is omitted.
2026-03-31 06:48:18 +00:00
< / details >
2026-03-22 16:51:27 +00:00
< details >
< summary > < b > Custom Proxy / LiteLLM< / b > < / summary >
```json
{
"model_name": "my-custom-model",
2026-04-22 03:28:47 +00:00
"provider": "openai",
"model": "custom-model",
2026-03-24 05:38:13 +00:00
"api_base": "https://my-proxy.com/v1"
// api_key: set in .security.yml
2026-03-22 16:51:27 +00:00
}
```
2026-04-22 03:28:47 +00:00
With explicit `provider` , PicoClaw sends `model` unchanged. That means `"provider": "litellm", "model": "lite-gpt4"` sends `lite-gpt4` , while `"provider": "litellm", "model": "openai/gpt-4o"` sends `openai/gpt-4o` . The legacy compatibility forms `litellm/lite-gpt4` and `litellm/openai/gpt-4o` still resolve the same way when `provider` is omitted.
2026-03-22 16:51:27 +00:00
< / details >
#### Load Balancing
Configure multiple endpoints for the same model name — PicoClaw will automatically round-robin between them:
2026-03-24 05:38:13 +00:00
**Option 1: Multiple API Keys in .security.yml (Recommended)**
```yaml
# .security.yml
model_list:
gpt-5.4:
api_keys:
- "sk-proj-key-1"
- "sk-proj-key-2"
```
```json
// config.json
{
"model_list": [
{
"model_name": "gpt-5.4",
2026-04-22 03:28:47 +00:00
"provider": "openai",
"model": "gpt-5.4",
2026-03-24 05:38:13 +00:00
"api_base": "https://api.openai.com/v1"
// api_keys loaded from .security.yml
}
]
}
```
**Option 2: Multiple Model Entries**
2026-03-22 16:51:27 +00:00
```json
{
"model_list": [
{
"model_name": "gpt-5.4",
2026-04-22 03:28:47 +00:00
"provider": "openai",
"model": "gpt-5.4",
2026-03-22 16:51:27 +00:00
"api_base": "https://api1.example.com/v1",
2026-03-30 09:59:56 +00:00
"api_keys": ["sk-key1"]
2026-03-22 16:51:27 +00:00
},
{
"model_name": "gpt-5.4",
2026-04-22 03:28:47 +00:00
"provider": "openai",
"model": "gpt-5.4",
2026-03-22 16:51:27 +00:00
"api_base": "https://api2.example.com/v1",
2026-03-30 09:59:56 +00:00
"api_keys": ["sk-key2"]
2026-03-22 16:51:27 +00:00
}
]
}
```
#### Migration from Legacy `providers` Config
2026-03-30 09:59:56 +00:00
The old `providers` configuration is **deprecated** and has been removed in V2. Existing V0/V1 configs are auto-migrated. See [docs/migration/model-list-migration.md ](../migration/model-list-migration.md ) for the full guide.
2026-03-22 16:51:27 +00:00
### Provider Architecture
PicoClaw routes providers by protocol family:
- **OpenAI-compatible**: OpenRouter, Groq, Zhipu, vLLM-style endpoints, and most others.
2026-04-21 08:15:09 +00:00
- **Gemini native**: Google Gemini via the native `models/*:generateContent` and `models/*:streamGenerateContent` endpoints.
2026-03-22 16:51:27 +00:00
- **Anthropic**: Claude-native API behavior.
- **Codex/OAuth**: OpenAI OAuth/token authentication route.
2026-03-30 09:59:56 +00:00
This keeps the runtime lightweight while making new OpenAI-compatible backends mostly a config operation (`api_base` + `api_keys` ).
2026-03-22 16:51:27 +00:00
< details >
< summary > < b > Zhipu (legacy providers format)< / b > < / summary >
```json
{
"agents": {
"defaults": {
"workspace": "~/.picoclaw/workspace",
"model": "glm-4.7",
"max_tokens": 8192,
"temperature": 0.7,
2026-04-13 08:19:24 +00:00
"max_tool_iterations": 20,
"max_parallel_turns": 1
2026-03-22 16:51:27 +00:00
}
},
"providers": {
"zhipu": {
"api_key": "Your API Key",
"api_base": "https://open.bigmodel.cn/api/paas/v4"
}
}
}
```
2026-03-24 05:38:13 +00:00
> **Note**: The `providers` format is deprecated. Use the new `model_list` format with `.security.yml` for better security.
2026-04-13 08:19:24 +00:00
>
2026-04-17 03:41:36 +00:00
> **`max_parallel_turns`**: Controls concurrent processing of messages from different sessions. `1` (default) = sequential; `>1` = parallel. Messages from the same session are always serialized. See [Steering docs](../architecture/steering.md) for details.
2026-03-24 05:38:13 +00:00
2026-03-22 16:51:27 +00:00
< / details >
< details >
< summary > < b > Full config example< / b > < / summary >
```json
{
"agents": {
"defaults": {
2026-04-22 03:28:47 +00:00
"model_name": "claude-opus-4-5"
2026-03-22 16:51:27 +00:00
}
},
"session": {
"dm_scope": "per-channel-peer",
"backlog_limit": 20
},
2026-04-11 16:57:26 +00:00
"channel_list": {
2026-03-22 16:51:27 +00:00
"telegram": {
2026-04-11 16:57:26 +00:00
"enabled": true,
2026-04-13 16:00:13 +00:00
"type": "telegram",
2026-03-24 05:38:13 +00:00
// token: set in .security.yml
2026-03-22 16:51:27 +00:00
"allow_from": ["123456789"]
}
},
"tools": {
"web": {
"duckduckgo": {
"enabled": true,
"max_results": 5
}
}
},
"heartbeat": {
"enabled": true,
"interval": 30
}
}
```
2026-03-24 05:38:13 +00:00
> **Note**: Sensitive fields (`api_key`, `token`, etc.) can be omitted and stored in `.security.yml` for better security.
2026-03-22 16:51:27 +00:00
< / details >
### Scheduled Tasks / Reminders
PicoClaw supports cron-style scheduled tasks via the `cron` tool. The agent can set, list, and cancel reminders or recurring jobs that trigger at specified times.
```json
{
"tools": {
"cron": {
"enabled": true,
"exec_timeout_minutes": 5
}
}
}
```
Scheduled tasks persist across restarts and are stored in `~/.picoclaw/workspace/cron/` .
### Advanced Topics
| Topic | Description |
| ----- | ----------- |
2026-04-17 03:41:36 +00:00
| [Security Configuration ](../security/security_configuration.md ) | Store API keys and secrets in separate `.security.yml` file |
| [Sensitive Data Filtering ](../security/sensitive_data_filtering.md ) | Filter API keys and tokens from tool results before sending to LLM |
| [Hook System ](../architecture/hooks/README.md ) | Event-driven hooks: observers, interceptors, approval hooks |
| [Steering ](../architecture/steering.md ) | Inject messages into a running agent loop between tool calls |
| [SubTurn ](../architecture/subturn.md ) | Subagent coordination, concurrency control, lifecycle |
| [Context Management ](../architecture/agent-refactor/context.md ) | Context boundary detection, proactive budget check, compression |