@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.
Files changed (161) hide show
  1. package/README.md +4 -17
  2. package/{docs/agent-reference → agent-docs}/AGENTS.md +27 -0
  3. package/{docs/agent-reference → agent-docs}/skills/README.md +1 -0
  4. package/agent-docs/skills/calls.md +82 -0
  5. package/{docs/agent-reference → agent-docs}/skills/resource-locks.md +13 -7
  6. package/{docs/agent-reference → agent-docs}/skills/signals.md +1 -1
  7. package/dist/agents/container-entry.d.ts.map +1 -1
  8. package/dist/agents/container-entry.js +15 -0
  9. package/dist/agents/container-entry.js.map +1 -1
  10. package/dist/agents/prompt.d.ts.map +1 -1
  11. package/dist/agents/prompt.js +3 -2
  12. package/dist/agents/prompt.js.map +1 -1
  13. package/dist/build-info.json +1 -1
  14. package/dist/cli/commands/doctor.d.ts.map +1 -1
  15. package/dist/cli/commands/doctor.js +15 -0
  16. package/dist/cli/commands/doctor.js.map +1 -1
  17. package/dist/cli/commands/env.d.ts.map +1 -1
  18. package/dist/cli/commands/env.js +4 -0
  19. package/dist/cli/commands/env.js.map +1 -1
  20. package/dist/cli/commands/kill.js +2 -2
  21. package/dist/cli/commands/kill.js.map +1 -1
  22. package/dist/cli/commands/pause.js +2 -2
  23. package/dist/cli/commands/pause.js.map +1 -1
  24. package/dist/cli/commands/push.js +1 -1
  25. package/dist/cli/commands/push.js.map +1 -1
  26. package/dist/cli/commands/resume.js +2 -2
  27. package/dist/cli/commands/resume.js.map +1 -1
  28. package/dist/cli/commands/run.js +2 -2
  29. package/dist/cli/commands/run.js.map +1 -1
  30. package/dist/cli/commands/status.js +5 -5
  31. package/dist/cli/commands/status.js.map +1 -1
  32. package/dist/cli/commands/stop.js +2 -2
  33. package/dist/cli/commands/stop.js.map +1 -1
  34. package/dist/cli/gateway-client.d.ts +6 -0
  35. package/dist/cli/gateway-client.d.ts.map +1 -1
  36. package/dist/cli/gateway-client.js +19 -0
  37. package/dist/cli/gateway-client.js.map +1 -1
  38. package/dist/cloud/vps/constants.d.ts +1 -1
  39. package/dist/cloud/vps/constants.d.ts.map +1 -1
  40. package/dist/cloud/vps/constants.js +9 -0
  41. package/dist/cloud/vps/constants.js.map +1 -1
  42. package/dist/cloud/vps/provision.js +11 -1
  43. package/dist/cloud/vps/provision.js.map +1 -1
  44. package/dist/cloud/vps/ssh.d.ts +7 -0
  45. package/dist/cloud/vps/ssh.d.ts.map +1 -1
  46. package/dist/cloud/vps/ssh.js +15 -1
  47. package/dist/cloud/vps/ssh.js.map +1 -1
  48. package/dist/credentials/builtins/index.d.ts.map +1 -1
  49. package/dist/credentials/builtins/index.js +6 -0
  50. package/dist/credentials/builtins/index.js.map +1 -1
  51. package/dist/credentials/builtins/mintlify-token.d.ts +4 -0
  52. package/dist/credentials/builtins/mintlify-token.d.ts.map +1 -0
  53. package/dist/credentials/builtins/mintlify-token.js +14 -0
  54. package/dist/credentials/builtins/mintlify-token.js.map +1 -0
  55. package/dist/credentials/builtins/mintlify-webhook-secret.d.ts +4 -0
  56. package/dist/credentials/builtins/mintlify-webhook-secret.d.ts.map +1 -0
  57. package/dist/credentials/builtins/mintlify-webhook-secret.js +12 -0
  58. package/dist/credentials/builtins/mintlify-webhook-secret.js.map +1 -0
  59. package/dist/credentials/builtins/reddit-oauth.d.ts +4 -0
  60. package/dist/credentials/builtins/reddit-oauth.d.ts.map +1 -0
  61. package/dist/credentials/builtins/reddit-oauth.js +71 -0
  62. package/dist/credentials/builtins/reddit-oauth.js.map +1 -0
  63. package/dist/docker/local-runtime.d.ts +0 -3
  64. package/dist/docker/local-runtime.d.ts.map +1 -1
  65. package/dist/docker/local-runtime.js +1 -34
  66. package/dist/docker/local-runtime.js.map +1 -1
  67. package/dist/docker/runtime.d.ts +0 -4
  68. package/dist/docker/runtime.d.ts.map +1 -1
  69. package/dist/gateway/index.d.ts +3 -0
  70. package/dist/gateway/index.d.ts.map +1 -1
  71. package/dist/gateway/index.js +23 -3
  72. package/dist/gateway/index.js.map +1 -1
  73. package/dist/gateway/routes/calls.d.ts +2 -1
  74. package/dist/gateway/routes/calls.d.ts.map +1 -1
  75. package/dist/gateway/routes/calls.js +12 -1
  76. package/dist/gateway/routes/calls.js.map +1 -1
  77. package/dist/gateway/routes/control.d.ts +2 -0
  78. package/dist/gateway/routes/control.d.ts.map +1 -1
  79. package/dist/gateway/routes/control.js +30 -2
  80. package/dist/gateway/routes/control.js.map +1 -1
  81. package/dist/gateway/routes/locks.d.ts +2 -0
  82. package/dist/gateway/routes/locks.d.ts.map +1 -1
  83. package/dist/gateway/routes/locks.js +20 -0
  84. package/dist/gateway/routes/locks.js.map +1 -1
  85. package/dist/gateway/routes/signals.d.ts +2 -1
  86. package/dist/gateway/routes/signals.d.ts.map +1 -1
  87. package/dist/gateway/routes/signals.js +21 -1
  88. package/dist/gateway/routes/signals.js.map +1 -1
  89. package/dist/remote/bootstrap.d.ts +2 -0
  90. package/dist/remote/bootstrap.d.ts.map +1 -1
  91. package/dist/remote/bootstrap.js +5 -9
  92. package/dist/remote/bootstrap.js.map +1 -1
  93. package/dist/remote/push.js +85 -71
  94. package/dist/remote/push.js.map +1 -1
  95. package/dist/scheduler/events.d.ts +78 -0
  96. package/dist/scheduler/events.d.ts.map +1 -0
  97. package/dist/scheduler/events.js +65 -0
  98. package/dist/scheduler/events.js.map +1 -0
  99. package/dist/scheduler/execution.d.ts +15 -0
  100. package/dist/scheduler/execution.d.ts.map +1 -1
  101. package/dist/scheduler/execution.js +31 -2
  102. package/dist/scheduler/execution.js.map +1 -1
  103. package/dist/scheduler/index.d.ts +5 -0
  104. package/dist/scheduler/index.d.ts.map +1 -1
  105. package/dist/scheduler/index.js +61 -17
  106. package/dist/scheduler/index.js.map +1 -1
  107. package/dist/scheduler/webhook-setup.d.ts.map +1 -1
  108. package/dist/scheduler/webhook-setup.js +16 -0
  109. package/dist/scheduler/webhook-setup.js.map +1 -1
  110. package/dist/setup/scaffold.js +2 -2
  111. package/dist/setup/scaffold.js.map +1 -1
  112. package/dist/shared/config.d.ts +1 -0
  113. package/dist/shared/config.d.ts.map +1 -1
  114. package/dist/shared/config.js.map +1 -1
  115. package/dist/webhooks/definitions/github.d.ts.map +1 -1
  116. package/dist/webhooks/definitions/github.js +13 -0
  117. package/dist/webhooks/definitions/github.js.map +1 -1
  118. package/dist/webhooks/providers/github.d.ts.map +1 -1
  119. package/dist/webhooks/providers/github.js +6 -0
  120. package/dist/webhooks/providers/github.js.map +1 -1
  121. package/dist/webhooks/providers/mintlify.d.ts +9 -0
  122. package/dist/webhooks/providers/mintlify.d.ts.map +1 -0
  123. package/dist/webhooks/providers/mintlify.js +69 -0
  124. package/dist/webhooks/providers/mintlify.js.map +1 -0
  125. package/dist/webhooks/types.d.ts +9 -1
  126. package/dist/webhooks/types.d.ts.map +1 -1
  127. package/docker/bin/_http-exit +35 -0
  128. package/docker/bin/al-call +10 -4
  129. package/docker/bin/al-check +9 -3
  130. package/docker/bin/al-status +1 -1
  131. package/docker/bin/al-wait +11 -3
  132. package/docker/bin/rlock +9 -2
  133. package/docker/bin/rlock-heartbeat +9 -2
  134. package/docker/bin/runlock +9 -2
  135. package/package.json +2 -2
  136. package/docs/agent-config-reference.md +0 -313
  137. package/docs/agents.md +0 -256
  138. package/docs/cloud-run.md +0 -173
  139. package/docs/cloud.md +0 -98
  140. package/docs/commands.md +0 -286
  141. package/docs/config-reference.md +0 -241
  142. package/docs/creating-agents.md +0 -147
  143. package/docs/credentials.md +0 -167
  144. package/docs/docker.md +0 -323
  145. package/docs/ecs.md +0 -795
  146. package/docs/examples/dev/ACTIONS.md +0 -96
  147. package/docs/examples/dev/README.md +0 -42
  148. package/docs/examples/dev/agent-config.toml +0 -24
  149. package/docs/examples/index.md +0 -15
  150. package/docs/examples/planner/ACTIONS.md +0 -177
  151. package/docs/examples/planner/README.md +0 -39
  152. package/docs/examples/planner/agent-config.toml +0 -31
  153. package/docs/examples/reviewer/ACTIONS.md +0 -153
  154. package/docs/examples/reviewer/README.md +0 -39
  155. package/docs/examples/reviewer/agent-config.toml +0 -21
  156. package/docs/models.md +0 -191
  157. package/docs/vps-deployment.md +0 -285
  158. package/docs/web-dashboard.md +0 -113
  159. package/docs/webhooks.md +0 -152
  160. /package/{docs/agent-reference → agent-docs}/skills/credentials.md +0 -0
  161. /package/{docs/agent-reference → agent-docs}/skills/environment.md +0 -0
