@action-llama/action-llama 0.13.0 → 0.13.2
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 +4 -17
- package/{docs/agent-reference → agent-docs}/AGENTS.md +27 -0
- package/{docs/agent-reference → agent-docs}/skills/README.md +1 -0
- package/agent-docs/skills/calls.md +82 -0
- package/{docs/agent-reference → agent-docs}/skills/resource-locks.md +13 -7
- package/{docs/agent-reference → agent-docs}/skills/signals.md +1 -1
- package/dist/agents/container-entry.d.ts.map +1 -1
- package/dist/agents/container-entry.js +15 -0
- package/dist/agents/container-entry.js.map +1 -1
- package/dist/agents/prompt.d.ts.map +1 -1
- package/dist/agents/prompt.js +3 -2
- package/dist/agents/prompt.js.map +1 -1
- package/dist/build-info.json +1 -1
- package/dist/cli/commands/doctor.d.ts.map +1 -1
- package/dist/cli/commands/doctor.js +15 -0
- package/dist/cli/commands/doctor.js.map +1 -1
- package/dist/cli/commands/env.d.ts.map +1 -1
- package/dist/cli/commands/env.js +4 -0
- package/dist/cli/commands/env.js.map +1 -1
- package/dist/cli/commands/kill.js +2 -2
- package/dist/cli/commands/kill.js.map +1 -1
- package/dist/cli/commands/pause.js +2 -2
- package/dist/cli/commands/pause.js.map +1 -1
- package/dist/cli/commands/push.js +1 -1
- package/dist/cli/commands/push.js.map +1 -1
- package/dist/cli/commands/resume.js +2 -2
- package/dist/cli/commands/resume.js.map +1 -1
- package/dist/cli/commands/run.js +2 -2
- package/dist/cli/commands/run.js.map +1 -1
- package/dist/cli/commands/status.js +5 -5
- package/dist/cli/commands/status.js.map +1 -1
- package/dist/cli/commands/stop.js +2 -2
- package/dist/cli/commands/stop.js.map +1 -1
- package/dist/cli/gateway-client.d.ts +6 -0
- package/dist/cli/gateway-client.d.ts.map +1 -1
- package/dist/cli/gateway-client.js +19 -0
- package/dist/cli/gateway-client.js.map +1 -1
- package/dist/cloud/vps/constants.d.ts +1 -1
- package/dist/cloud/vps/constants.d.ts.map +1 -1
- package/dist/cloud/vps/constants.js +9 -0
- package/dist/cloud/vps/constants.js.map +1 -1
- package/dist/cloud/vps/provision.js +11 -1
- package/dist/cloud/vps/provision.js.map +1 -1
- package/dist/cloud/vps/ssh.d.ts +7 -0
- package/dist/cloud/vps/ssh.d.ts.map +1 -1
- package/dist/cloud/vps/ssh.js +15 -1
- package/dist/cloud/vps/ssh.js.map +1 -1
- package/dist/credentials/builtins/index.d.ts.map +1 -1
- package/dist/credentials/builtins/index.js +6 -0
- package/dist/credentials/builtins/index.js.map +1 -1
- package/dist/credentials/builtins/mintlify-token.d.ts +4 -0
- package/dist/credentials/builtins/mintlify-token.d.ts.map +1 -0
- package/dist/credentials/builtins/mintlify-token.js +14 -0
- package/dist/credentials/builtins/mintlify-token.js.map +1 -0
- package/dist/credentials/builtins/mintlify-webhook-secret.d.ts +4 -0
- package/dist/credentials/builtins/mintlify-webhook-secret.d.ts.map +1 -0
- package/dist/credentials/builtins/mintlify-webhook-secret.js +12 -0
- package/dist/credentials/builtins/mintlify-webhook-secret.js.map +1 -0
- package/dist/credentials/builtins/reddit-oauth.d.ts +4 -0
- package/dist/credentials/builtins/reddit-oauth.d.ts.map +1 -0
- package/dist/credentials/builtins/reddit-oauth.js +71 -0
- package/dist/credentials/builtins/reddit-oauth.js.map +1 -0
- package/dist/docker/local-runtime.d.ts +0 -3
- package/dist/docker/local-runtime.d.ts.map +1 -1
- package/dist/docker/local-runtime.js +1 -34
- package/dist/docker/local-runtime.js.map +1 -1
- package/dist/docker/runtime.d.ts +0 -4
- package/dist/docker/runtime.d.ts.map +1 -1
- package/dist/gateway/index.d.ts +3 -0
- package/dist/gateway/index.d.ts.map +1 -1
- package/dist/gateway/index.js +23 -3
- package/dist/gateway/index.js.map +1 -1
- package/dist/gateway/routes/calls.d.ts +2 -1
- package/dist/gateway/routes/calls.d.ts.map +1 -1
- package/dist/gateway/routes/calls.js +12 -1
- package/dist/gateway/routes/calls.js.map +1 -1
- package/dist/gateway/routes/control.d.ts +2 -0
- package/dist/gateway/routes/control.d.ts.map +1 -1
- package/dist/gateway/routes/control.js +30 -2
- package/dist/gateway/routes/control.js.map +1 -1
- package/dist/gateway/routes/locks.d.ts +2 -0
- package/dist/gateway/routes/locks.d.ts.map +1 -1
- package/dist/gateway/routes/locks.js +20 -0
- package/dist/gateway/routes/locks.js.map +1 -1
- package/dist/gateway/routes/signals.d.ts +2 -1
- package/dist/gateway/routes/signals.d.ts.map +1 -1
- package/dist/gateway/routes/signals.js +21 -1
- package/dist/gateway/routes/signals.js.map +1 -1
- package/dist/remote/bootstrap.d.ts +2 -0
- package/dist/remote/bootstrap.d.ts.map +1 -1
- package/dist/remote/bootstrap.js +5 -9
- package/dist/remote/bootstrap.js.map +1 -1
- package/dist/remote/push.js +85 -71
- package/dist/remote/push.js.map +1 -1
- package/dist/scheduler/events.d.ts +78 -0
- package/dist/scheduler/events.d.ts.map +1 -0
- package/dist/scheduler/events.js +65 -0
- package/dist/scheduler/events.js.map +1 -0
- package/dist/scheduler/execution.d.ts +15 -0
- package/dist/scheduler/execution.d.ts.map +1 -1
- package/dist/scheduler/execution.js +31 -2
- package/dist/scheduler/execution.js.map +1 -1
- package/dist/scheduler/index.d.ts +5 -0
- package/dist/scheduler/index.d.ts.map +1 -1
- package/dist/scheduler/index.js +61 -17
- package/dist/scheduler/index.js.map +1 -1
- package/dist/scheduler/webhook-setup.d.ts.map +1 -1
- package/dist/scheduler/webhook-setup.js +16 -0
- package/dist/scheduler/webhook-setup.js.map +1 -1
- package/dist/setup/scaffold.js +2 -2
- package/dist/setup/scaffold.js.map +1 -1
- package/dist/shared/config.d.ts +1 -0
- package/dist/shared/config.d.ts.map +1 -1
- package/dist/shared/config.js.map +1 -1
- package/dist/webhooks/definitions/github.d.ts.map +1 -1
- package/dist/webhooks/definitions/github.js +13 -0
- package/dist/webhooks/definitions/github.js.map +1 -1
- package/dist/webhooks/providers/github.d.ts.map +1 -1
- package/dist/webhooks/providers/github.js +6 -0
- package/dist/webhooks/providers/github.js.map +1 -1
- package/dist/webhooks/providers/mintlify.d.ts +9 -0
- package/dist/webhooks/providers/mintlify.d.ts.map +1 -0
- package/dist/webhooks/providers/mintlify.js +69 -0
- package/dist/webhooks/providers/mintlify.js.map +1 -0
- package/dist/webhooks/types.d.ts +9 -1
- package/dist/webhooks/types.d.ts.map +1 -1
- package/docker/bin/_http-exit +35 -0
- package/docker/bin/al-call +10 -4
- package/docker/bin/al-check +9 -3
- package/docker/bin/al-status +1 -1
- package/docker/bin/al-wait +11 -3
- package/docker/bin/rlock +9 -2
- package/docker/bin/rlock-heartbeat +9 -2
- package/docker/bin/runlock +9 -2
- package/package.json +2 -2
- package/docs/agent-config-reference.md +0 -313
- package/docs/agents.md +0 -256
- package/docs/cloud-run.md +0 -173
- package/docs/cloud.md +0 -98
- package/docs/commands.md +0 -286
- package/docs/config-reference.md +0 -241
- package/docs/creating-agents.md +0 -147
- package/docs/credentials.md +0 -167
- package/docs/docker.md +0 -323
- package/docs/ecs.md +0 -795
- package/docs/examples/dev/ACTIONS.md +0 -96
- package/docs/examples/dev/README.md +0 -42
- package/docs/examples/dev/agent-config.toml +0 -24
- package/docs/examples/index.md +0 -15
- package/docs/examples/planner/ACTIONS.md +0 -177
- package/docs/examples/planner/README.md +0 -39
- package/docs/examples/planner/agent-config.toml +0 -31
- package/docs/examples/reviewer/ACTIONS.md +0 -153
- package/docs/examples/reviewer/README.md +0 -39
- package/docs/examples/reviewer/agent-config.toml +0 -21
- package/docs/models.md +0 -191
- package/docs/vps-deployment.md +0 -285
- package/docs/web-dashboard.md +0 -113
- package/docs/webhooks.md +0 -152
- /package/{docs/agent-reference → agent-docs}/skills/credentials.md +0 -0
- /package/{docs/agent-reference → agent-docs}/skills/environment.md +0 -0
package/docs/commands.md
DELETED
|
@@ -1,286 +0,0 @@
|
|
|
1
|
-
# CLI Commands
|
|
2
|
-
|
|
3
|
-
## `al new <name>`
|
|
4
|
-
|
|
5
|
-
Creates a new Action Llama project. Runs interactive setup to configure credentials and LLM defaults.
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npx @action-llama/action-llama new my-project
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
Creates:
|
|
12
|
-
- `my-project/package.json` — with `@action-llama/action-llama` dependency
|
|
13
|
-
- `my-project/.gitignore`
|
|
14
|
-
- `my-project/.workspace/` — runtime state directory
|
|
15
|
-
- Credential files in `~/.action-llama/credentials/`
|
|
16
|
-
|
|
17
|
-
After setup, create agents by following [Creating Agents](creating-agents.md).
|
|
18
|
-
|
|
19
|
-
## `al doctor`
|
|
20
|
-
|
|
21
|
-
Checks all agent credentials and interactively prompts for any that are missing. Discovers agents in the project, collects their credential requirements (plus any webhook secret credentials), and ensures each one exists on disk. Also generates a gateway API key if one doesn't exist yet (used for dashboard and CLI authentication).
|
|
22
|
-
|
|
23
|
-
Additionally validates webhook trigger field configurations to catch common errors like:
|
|
24
|
-
- Using `repository` instead of `repos`
|
|
25
|
-
- Misspelled field names
|
|
26
|
-
- Invalid field types
|
|
27
|
-
|
|
28
|
-
This helps catch configuration mistakes early and ensures webhook triggers are properly configured.
|
|
29
|
-
|
|
30
|
-
```bash
|
|
31
|
-
al doctor -p .
|
|
32
|
-
al doctor -p ./my-project
|
|
33
|
-
al doctor -c # Also push creds to cloud + reconcile IAM
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
| Option | Description |
|
|
37
|
-
|--------|-------------|
|
|
38
|
-
| `-p, --project <dir>` | Project directory (default: `.`) |
|
|
39
|
-
| `-c, --cloud` | Push credentials to cloud and create per-agent IAM resources |
|
|
40
|
-
|
|
41
|
-
### `al doctor -c`
|
|
42
|
-
|
|
43
|
-
In cloud mode, `al doctor` additionally:
|
|
44
|
-
1. Pushes all local credentials to the cloud secret manager configured in `[cloud]`
|
|
45
|
-
2. Creates per-agent IAM resources (service accounts for Cloud Run, task roles for ECS)
|
|
46
|
-
3. Grants each agent access to only its declared secrets
|
|
47
|
-
|
|
48
|
-
**Cloud Run** (`cloud.provider = "cloud-run"`):
|
|
49
|
-
|
|
50
|
-
For each agent, it:
|
|
51
|
-
1. Creates `al-{agentName}@{gcpProject}.iam.gserviceaccount.com`
|
|
52
|
-
2. Grants `secretmanager.secretAccessor` on that agent's declared credentials
|
|
53
|
-
3. Grants `iam.serviceAccountUser` for Cloud Run execution
|
|
54
|
-
|
|
55
|
-
Requires `gcloud` CLI with project admin permissions. See [Cloud Run docs](cloud-run.md) for full setup.
|
|
56
|
-
|
|
57
|
-
**ECS Fargate** (`cloud.provider = "ecs"`):
|
|
58
|
-
|
|
59
|
-
For each agent, it:
|
|
60
|
-
1. Creates IAM role `al-{agentName}-task-role`
|
|
61
|
-
2. Attaches an inline policy granting `secretsmanager:GetSecretValue` on that agent's declared credentials
|
|
62
|
-
|
|
63
|
-
Requires AWS CLI with IAM admin permissions. See [ECS docs](ecs.md) for full setup.
|
|
64
|
-
|
|
65
|
-
**VPS** (`cloud.provider = "vps"`):
|
|
66
|
-
|
|
67
|
-
Pushes all local credentials to the VPS filesystem over SSH. No IAM roles — SSH access implies full access. See [VPS docs](vps-deployment.md) for full setup.
|
|
68
|
-
|
|
69
|
-
**Re-run after adding agents:** Whenever you add a new agent to your project, re-run `al doctor -c` to create IAM resources for the new agent (Cloud Run/ECS) or push credentials (VPS). Without this, the new agent won't have access to its credentials at runtime.
|
|
70
|
-
|
|
71
|
-
## `al creds ls`
|
|
72
|
-
|
|
73
|
-
Lists all stored credentials grouped by type, showing field names but not values.
|
|
74
|
-
|
|
75
|
-
```bash
|
|
76
|
-
al creds ls
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
Example output:
|
|
80
|
-
|
|
81
|
-
```
|
|
82
|
-
Anthropic API Key (anthropic_key)
|
|
83
|
-
anthropic_key (token)
|
|
84
|
-
|
|
85
|
-
GitHub Token (github_token)
|
|
86
|
-
github_token (token)
|
|
87
|
-
|
|
88
|
-
GitHub Webhook Secret (github_webhook_secret)
|
|
89
|
-
github_webhook_secret:myapp (secret)
|
|
90
|
-
github_webhook_secret:staging (secret)
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
Default instances are shown without the `:default` suffix.
|
|
94
|
-
|
|
95
|
-
## `al creds add <ref>`
|
|
96
|
-
|
|
97
|
-
Add or update a credential. Runs the interactive prompter with validation for the credential type.
|
|
98
|
-
|
|
99
|
-
```bash
|
|
100
|
-
al creds add github_token # adds github_token:default
|
|
101
|
-
al creds add github_webhook_secret:myapp
|
|
102
|
-
al creds add git_ssh:prod
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
The `<ref>` format is `type` or `type:instance`. If no instance is specified, defaults to `default`. If the credential already exists, you'll be prompted to update it.
|
|
106
|
-
|
|
107
|
-
## `al creds rm <ref>`
|
|
108
|
-
|
|
109
|
-
Remove a credential from disk.
|
|
110
|
-
|
|
111
|
-
```bash
|
|
112
|
-
al creds rm github_token # removes github_token:default
|
|
113
|
-
al creds rm github_webhook_secret:myapp
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
Removes all field files for the credential instance. If the type directory becomes empty, it is also removed.
|
|
117
|
-
|
|
118
|
-
## `al setup cloud`
|
|
119
|
-
|
|
120
|
-
Interactive wizard for configuring cloud infrastructure. Prompts for provider selection and provider-specific fields, writes `[cloud]` to config.toml, pushes credentials, and provisions IAM — all in one shot.
|
|
121
|
-
|
|
122
|
-
If an existing `[cloud]` config is found, you'll be prompted to tear down the old infrastructure first.
|
|
123
|
-
|
|
124
|
-
```bash
|
|
125
|
-
al setup cloud -p .
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
| Option | Description |
|
|
129
|
-
|--------|-------------|
|
|
130
|
-
| `-p, --project <dir>` | Project directory (default: `.`) |
|
|
131
|
-
|
|
132
|
-
## `al teardown cloud`
|
|
133
|
-
|
|
134
|
-
Deletes per-agent IAM resources (service accounts for Cloud Run, task roles for ECS), stops containers and cleans up credentials (VPS), and removes the `[cloud]` section from config.toml.
|
|
135
|
-
|
|
136
|
-
```bash
|
|
137
|
-
al teardown cloud -p .
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
| Option | Description |
|
|
141
|
-
|--------|-------------|
|
|
142
|
-
| `-p, --project <dir>` | Project directory (default: `.`) |
|
|
143
|
-
|
|
144
|
-
## `al run <agent>`
|
|
145
|
-
|
|
146
|
-
Manually triggers a single agent run. The agent runs once and the process exits when it completes. Useful for testing, debugging, or one-off runs without starting the full scheduler.
|
|
147
|
-
|
|
148
|
-
```bash
|
|
149
|
-
al run dev -p .
|
|
150
|
-
al run reviewer -p ./my-project
|
|
151
|
-
al run dev -c # Run on cloud
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
| Option | Description |
|
|
155
|
-
|--------|-------------|
|
|
156
|
-
| `-p, --project <dir>` | Project directory (default: `.`) |
|
|
157
|
-
| `-c, --cloud` | Run on cloud infrastructure |
|
|
158
|
-
|
|
159
|
-
## `al start`
|
|
160
|
-
|
|
161
|
-
Starts the scheduler. Runs all agents on their configured schedules and listens for webhooks.
|
|
162
|
-
|
|
163
|
-
```bash
|
|
164
|
-
al start -p .
|
|
165
|
-
al start -p ./my-project
|
|
166
|
-
al start -c # Run on cloud
|
|
167
|
-
al start -w # Enable web dashboard
|
|
168
|
-
al start -e # VPS deployment: expose gateway publicly
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
| Option | Description |
|
|
172
|
-
|--------|-------------|
|
|
173
|
-
| `-p, --project <dir>` | Project directory (default: `.`) |
|
|
174
|
-
| `-c, --cloud` | Run on cloud infrastructure |
|
|
175
|
-
| `-w, --web-ui` | Enable web dashboard (see [Web Dashboard](web-dashboard.md)) |
|
|
176
|
-
| `-e, --expose` | Bind gateway to `0.0.0.0` (public) while keeping local-mode features |
|
|
177
|
-
| `-H, --headless` | Non-interactive mode (no TUI, no credential prompts) |
|
|
178
|
-
|
|
179
|
-
## `al stat`
|
|
180
|
-
|
|
181
|
-
Shows status of all discovered agents in the project.
|
|
182
|
-
|
|
183
|
-
```bash
|
|
184
|
-
al stat -p .
|
|
185
|
-
al stat -c # Show cloud status
|
|
186
|
-
```
|
|
187
|
-
|
|
188
|
-
Displays each agent's schedule, credentials, and webhook configuration.
|
|
189
|
-
|
|
190
|
-
| Option | Description |
|
|
191
|
-
|--------|-------------|
|
|
192
|
-
| `-p, --project <dir>` | Project directory (default: `.`) |
|
|
193
|
-
| `-c, --cloud` | Show cloud infrastructure status |
|
|
194
|
-
|
|
195
|
-
## `al logs <agent>`
|
|
196
|
-
|
|
197
|
-
View log files for a specific agent.
|
|
198
|
-
|
|
199
|
-
```bash
|
|
200
|
-
al logs dev -p .
|
|
201
|
-
al logs dev -n 100 # Show last 100 entries
|
|
202
|
-
al logs dev -f # Follow/tail mode
|
|
203
|
-
al logs dev -d 2025-01-15 # Specific date
|
|
204
|
-
al logs dev -c # Cloud logs
|
|
205
|
-
```
|
|
206
|
-
|
|
207
|
-
| Option | Description |
|
|
208
|
-
|--------|-------------|
|
|
209
|
-
| `-p, --project <dir>` | Project directory (default: `.`) |
|
|
210
|
-
| `-n, --lines <N>` | Number of log entries (default: 50) |
|
|
211
|
-
| `-f, --follow` | Tail mode — watch for new entries |
|
|
212
|
-
| `-d, --date <YYYY-MM-DD>` | View a specific date's log file |
|
|
213
|
-
| `-c, --cloud` | View cloud logs (Cloud Logging / CloudWatch) |
|
|
214
|
-
|
|
215
|
-
## `al pause [name]`
|
|
216
|
-
|
|
217
|
-
Pause the scheduler or a single agent. Without a name, pauses the entire scheduler — all cron jobs stop firing. With a name, pauses that agent — its cron job stops firing and webhook events are ignored. In-flight runs continue until they finish. Requires the gateway.
|
|
218
|
-
|
|
219
|
-
```bash
|
|
220
|
-
al pause # Pause the scheduler
|
|
221
|
-
al pause dev # Pause a single agent
|
|
222
|
-
al pause reviewer -p ./my-project
|
|
223
|
-
al pause dev -c # Pause via cloud gateway
|
|
224
|
-
```
|
|
225
|
-
|
|
226
|
-
| Option | Description |
|
|
227
|
-
|--------|-------------|
|
|
228
|
-
| `-p, --project <dir>` | Project directory (default: `.`) |
|
|
229
|
-
| `-c, --cloud` | Forward pause request to the cloud-deployed scheduler's gateway |
|
|
230
|
-
|
|
231
|
-
## `al resume [name]`
|
|
232
|
-
|
|
233
|
-
Resume the scheduler or a single agent. Without a name, resumes the entire scheduler. With a name, resumes that agent — its cron job resumes firing and webhooks are accepted again.
|
|
234
|
-
|
|
235
|
-
```bash
|
|
236
|
-
al resume # Resume the scheduler
|
|
237
|
-
al resume dev # Resume a single agent
|
|
238
|
-
al resume reviewer -p ./my-project
|
|
239
|
-
al resume dev -c # Resume via cloud gateway
|
|
240
|
-
```
|
|
241
|
-
|
|
242
|
-
| Option | Description |
|
|
243
|
-
|--------|-------------|
|
|
244
|
-
| `-p, --project <dir>` | Project directory (default: `.`) |
|
|
245
|
-
| `-c, --cloud` | Forward resume request to the cloud-deployed scheduler's gateway |
|
|
246
|
-
|
|
247
|
-
## `al kill <target>`
|
|
248
|
-
|
|
249
|
-
Kill an agent (all running instances) or a single instance by ID. Tries the target as an agent name first; if not found, falls back to instance ID. This does **not** pause the agent — if it has a schedule, a new run will start at the next cron tick. To fully stop an agent, pause it first, then kill.
|
|
250
|
-
|
|
251
|
-
```bash
|
|
252
|
-
al kill dev # Kill all instances of an agent
|
|
253
|
-
al kill my-agent-abc123 # Kill a single instance by ID
|
|
254
|
-
al kill dev -p ./my-project
|
|
255
|
-
al kill dev -c # Kill cloud tasks directly
|
|
256
|
-
```
|
|
257
|
-
|
|
258
|
-
| Option | Description |
|
|
259
|
-
|--------|-------------|
|
|
260
|
-
| `-p, --project <dir>` | Project directory (default: `.`) |
|
|
261
|
-
| `-c, --cloud` | Kill cloud tasks directly via ECS StopTask / Cloud Run cancel APIs |
|
|
262
|
-
|
|
263
|
-
## `al chat`
|
|
264
|
-
|
|
265
|
-
Open an interactive console. Without an agent name, opens the project-level console for creating and managing agents. With an agent name, opens an interactive session scoped to that agent's environment — credentials are loaded and injected as environment variables (e.g. `GITHUB_TOKEN`, `GIT_SSH_COMMAND`), and the working directory is set to the agent's directory.
|
|
266
|
-
|
|
267
|
-
```bash
|
|
268
|
-
al chat # project-level console
|
|
269
|
-
al chat dev # interactive session with dev agent's credentials
|
|
270
|
-
al chat dev -c # same, but credentials from cloud secrets manager
|
|
271
|
-
```
|
|
272
|
-
|
|
273
|
-
| Option | Description |
|
|
274
|
-
|--------|-------------|
|
|
275
|
-
| `[agent]` | Agent name — loads its credentials and environment |
|
|
276
|
-
| `-p, --project <dir>` | Project directory (default: `.`) |
|
|
277
|
-
| `-c, --cloud` | Load credentials from cloud secrets manager |
|
|
278
|
-
|
|
279
|
-
When running in agent mode, the command probes the gateway and warns if it is not reachable:
|
|
280
|
-
|
|
281
|
-
```
|
|
282
|
-
⚠ No gateway detected at http://localhost:8080. Resource locks, agent calls, and signals are unavailable.
|
|
283
|
-
Start the scheduler with `al start -g` to enable these features.
|
|
284
|
-
```
|
|
285
|
-
|
|
286
|
-
The agent's ACTIONS.md is loaded as reference context but is **not** auto-executed — you drive the session interactively.
|
package/docs/config-reference.md
DELETED
|
@@ -1,241 +0,0 @@
|
|
|
1
|
-
# config.toml Reference
|
|
2
|
-
|
|
3
|
-
The project-level `config.toml` lives at the root of your Action Llama project. All sections and fields are optional — sensible defaults are used for anything you omit. If the file doesn't exist at all, an empty config is assumed.
|
|
4
|
-
|
|
5
|
-
## Full Annotated Example
|
|
6
|
-
|
|
7
|
-
```toml
|
|
8
|
-
# Default model for all agents (agents can override in their own agent-config.toml)
|
|
9
|
-
[model]
|
|
10
|
-
provider = "anthropic"
|
|
11
|
-
model = "claude-sonnet-4-20250514"
|
|
12
|
-
thinkingLevel = "medium"
|
|
13
|
-
authType = "api_key"
|
|
14
|
-
|
|
15
|
-
# Local Docker container settings
|
|
16
|
-
[local]
|
|
17
|
-
image = "al-agent:latest" # Base image name (default: "al-agent:latest")
|
|
18
|
-
memory = "4g" # Memory limit per container (default: "4g")
|
|
19
|
-
cpus = 2 # CPU limit per container (default: 2)
|
|
20
|
-
timeout = 900 # Default max container runtime in seconds (default: 900, overridable per-agent)
|
|
21
|
-
|
|
22
|
-
# Cloud provider config (optional — only needed for `al start -c`)
|
|
23
|
-
[cloud]
|
|
24
|
-
provider = "cloud-run" # "cloud-run", "ecs", or "vps"
|
|
25
|
-
# ... provider-specific fields (see below)
|
|
26
|
-
|
|
27
|
-
# Gateway HTTP server settings
|
|
28
|
-
[gateway]
|
|
29
|
-
port = 8080 # Gateway port (default: 8080)
|
|
30
|
-
lockTimeout = 1800 # Lock TTL in seconds (default: 1800 / 30 minutes)
|
|
31
|
-
|
|
32
|
-
# Webhook sources — named webhook endpoints with provider type and credential
|
|
33
|
-
[webhooks.my-github]
|
|
34
|
-
type = "github"
|
|
35
|
-
credential = "MyOrg" # credential instance for HMAC validation
|
|
36
|
-
|
|
37
|
-
# Scheduler settings
|
|
38
|
-
maxReruns = 10 # Max consecutive reruns for successful agent runs (default: 10)
|
|
39
|
-
maxCallDepth = 3 # Max depth for agent-to-agent call chains (default: 3)
|
|
40
|
-
workQueueSize = 100 # Max queued work items (webhooks + calls) per agent (default: 100)
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
## Field Reference
|
|
44
|
-
|
|
45
|
-
### Top-level fields
|
|
46
|
-
|
|
47
|
-
| Field | Type | Default | Description |
|
|
48
|
-
|-------|------|---------|-------------|
|
|
49
|
-
| `maxReruns` | number | `10` | Maximum consecutive reruns when an agent requests a rerun via `al-rerun` before stopping |
|
|
50
|
-
| `maxCallDepth` | number | `3` | Maximum depth for agent-to-agent call chains (A calls B calls C = depth 2) |
|
|
51
|
-
| `workQueueSize` | number | `100` | Maximum queued work items (webhook events + agent calls) per agent when all runners are busy |
|
|
52
|
-
|
|
53
|
-
### `[model]` — Default LLM
|
|
54
|
-
|
|
55
|
-
Default model configuration inherited by all agents that don't define their own `[model]` section in `agent-config.toml`.
|
|
56
|
-
|
|
57
|
-
| Field | Type | Required | Description |
|
|
58
|
-
|-------|------|----------|-------------|
|
|
59
|
-
| `provider` | string | Yes | LLM provider: `"anthropic"`, `"openai"`, `"groq"`, `"google"`, `"xai"`, `"mistral"`, `"openrouter"`, or `"custom"` |
|
|
60
|
-
| `model` | string | Yes | Model ID (e.g. `"claude-sonnet-4-20250514"`, `"gpt-4o"`, `"gemini-2.0-flash-exp"`) |
|
|
61
|
-
| `authType` | string | Yes | Auth method: `"api_key"`, `"oauth_token"`, or `"pi_auth"` |
|
|
62
|
-
| `thinkingLevel` | string | No | Thinking budget: `"off"`, `"minimal"`, `"low"`, `"medium"`, `"high"`, `"xhigh"`. Only applies to Anthropic models with reasoning support. Ignored for other providers. |
|
|
63
|
-
|
|
64
|
-
See [Models](models.md) for all supported providers, model IDs, auth types, and thinking levels.
|
|
65
|
-
|
|
66
|
-
### `[local]` — Docker Container Settings
|
|
67
|
-
|
|
68
|
-
Controls local Docker container isolation. These settings also apply as resource limits for Cloud Run jobs and ECS Fargate tasks.
|
|
69
|
-
|
|
70
|
-
| Field | Type | Default | Description |
|
|
71
|
-
|-------|------|---------|-------------|
|
|
72
|
-
| `image` | string | `"al-agent:latest"` | Base Docker image name |
|
|
73
|
-
| `memory` | string | `"4g"` | Memory limit per container (e.g. `"4g"`, `"8g"`, `"4096"` for ECS in MiB) |
|
|
74
|
-
| `cpus` | number | `2` | CPU limit per container |
|
|
75
|
-
| `timeout` | number | `900` | Default max container runtime in seconds. Individual agents can override this with `timeout` in their `agent-config.toml`. On AWS ECS, agents with effective timeout <= 900s automatically route to Lambda for faster cold starts. See [agent timeout docs](agent-config-reference.md#timeout). |
|
|
76
|
-
|
|
77
|
-
### `[cloud]` — Cloud Provider
|
|
78
|
-
|
|
79
|
-
Only needed when running agents on cloud infrastructure with `al start -c`. Configure using `al setup cloud` (interactive wizard) or manually.
|
|
80
|
-
|
|
81
|
-
| Field | Type | Required | Description |
|
|
82
|
-
|-------|------|----------|-------------|
|
|
83
|
-
| `provider` | string | Yes | `"cloud-run"` (GCP), `"ecs"` (AWS), or `"vps"` (SSH + Docker) |
|
|
84
|
-
|
|
85
|
-
#### Cloud Run fields (`provider = "cloud-run"`)
|
|
86
|
-
|
|
87
|
-
| Field | Type | Required | Default | Description |
|
|
88
|
-
|-------|------|----------|---------|-------------|
|
|
89
|
-
| `gcpProject` | string | Yes | — | GCP project ID |
|
|
90
|
-
| `region` | string | Yes | — | Cloud Run region (e.g. `"us-central1"`) |
|
|
91
|
-
| `artifactRegistry` | string | Yes | — | Full Artifact Registry repo path (e.g. `"us-central1-docker.pkg.dev/my-project/al-images"`) |
|
|
92
|
-
| `serviceAccount` | string | No | — | Runtime service account for job creation. Per-agent SAs are used for execution. |
|
|
93
|
-
| `secretPrefix` | string | No | `"action-llama"` | Google Secret Manager name prefix |
|
|
94
|
-
|
|
95
|
-
See [Cloud Run docs](cloud-run.md) for full setup.
|
|
96
|
-
|
|
97
|
-
#### ECS Fargate fields (`provider = "ecs"`)
|
|
98
|
-
|
|
99
|
-
| Field | Type | Required | Default | Description |
|
|
100
|
-
|-------|------|----------|---------|-------------|
|
|
101
|
-
| `awsRegion` | string | Yes | — | AWS region (e.g. `"us-east-1"`) |
|
|
102
|
-
| `ecsCluster` | string | Yes | — | ECS cluster name or ARN |
|
|
103
|
-
| `ecrRepository` | string | Yes | — | Full ECR repository URI (e.g. `"123456789012.dkr.ecr.us-east-1.amazonaws.com/al-images"`) |
|
|
104
|
-
| `executionRoleArn` | string | Yes | — | IAM role ARN for task execution (ECR pull + CloudWatch Logs) |
|
|
105
|
-
| `taskRoleArn` | string | Yes | — | Default IAM task role ARN (Secrets Manager access) |
|
|
106
|
-
| `subnets` | string[] | Yes | — | VPC subnet IDs for Fargate tasks |
|
|
107
|
-
| `securityGroups` | string[] | No | — | Security group IDs for Fargate tasks |
|
|
108
|
-
| `awsSecretPrefix` | string | No | `"action-llama"` | AWS Secrets Manager name prefix |
|
|
109
|
-
| `buildBucket` | string | No | auto-created | S3 bucket for CodeBuild source uploads |
|
|
110
|
-
| `lambdaRoleArn` | string | No | auto-derived | Lambda execution role ARN. If omitted, per-agent roles (`al-{agentName}-lambda-role`) are derived automatically. |
|
|
111
|
-
| `lambdaSubnets` | string[] | No | — | VPC subnet IDs for Lambda functions (only needed if Lambda must access VPC resources) |
|
|
112
|
-
| `lambdaSecurityGroups` | string[] | No | — | Security group IDs for Lambda functions (only needed with `lambdaSubnets`) |
|
|
113
|
-
|
|
114
|
-
See [ECS docs](ecs.md) for full setup.
|
|
115
|
-
|
|
116
|
-
#### VPS fields (`provider = "vps"`)
|
|
117
|
-
|
|
118
|
-
| Field | Type | Required | Default | Description |
|
|
119
|
-
|-------|------|----------|---------|-------------|
|
|
120
|
-
| `host` | string | Yes | — | Server IP address or hostname |
|
|
121
|
-
| `sshUser` | string | No | `"root"` | SSH username |
|
|
122
|
-
| `sshPort` | number | No | `22` | SSH port |
|
|
123
|
-
| `sshKeyPath` | string | No | `"~/.ssh/id_rsa"` | Path to SSH private key |
|
|
124
|
-
| `vultrInstanceId` | string | No | — | Vultr instance ID (set automatically if provisioned via `al setup cloud`) |
|
|
125
|
-
| `vultrRegion` | string | No | — | Vultr region (set automatically if provisioned via `al setup cloud`) |
|
|
126
|
-
|
|
127
|
-
See [VPS docs](vps-deployment.md) for full setup.
|
|
128
|
-
|
|
129
|
-
### `[gateway]` — HTTP Server
|
|
130
|
-
|
|
131
|
-
The gateway starts automatically when Docker mode or webhooks are enabled. It handles health checks, webhook reception, credential serving (local Docker only), resource locking, and the shutdown kill switch.
|
|
132
|
-
|
|
133
|
-
| Field | Type | Default | Description |
|
|
134
|
-
|-------|------|---------|-------------|
|
|
135
|
-
| `port` | number | `8080` | Port for the gateway HTTP server |
|
|
136
|
-
| `lockTimeout` | number | `1800` | Default lock TTL in seconds. Locks expire automatically after this duration unless refreshed via heartbeat. |
|
|
137
|
-
|
|
138
|
-
### `[webhooks.*]` — Webhook Sources
|
|
139
|
-
|
|
140
|
-
Named webhook sources that agents can reference in their `[[webhooks]]` triggers. Each source defines a provider type and an optional credential for signature validation.
|
|
141
|
-
|
|
142
|
-
| Field | Type | Required | Description |
|
|
143
|
-
|-------|------|----------|-------------|
|
|
144
|
-
| `type` | string | Yes | Provider type: `"github"` or `"sentry"` |
|
|
145
|
-
| `credential` | string | No | Credential instance name for HMAC signature validation (e.g. `"MyOrg"` maps to `github_webhook_secret:MyOrg`). Omit for unsigned webhooks. |
|
|
146
|
-
|
|
147
|
-
```toml
|
|
148
|
-
[webhooks.my-github]
|
|
149
|
-
type = "github"
|
|
150
|
-
credential = "MyOrg" # uses github_webhook_secret:MyOrg for HMAC validation
|
|
151
|
-
|
|
152
|
-
[webhooks.my-sentry]
|
|
153
|
-
type = "sentry"
|
|
154
|
-
credential = "SentryProd" # uses sentry_client_secret:SentryProd
|
|
155
|
-
|
|
156
|
-
[webhooks.unsigned-github]
|
|
157
|
-
type = "github" # no credential — accepts unsigned webhooks
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
Agents reference these sources by name in their `agent-config.toml`:
|
|
161
|
-
|
|
162
|
-
```toml
|
|
163
|
-
[[webhooks]]
|
|
164
|
-
source = "my-github"
|
|
165
|
-
events = ["issues"]
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
## Minimal Examples
|
|
169
|
-
|
|
170
|
-
### Anthropic with Docker (typical dev setup)
|
|
171
|
-
|
|
172
|
-
```toml
|
|
173
|
-
[model]
|
|
174
|
-
provider = "anthropic"
|
|
175
|
-
model = "claude-sonnet-4-20250514"
|
|
176
|
-
thinkingLevel = "medium"
|
|
177
|
-
authType = "api_key"
|
|
178
|
-
```
|
|
179
|
-
|
|
180
|
-
Everything else uses defaults: Docker enabled, 4GB memory, 2 CPUs, 15min timeout, gateway on port 8080.
|
|
181
|
-
|
|
182
|
-
### Cloud Run production
|
|
183
|
-
|
|
184
|
-
```toml
|
|
185
|
-
[model]
|
|
186
|
-
provider = "anthropic"
|
|
187
|
-
model = "claude-sonnet-4-20250514"
|
|
188
|
-
thinkingLevel = "medium"
|
|
189
|
-
authType = "api_key"
|
|
190
|
-
|
|
191
|
-
[local]
|
|
192
|
-
memory = "8g"
|
|
193
|
-
cpus = 4
|
|
194
|
-
timeout = 7200
|
|
195
|
-
|
|
196
|
-
[cloud]
|
|
197
|
-
provider = "cloud-run"
|
|
198
|
-
gcpProject = "my-gcp-project"
|
|
199
|
-
region = "us-central1"
|
|
200
|
-
artifactRegistry = "us-central1-docker.pkg.dev/my-gcp-project/al-images"
|
|
201
|
-
|
|
202
|
-
[gateway]
|
|
203
|
-
port = 3000
|
|
204
|
-
```
|
|
205
|
-
|
|
206
|
-
### ECS Fargate production
|
|
207
|
-
|
|
208
|
-
```toml
|
|
209
|
-
[model]
|
|
210
|
-
provider = "anthropic"
|
|
211
|
-
model = "claude-sonnet-4-20250514"
|
|
212
|
-
thinkingLevel = "medium"
|
|
213
|
-
authType = "api_key"
|
|
214
|
-
|
|
215
|
-
[cloud]
|
|
216
|
-
provider = "ecs"
|
|
217
|
-
awsRegion = "us-east-1"
|
|
218
|
-
ecsCluster = "al-cluster"
|
|
219
|
-
ecrRepository = "123456789012.dkr.ecr.us-east-1.amazonaws.com/al-images"
|
|
220
|
-
executionRoleArn = "arn:aws:iam::123456789012:role/ecsTaskExecutionRole"
|
|
221
|
-
taskRoleArn = "arn:aws:iam::123456789012:role/al-default-task-role"
|
|
222
|
-
subnets = ["subnet-abc123"]
|
|
223
|
-
|
|
224
|
-
maxReruns = 5
|
|
225
|
-
maxCallDepth = 2
|
|
226
|
-
```
|
|
227
|
-
|
|
228
|
-
### VPS production
|
|
229
|
-
|
|
230
|
-
```toml
|
|
231
|
-
[model]
|
|
232
|
-
provider = "anthropic"
|
|
233
|
-
model = "claude-sonnet-4-20250514"
|
|
234
|
-
thinkingLevel = "medium"
|
|
235
|
-
authType = "api_key"
|
|
236
|
-
|
|
237
|
-
[cloud]
|
|
238
|
-
provider = "vps"
|
|
239
|
-
host = "5.6.7.8"
|
|
240
|
-
sshUser = "root"
|
|
241
|
-
```
|
package/docs/creating-agents.md
DELETED
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
# Creating Agents
|
|
2
|
-
|
|
3
|
-
This guide walks you through creating an Action Llama agent from scratch.
|
|
4
|
-
|
|
5
|
-
## Prerequisites
|
|
6
|
-
|
|
7
|
-
- An Action Llama project (created with `al new <name>`)
|
|
8
|
-
- Credentials configured in `~/.action-llama/credentials/` (see [Credentials](credentials.md))
|
|
9
|
-
|
|
10
|
-
## Steps
|
|
11
|
-
|
|
12
|
-
### 1. Create the agent directory
|
|
13
|
-
|
|
14
|
-
Inside your project directory, create a folder for your agent under the `agents/` directory:
|
|
15
|
-
|
|
16
|
-
```bash
|
|
17
|
-
mkdir -p agents/my-agent
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
### 2. Write `agent-config.toml`
|
|
21
|
-
|
|
22
|
-
Create `agents/my-agent/agent-config.toml`:
|
|
23
|
-
|
|
24
|
-
```toml
|
|
25
|
-
credentials = ["github_token", "git_ssh"]
|
|
26
|
-
schedule = "*/5 * * * *"
|
|
27
|
-
|
|
28
|
-
[params]
|
|
29
|
-
repos = ["your-org/your-repo"]
|
|
30
|
-
|
|
31
|
-
[model]
|
|
32
|
-
provider = "anthropic"
|
|
33
|
-
model = "claude-sonnet-4-20250514"
|
|
34
|
-
thinkingLevel = "medium"
|
|
35
|
-
authType = "api_key"
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
Supported providers: `anthropic`, `openai`, `groq`, `google`, `xai`, `mistral`, `openrouter`, `custom`. See [agent-config.toml Reference](agent-config-reference.md) for all available fields and provider examples.
|
|
39
|
-
|
|
40
|
-
### 3. Write `ACTIONS.md`
|
|
41
|
-
|
|
42
|
-
Create `agents/my-agent/ACTIONS.md` — this is the system prompt that defines your agent's behavior:
|
|
43
|
-
|
|
44
|
-
```markdown
|
|
45
|
-
# My Agent
|
|
46
|
-
|
|
47
|
-
You are an automation agent. Your job is to ...
|
|
48
|
-
|
|
49
|
-
Your configuration is in the `<agent-config>` block at the start of your prompt.
|
|
50
|
-
|
|
51
|
-
`GITHUB_TOKEN` is already set in your environment. Use `gh` CLI and `git` directly.
|
|
52
|
-
|
|
53
|
-
## Workflow
|
|
54
|
-
|
|
55
|
-
1. **Step one** — ...
|
|
56
|
-
2. **Step two** — ...
|
|
57
|
-
|
|
58
|
-
## Rules
|
|
59
|
-
|
|
60
|
-
- ...
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
The ACTIONS.md is injected as the agent's system prompt at runtime. Write it as instructions to the LLM.
|
|
64
|
-
|
|
65
|
-
### 4. (Optional) Add preflight steps
|
|
66
|
-
|
|
67
|
-
If your agent needs external context (repo contents, API data, issue lists), add `[[preflight]]` steps to `agent-config.toml`. Preflight runs after credentials are loaded but before the LLM session starts, so the agent begins with everything it needs:
|
|
68
|
-
|
|
69
|
-
```toml
|
|
70
|
-
[[preflight]]
|
|
71
|
-
provider = "git-clone"
|
|
72
|
-
[preflight.params]
|
|
73
|
-
repo = "your-org/your-repo"
|
|
74
|
-
dest = "/tmp/repo"
|
|
75
|
-
depth = 1
|
|
76
|
-
|
|
77
|
-
[[preflight]]
|
|
78
|
-
provider = "shell"
|
|
79
|
-
[preflight.params]
|
|
80
|
-
command = "gh issue list --repo your-org/your-repo --label bug --json number,title --limit 20"
|
|
81
|
-
output = "/tmp/context/issues.json"
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
Then reference the staged files in your ACTIONS.md:
|
|
85
|
-
|
|
86
|
-
```markdown
|
|
87
|
-
## Context
|
|
88
|
-
- The repo is cloned at `/tmp/repo`
|
|
89
|
-
- Open bug issues are at `/tmp/context/issues.json`
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
See [Preflight](agent-config-reference.md#preflight) for the full reference.
|
|
93
|
-
|
|
94
|
-
### 5. Verify with `al stat`
|
|
95
|
-
|
|
96
|
-
```bash
|
|
97
|
-
al stat -p .
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
This should show your agent with its schedule and credentials.
|
|
101
|
-
|
|
102
|
-
### 6. Run with `al start`
|
|
103
|
-
|
|
104
|
-
```bash
|
|
105
|
-
al start -p .
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
Your agent will run on its configured schedule and/or respond to webhooks.
|
|
109
|
-
|
|
110
|
-
### 7. (Optional) Customize the project Dockerfile
|
|
111
|
-
|
|
112
|
-
Every project has a `Dockerfile` at the root (created by `al new`) that defines the shared base image for all agents. If your agents need extra system packages, edit it:
|
|
113
|
-
|
|
114
|
-
```dockerfile
|
|
115
|
-
FROM al-agent:latest
|
|
116
|
-
|
|
117
|
-
# Shared tools for all agents
|
|
118
|
-
RUN apk add --no-cache github-cli python3
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
If only one specific agent needs extra tools, add a `Dockerfile` to that agent's directory instead:
|
|
122
|
-
|
|
123
|
-
```dockerfile
|
|
124
|
-
FROM al-agent:latest
|
|
125
|
-
USER root
|
|
126
|
-
RUN apk add --no-cache github-cli
|
|
127
|
-
USER node
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
See [Docker docs](docker.md) for the full reference.
|
|
131
|
-
|
|
132
|
-
### 8. (Cloud only) Re-run `al doctor -c`
|
|
133
|
-
|
|
134
|
-
If you're running agents on cloud infrastructure, re-run `al doctor -c` after adding a new agent. This creates the per-agent IAM resources (service account for Cloud Run, task role for ECS) and grants the new agent access to its declared secrets.
|
|
135
|
-
|
|
136
|
-
```bash
|
|
137
|
-
al doctor -c -p .
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
Without this step, the new agent will fail to access its credentials at runtime.
|
|
141
|
-
|
|
142
|
-
## Tips
|
|
143
|
-
|
|
144
|
-
- Agent name is derived from the directory name — no need to put it in the config
|
|
145
|
-
- Use `al-rerun` in your ACTIONS.md to tell the agent to run `al-rerun` when it did work and there may be more in the backlog
|
|
146
|
-
- Params in the config are injected into the agent prompt as an `<agent-config>` XML block
|
|
147
|
-
- See [Examples](examples/index.md) for complete working agents
|