feat: bootstrap agent workspace and AGENTS.md
This commit is contained in:
@@ -8,26 +8,26 @@ read_when:
|
||||
|
||||
## First run (recommended)
|
||||
|
||||
1) Create a dedicated workspace for your assistant (where it can read/write files):
|
||||
Clawdis uses a dedicated workspace directory for the agent. Default: `~/.clawdis/workspace`.
|
||||
|
||||
1) Create the workspace (if it doesn’t already exist):
|
||||
|
||||
```bash
|
||||
mkdir -p ~/clawd
|
||||
mkdir -p ~/.clawdis/workspace
|
||||
```
|
||||
|
||||
2) Copy this template to your workspace root as `AGENTS.md`:
|
||||
2) Copy this template into the workspace as `AGENTS.md` (overwrites any existing file):
|
||||
|
||||
```bash
|
||||
cp docs/AGENTS.default.md ~/clawd/AGENTS.md
|
||||
cp docs/AGENTS.default.md ~/.clawdis/workspace/AGENTS.md
|
||||
```
|
||||
|
||||
3) Point CLAWDIS at that workspace so Pi runs with the right context:
|
||||
3) Optional: choose a different workspace by setting `inbound.workspace` (supports `~`):
|
||||
|
||||
```json5
|
||||
{
|
||||
inbound: {
|
||||
reply: {
|
||||
cwd: "~/clawd"
|
||||
}
|
||||
workspace: "~/clawd"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@@ -17,7 +17,7 @@ If you don’t configure `inbound.reply`, CLAWDIS uses the bundled Pi binary in
|
||||
|
||||
This is usually enough for a personal assistant setup; add `inbound.allowFrom` to restrict who can trigger it.
|
||||
|
||||
If you keep an `AGENTS.md` (and optional “memory” files) for the agent, set `inbound.reply.cwd` to that workspace so Pi runs with the right context.
|
||||
If you keep an `AGENTS.md` (and optional “memory” files) for the agent, set `inbound.workspace` (preferred) or `inbound.reply.cwd` so Pi runs with the right context.
|
||||
|
||||
## Custom agent command (still Pi)
|
||||
|
||||
|
||||
@@ -90,23 +90,23 @@ Now message the assistant number from your allowlisted phone.
|
||||
|
||||
## Give the agent a workspace (AGENTS.md)
|
||||
|
||||
Pi (the bundled coding agent) will read operating instructions and “memory” from the current working directory. For a good first-run experience, create a dedicated workspace and drop an `AGENTS.md` there.
|
||||
Pi (the bundled coding agent) will read operating instructions and “memory” from its current working directory.
|
||||
|
||||
By default, Clawdis uses `~/.clawdis/workspace` as the agent workspace, and will create it (plus a starter `AGENTS.md`) automatically on first agent run.
|
||||
|
||||
From the CLAWDIS repo:
|
||||
|
||||
```bash
|
||||
mkdir -p ~/clawd
|
||||
cp docs/AGENTS.default.md ~/clawd/AGENTS.md
|
||||
mkdir -p ~/.clawdis/workspace
|
||||
cp docs/AGENTS.default.md ~/.clawdis/workspace/AGENTS.md
|
||||
```
|
||||
|
||||
Then set `inbound.reply.cwd` to that directory (supports `~`):
|
||||
Optional: choose a different workspace with `inbound.workspace` (supports `~`). `inbound.reply.cwd` still works and overrides it.
|
||||
|
||||
```json5
|
||||
{
|
||||
inbound: {
|
||||
reply: {
|
||||
cwd: "~/clawd"
|
||||
}
|
||||
workspace: "~/clawd"
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -133,8 +133,6 @@ Example:
|
||||
mode: "command",
|
||||
// Pi is bundled; CLAWDIS forces --mode rpc for Pi runs.
|
||||
command: ["pi", "--mode", "rpc", "{{BodyStripped}}"],
|
||||
// Run the agent from your dedicated workspace (AGENTS.md, memory files, etc).
|
||||
cwd: "~/clawd",
|
||||
timeoutSeconds: 1800,
|
||||
bodyPrefix: "/think:high ",
|
||||
session: {
|
||||
|
||||
@@ -77,13 +77,15 @@ Example command-mode config:
|
||||
```json5
|
||||
{
|
||||
inbound: {
|
||||
// Preferred: the agent workspace directory (used as default cwd for agent runs; supports ~).
|
||||
workspace: "~/.clawdis/workspace",
|
||||
reply: {
|
||||
mode: "command",
|
||||
// Example: run the bundled agent (Pi) in RPC mode
|
||||
command: ["pi", "--mode", "rpc", "{{BodyStripped}}"],
|
||||
// Optional: run the agent from a specific working directory (supports ~).
|
||||
// Useful when you keep an AGENTS.md + memory files in a dedicated workspace.
|
||||
cwd: "~/clawd",
|
||||
// Optional override: working directory for this reply command (supports ~).
|
||||
// If omitted, `inbound.workspace` is used.
|
||||
cwd: "~/.clawdis/workspace",
|
||||
timeoutSeconds: 1800,
|
||||
heartbeatMinutes: 30,
|
||||
// Optional: override the command used for heartbeat runs
|
||||
@@ -107,8 +109,8 @@ Example command-mode config:
|
||||
```
|
||||
|
||||
Notes:
|
||||
- `inbound.reply.cwd` sets the working directory for the reply command (and Pi RPC). It supports `~` and is resolved to an absolute path.
|
||||
- If you don’t set it, the agent runs from the Gateway’s current directory (often not what you want for a “personal assistant” workspace).
|
||||
- `inbound.workspace` sets the default working directory for agent runs (supports `~` and is resolved to an absolute path).
|
||||
- `inbound.reply.cwd` overrides the working directory for that specific reply command.
|
||||
|
||||
### `browser` (clawd-managed Chrome)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user