package/docs/models.md DELETED
@@ -1,191 +0,0 @@
1
- # Models
2
-
3
- Action Llama supports 8 LLM providers. Each agent can use a different provider and model — configure a project-wide default in `config.toml` under `[model]`, and override per agent in `agent-config.toml`.
4
-
5
- ## `[model]` Fields
6
-
7
- | Field | Type | Required | Description |
8
- |-------|------|----------|-------------|
9
- | `provider` | string | Yes | Provider name (see table below) |
10
- | `model` | string | Yes | Model ID |
11
- | `authType` | string | Yes | `"api_key"`, `"oauth_token"`, or `"pi_auth"` |
12
- | `thinkingLevel` | string | No | Reasoning budget (Anthropic only) |
13
-
14
- ## Providers
15
-
16
- ### Anthropic
17
-
18
- Claude models with optional extended thinking.
19
-
20
- ```toml
21
- [model]
22
- provider = "anthropic"
23
- model = "claude-sonnet-4-20250514"
24
- thinkingLevel = "medium"
25
- authType = "api_key"
26
- ```
27
-
28
- | Model | Description |
29
- |-------|-------------|
30
- | `claude-opus-4-20250514` | Most capable, best for complex multi-step tasks |
31
- | `claude-sonnet-4-20250514` | Balanced performance and cost (recommended) |
32
- | `claude-haiku-3-5-20241022` | Fastest and cheapest |
33
-
34
- **Credential:** `anthropic_key` (field: `token`)
35
-
36
- **Auth types:**
37
-
38
- | `authType` | Token format | Description |
39
- |------------|-------------|-------------|
40
- | `api_key` | `sk-ant-api-...` | Standard Anthropic API key |
41
- | `oauth_token` | `sk-ant-oat-...` | OAuth token from `claude setup-token` |
42
- | `pi_auth` | _(none)_ | Uses existing pi auth credentials (`~/.pi/agent/auth.json`). No credential file needed. |
43
-
44
- **Note:** `pi_auth` is not supported in Docker mode. Switch to `api_key` or `oauth_token` for containerized runs.
45
-
46
- **Thinking level:** Anthropic is the only provider that supports `thinkingLevel`. Valid values:
47
-
48
- | Level | Description |
49
- |-------|-------------|
50
- | `off` | No extended thinking |
51
- | `minimal` | Minimal reasoning |
52
- | `low` | Light reasoning |
53
- | `medium` | Balanced (recommended) |
54
- | `high` | Deep reasoning |
55
- | `xhigh` | Maximum reasoning budget |
56
-
57
- If omitted, thinking is not explicitly configured. For other providers, `thinkingLevel` is ignored.
58
-
59
- ### OpenAI
60
-
61
- ```toml
62
- [model]
63
- provider = "openai"
64
- model = "gpt-4o"
65
- authType = "api_key"
66
- ```
67
-
68
- | Model | Description |
69
- |-------|-------------|
70
- | `gpt-4o` | Flagship multimodal model (recommended) |
71
- | `gpt-4o-mini` | Smaller, faster, cheaper |
72
- | `gpt-4-turbo` | Previous generation |
73
- | `o1-preview` | Reasoning model |
74
- | `o1-mini` | Smaller reasoning model |
75
-
76
- **Credential:** `openai_key` (field: `token`)
77
-
78
- ### Groq
79
-
80
- ```toml
81
- [model]
82
- provider = "groq"
83
- model = "llama-3.3-70b-versatile"
84
- authType = "api_key"
85
- ```
86
-
87
- | Model | Description |
88
- |-------|-------------|
89
- | `llama-3.3-70b-versatile` | Llama 3.3 70B on Groq inference |
90
-
91
- Groq runs open-source models at high speed. Check [Groq's docs](https://console.groq.com/docs/models) for the full list of available model IDs.
92
-
93
- **Credential:** `groq_key` (field: `token`)
94
-
95
- ### Google Gemini
96
-
97
- ```toml
98
- [model]
99
- provider = "google"
100
- model = "gemini-2.0-flash-exp"
101
- authType = "api_key"
102
- ```
103
-
104
- | Model | Description |
105
- |-------|-------------|
106
- | `gemini-2.0-flash-exp` | Fast experimental model |
107
-
108
- Check [Google AI Studio](https://ai.google.dev/models) for the full list of available model IDs.
109
-
110
- **Credential:** `google_key` (field: `token`)
111
-
112
- ### xAI
113
-
114
- ```toml
115
- [model]
116
- provider = "xai"
117
- model = "grok-beta"
118
- authType = "api_key"
119
- ```
120
-
121
- | Model | Description |
122
- |-------|-------------|
123
- | `grok-beta` | Grok beta |
124
-
125
- **Credential:** `xai_key` (field: `token`)
126
-
127
- ### Mistral
128
-
129
- ```toml
130
- [model]
131
- provider = "mistral"
132
- model = "mistral-large-2411"
133
- authType = "api_key"
134
- ```
135
-
136
- | Model | Description |
137
- |-------|-------------|
138
- | `mistral-large-2411` | Mistral Large (November 2024) |
139
-
140
- Check [Mistral's docs](https://docs.mistral.ai/getting-started/models/) for the full list of available model IDs.
141
-
142
- **Credential:** `mistral_key` (field: `token`)
143
-
144
- ### OpenRouter
145
-
146
- OpenRouter provides access to models from many providers through a single API.
147
-
148
- ```toml
149
- [model]
150
- provider = "openrouter"
151
- model = "anthropic/claude-3.5-sonnet"
152
- authType = "api_key"
153
- ```
154
-
155
- Model IDs use the `provider/model` format. See [OpenRouter's model list](https://openrouter.ai/models) for all available models.
156
-
157
- **Credential:** `openrouter_key` (field: `token`)
158
-
159
- ### Custom
160
-
161
- For any provider not listed above. The model ID and API routing are handled by the underlying [pi.dev agent harness](https://github.com/badlogic/pi-mono).
162
-
163
- ```toml
164
- [model]
165
- provider = "custom"
166
- model = "your-model-name"
167
- authType = "api_key"
168
- ```
169
-
170
- **Credential:** `custom_key` (field: `token`)
171
-
172
- ## Mixing Models
173
-
174
- Each agent can use a different model. Define a project default in `config.toml`, then override in specific agents:
175
-
176
- ```
177
- config.toml → [model] provider = "anthropic", model = "claude-sonnet-4-20250514"
178
- dev/agent-config.toml → (no [model] section — inherits Claude Sonnet)
179
- reviewer/agent-config.toml → [model] provider = "openai", model = "gpt-4o"
180
- devops/agent-config.toml → [model] provider = "groq", model = "llama-3.3-70b-versatile"
181
- ```
182
-
183
- If an agent defines its own `[model]` section, it fully overrides the project default — there is no field-level merging.
184
-
185
- ## Credential Setup
186
-
187
- Each provider requires a corresponding credential in `~/.action-llama/credentials/`. Run `al doctor` to configure them interactively.
188
-
189
- The LLM credential does not need to be listed in your agent's `credentials` array — it is loaded automatically based on the `[model]` config. The `credentials` array is for runtime credentials the agent uses during execution (GitHub tokens, SSH keys, etc.).
190
-
191
- See [Credentials](credentials.md) for the full credential reference.
@@ -1,285 +0,0 @@
1
- # VPS Deployment
2
-
3
- Deploy Action Llama on any VPS (DigitalOcean, Vultr, Hetzner, etc.) for cost-effective remote hosting.
4
-
5
- There are two approaches:
6
-
7
- 1. **VPS cloud provider** (`provider: "vps"`) — manage the VPS from your local machine via SSH. Images are built on the VPS, credentials pushed over SSH, scheduler deployed as a Docker container. Set up with `al setup cloud`.
8
- 2. **Manual deployment** — install Action Llama directly on the VPS and run `al start` with the `--expose` flag. Simpler, but requires SSH'ing into the server to manage.
9
-
10
- ## Approach 1: VPS Cloud Provider (Recommended)
11
-
12
- The VPS cloud provider lets you manage your VPS deployment from your local machine, just like AWS or GCP.
13
-
14
- ### Quick Start
15
-
16
- ```bash
17
- # From your local machine:
18
- al setup cloud -p . # Select "VPS (Vultr, etc.)" → connect or provision
19
- al doctor -c -p . # Push credentials to VPS via SSH
20
- al cloud deploy -p . # Deploy scheduler to VPS
21
- ```
22
-
23
- ### Setup Options
24
-
25
- The `al setup cloud` wizard offers two paths:
26
-
27
- #### Connect to an existing server
28
-
29
- Works with any VPS provider (DigitalOcean, Hetzner, Linode, etc.) or any server you can SSH into:
30
-
31
- 1. Enter the server IP, SSH user, port, and key path
32
- 2. Action Llama validates SSH connectivity and checks Docker is installed
33
- 3. Configuration is written to your environment file
34
-
35
- Requirements:
36
- - SSH access to the server
37
- - Docker installed on the server (`curl -fsSL https://get.docker.com | sh`)
38
-
39
- #### Provision a new Vultr VPS
40
-
41
- Automated provisioning with Vultr as a supported backend:
42
-
43
- 1. Configure `vultr_api_key` credential first: `al creds add vultr_api_key`
44
- 2. Run `al setup cloud` and select "Provision a new Vultr VPS"
45
- 3. Pick region, plan (minimum 2 vCPU / 2GB RAM), and SSH key
46
- 4. Instance is created with cloud-init that installs Docker automatically
47
- 5. Action Llama waits for the instance to become ready
48
-
49
- #### Provision a new Hetzner VPS
50
-
51
- Automated provisioning with Hetzner Cloud:
52
-
53
- 1. Configure `hetzner_api_key` credential first: `al creds add hetzner_api_key`
54
- 2. Run `al setup cloud` and select "Provision a new Hetzner VPS"
55
- 3. Pick server type, location, OS image, and SSH key
56
- 4. Server is created with cloud-init that installs Docker automatically
57
- 5. Action Llama waits for the server to become ready
58
-
59
- ### How It Works
60
-
61
- | Operation | Implementation |
62
- |-----------|---------------|
63
- | Image builds | `tar -c . \| ssh docker build -t <tag> -` (built on VPS, no registry) |
64
- | Credential storage | Filesystem on VPS (`~/.action-llama/credentials/`) via SSH |
65
- | Credential push | `al doctor -c` copies credentials over SSH |
66
- | Scheduler deploy | `docker run -d --restart unless-stopped` on VPS |
67
- | IAM reconciliation | No-op (SSH access = full access) |
68
- | Log streaming | Real-time via SSH (`docker logs -f`) |
69
-
70
- ### Configuration
71
-
72
- In your environment file (`~/.action-llama/environments/<name>.toml`):
73
-
74
- ```toml
75
- [cloud]
76
- provider = "vps"
77
- host = "5.6.7.8"
78
- sshUser = "root" # default: "root"
79
- sshPort = 22 # default: 22
80
- sshKeyPath = "~/.ssh/id_rsa" # default: "~/.ssh/id_rsa"
81
-
82
- # Set automatically if provisioned via Vultr:
83
- # vultrInstanceId = "abc123"
84
- # vultrRegion = "ewr"
85
- ```
86
-
87
- ### Teardown
88
-
89
- ```bash
90
- al teardown cloud -p .
91
- ```
92
-
93
- This stops all Action Llama containers and cleans up remote credentials. If the instance was provisioned via Vultr, you'll be offered the option to delete it.
94
-
95
- ## Approach 2: Manual Deployment
96
-
97
- Install Action Llama directly on your VPS and run it there. Simpler but requires managing the server directly.
98
-
99
- ### Quick Start
100
-
101
- On your VPS:
102
-
103
- ```bash
104
- # Install Action Llama
105
- npm install -g @action-llama/action-llama
106
-
107
- # Set up your project (or clone from git)
108
- al new my-project
109
- cd my-project
110
-
111
- # Configure credentials and check setup
112
- al doctor
113
-
114
- # Start with public gateway binding
115
- al start -w --expose --headless
116
- ```
117
-
118
- ### Key Features
119
-
120
- The `--expose` flag enables VPS deployment by:
121
-
122
- - **Binding gateway to `0.0.0.0`** — makes webhooks accessible from external services
123
- - **Preserving local-mode features** — web UI, control routes, filesystem credentials, SQLite state
124
- - **No cloud infrastructure required** — works on any Linux VPS
125
-
126
- ## TLS Setup with Caddy
127
-
128
- For production, put a reverse proxy in front with TLS termination:
129
-
130
- ### 1. Install Caddy
131
-
132
- ```bash
133
- # Ubuntu/Debian
134
- sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https
135
- curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
136
- curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
137
- sudo apt update && sudo apt install caddy
138
- ```
139
-
140
- ### 2. Configure Caddy
141
-
142
- Edit `/etc/caddy/Caddyfile`:
143
-
144
- ```
145
- your-domain.com {
146
- reverse_proxy localhost:8080
147
- }
148
- ```
149
-
150
- ### 3. Start Caddy
151
-
152
- ```bash
153
- sudo systemctl enable caddy
154
- sudo systemctl start caddy
155
- ```
156
-
157
- ## Process Management with systemd
158
-
159
- For the manual deployment approach, create `/etc/systemd/system/action-llama.service`:
160
-
161
- ```ini
162
- [Unit]
163
- Description=Action Llama Scheduler
164
- After=network.target
165
-
166
- [Service]
167
- Type=simple
168
- User=action-llama
169
- WorkingDirectory=/home/action-llama/my-project
170
- Environment=NODE_ENV=production
171
- ExecStart=/usr/local/bin/al start -w --expose --headless
172
- Restart=always
173
- RestartSec=10
174
-
175
- [Install]
176
- WantedBy=multi-user.target
177
- ```
178
-
179
- Start the service:
180
-
181
- ```bash
182
- sudo systemctl enable action-llama
183
- sudo systemctl start action-llama
184
- ```
185
-
186
- ## Alternative: nohup
187
-
188
- For simpler setups, use `nohup`:
189
-
190
- ```bash
191
- nohup al start -w --expose --headless > action-llama.log 2>&1 &
192
- ```
193
-
194
- ## Firewall Configuration
195
-
196
- Ensure your VPS firewall allows:
197
-
198
- - Port 22 (SSH)
199
- - Port 80 (HTTP, for Caddy)
200
- - Port 443 (HTTPS, for Caddy)
201
- - Port 8080 only if not using a reverse proxy
202
-
203
- Example with `ufw`:
204
-
205
- ```bash
206
- sudo ufw allow ssh
207
- sudo ufw allow http
208
- sudo ufw allow https
209
- sudo ufw enable
210
- ```
211
-
212
- ## Security Considerations
213
-
214
- - **Use TLS in production** — Don't expose port 8080 directly without HTTPS
215
- - **Gateway API key** — Action Llama generates an API key for dashboard access (run `al doctor` to view it)
216
- - **Credentials isolation** — Each agent runs in a Docker container with only its required credentials
217
- - **User separation** — Run Action Llama as a non-root user
218
- - **SSH key security** — The VPS cloud provider uses your SSH key for all operations. Protect it with a passphrase and restrict access.
219
-
220
- ## Monitoring
221
-
222
- Check service status:
223
-
224
- ```bash
225
- # systemd (manual deployment)
226
- sudo systemctl status action-llama
227
-
228
- # Cloud provider deployment
229
- al stat -c
230
-
231
- # Logs
232
- al logs scheduler
233
- al logs dev -c # Cloud provider: view agent logs via SSH
234
- journalctl -u action-llama -f
235
- ```
236
-
237
- ## Cost Comparison
238
-
239
- | Provider | vCPU | RAM | Storage | Price/month |
240
- |----------|------|-----|---------|-------------|
241
- | DigitalOcean | 1 | 1GB | 25GB SSD | $6 |
242
- | Vultr | 1 | 1GB | 25GB SSD | $6 |
243
- | Hetzner | 1 | 2GB | 20GB SSD | €4.15 |
244
- | Linode | 1 | 1GB | 25GB SSD | $5 |
245
-
246
- Compare to managed cloud solutions that may cost $50+ per month for similar agent workloads.
247
-
248
- ## Troubleshooting
249
-
250
- ### Gateway not accessible externally
251
-
252
- - Check firewall settings
253
- - Verify `--expose` flag is used (manual deployment)
254
-
255
- ### Docker issues
256
-
257
- ```bash
258
- # Check Docker daemon
259
- sudo systemctl status docker
260
-
261
- # Test Docker access
262
- docker ps
263
- ```
264
-
265
- ### SSH connection issues (cloud provider)
266
-
267
- ```bash
268
- # Test SSH manually
269
- ssh -o ConnectTimeout=10 root@your-vps-ip echo ok
270
-
271
- # Check SSH key permissions
272
- chmod 600 ~/.ssh/id_rsa
273
- ```
274
-
275
- ### Webhook delivery failures
276
-
277
- - Check reverse proxy configuration
278
- - Verify TLS certificate is valid
279
- - Test webhook URL accessibility from external services
280
-
281
- ### Out of disk space
282
-
283
- - Clean up old Docker images: `docker system prune -a`
284
- - Rotate logs: configure systemd journal limits
285
- - Monitor disk usage: `df -h`
@@ -1,113 +0,0 @@
1
- # Web Dashboard
2
-
3
- Action Llama includes an optional web-based dashboard for monitoring agents in your browser. It provides a live view of agent statuses and streaming logs — similar to the terminal TUI, but accessible from any browser.
4
-
5
- ## Enabling the Dashboard
6
-
7
- Pass `-w` or `--web-ui` to `al start`:
8
-
9
- ```bash
10
- al start -w
11
- al start -w -p ./my-project
12
- ```
13
-
14
- The dashboard URL is shown in the TUI header and in headless log output once the scheduler starts:
15
-
16
- ```
17
- Dashboard: http://localhost:8080/dashboard
18
- ```
19
-
20
- The port is controlled by the `[gateway].port` setting in `config.toml` (default: `8080`).
21
-
22
- ## Authentication
23
-
24
- The dashboard is protected by a gateway API key. The same key is used for both browser sessions and CLI access.
25
-
26
- **Key location:** `~/.action-llama/credentials/gateway_api_key/default/key`
27
-
28
- The key is generated automatically by `al doctor` or on first `al start`. To view or regenerate it, run `al doctor`.
29
-
30
- ### Browser login
31
-
32
- Navigate to `http://localhost:8080/dashboard`. You'll be redirected to a login page where you paste your API key. On success, an `al_session` cookie is set (HttpOnly, SameSite=Strict) so all subsequent requests — including SSE streams — are authenticated automatically.
33
-
34
- A **Logout** link is available in the dashboard header.
35
-
36
- ### CLI access
37
-
38
- CLI commands (`al stat`, `al pause`, `al resume`, `al kill`) automatically read the API key from the credential store and send it as a `Bearer` token in the `Authorization` header.
39
-
40
- ### What's protected
41
-
42
- The following routes require authentication:
43
-
44
- - `/dashboard` and `/dashboard/*` — all dashboard pages and SSE streams
45
- - `/control/*` — scheduler and agent control endpoints (pause, resume, kill, trigger, enable/disable)
46
- - `/locks/status` — active lock information
47
-
48
- Health checks (`/health`), webhook endpoints (`/webhooks/*`), and container management routes are **not** protected.
49
-
50
- ### Migrating from `AL_DASHBOARD_SECRET`
51
-
52
- The old `AL_DASHBOARD_SECRET` environment variable (HTTP Basic Auth) is no longer used. If it's still set, a deprecation warning is logged. Remove it from your environment and run `al doctor` to set up the new API key.
53
-
54
- ## Dashboard Pages
55
-
56
- ### Main Page — `/dashboard`
57
-
58
- Displays a live overview of all agents:
59
-
60
- | Column | Description |
61
- |--------|-------------|
62
- | Agent | Agent name (click to view logs) |
63
- | State | Current state: idle, running, building, or error |
64
- | Status | Latest status text or error message |
65
- | Last Run | Timestamp of the most recent run |
66
- | Duration | How long the last run took |
67
- | Next Run | When the next scheduled run will happen |
68
- | Actions | **Run** (trigger an immediate run) and **Enable/Disable** (toggle the agent) |
69
-
70
- The header also includes:
71
-
72
- - **Pause/Resume** button — pauses or resumes the scheduler (all cron jobs)
73
- - **Logout** link — clears the session cookie and redirects to the login page
74
-
75
- Below the table, a **Recent Activity** section shows the last 20 log lines across all agents.
76
-
77
- All data updates in real time via Server-Sent Events (SSE) — no manual refresh needed.
78
-
79
- ### Agent Logs — `/dashboard/agents/<name>/logs`
80
-
81
- Displays a live-streaming log view for a single agent. Logs follow automatically by default (new entries scroll into view as they arrive).
82
-
83
- Features:
84
- - **Follow mode** — enabled by default, auto-scrolls to the latest log entry. Scrolling up pauses follow; scrolling back to the bottom re-enables it.
85
- - **Clear** — clears the log display (does not delete log files).
86
- - **Connection status** — shows whether the SSE connection is active.
87
- - **Log levels** — color-coded: green for INFO, yellow for WARN, red for ERROR.
88
-
89
- On initial load, the last 100 log entries from the agent's log file are displayed, then new entries stream in as they are written.
90
-
91
- ## How It Works
92
-
93
- The dashboard is served by the same gateway that handles webhooks and container communication. When `--web-ui` is enabled, the gateway starts even if Docker and webhooks are not configured.
94
-
95
- Live updates use **Server-Sent Events (SSE)** on two endpoints:
96
-
97
- - `GET /dashboard/api/status-stream` — pushes agent status and scheduler info whenever state changes
98
- - `GET /dashboard/api/logs/<agent>/stream` — streams log lines for a specific agent by tailing its log file (500ms poll interval)
99
-
100
- Dashboard actions (Run, Enable/Disable, Pause/Resume) call the control API endpoints:
101
-
102
- - `POST /control/trigger/<name>` — trigger an immediate agent run
103
- - `POST /control/agents/<name>/enable` — enable a disabled agent
104
- - `POST /control/agents/<name>/disable` — disable an agent (pauses its cron job)
105
- - `POST /control/agents/<name>/pause` — pause an agent (alias for disable)
106
- - `POST /control/agents/<name>/resume` — resume an agent (alias for enable)
107
- - `POST /control/agents/<name>/kill` — kill all running instances of an agent
108
- - `POST /control/pause` — pause the scheduler
109
- - `POST /control/resume` — resume the scheduler
110
-
111
- All control requests use `credentials: 'same-origin'` to carry the session cookie.
112
-
113
- No additional dependencies or frontend build steps are required. The dashboard is rendered as plain HTML with inline CSS and JavaScript.