@gaia-minds/assistant-cli 0.1.1 → 0.2.0
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 +6 -1
- package/assistant/README.md +122 -10
- package/package.json +1 -1
- package/tools/agent-config.yml +20 -5
- package/tools/agent-loop.py +499 -61
- package/tools/gaia-assistant.py +2363 -34
package/README.md
CHANGED
|
@@ -36,7 +36,12 @@ See `assistant/README.md` for full runtime and release docs.
|
|
|
36
36
|
|
|
37
37
|
- npm package is live: `@gaia-minds/assistant-cli@0.1.1`
|
|
38
38
|
- Global CLI (`gaia`) supports onboarding, auth status, doctor, and dry-run loop execution
|
|
39
|
-
-
|
|
39
|
+
- `gaia onboard` now supports provider-guided setup:
|
|
40
|
+
- OpenRouter (API key + model selection)
|
|
41
|
+
- OpenAI (API key)
|
|
42
|
+
- Anthropic (API key)
|
|
43
|
+
- OpenAI Codex OAuth (`codex login --device-auth`)
|
|
44
|
+
- Runtime reasoning provider supports `anthropic`, `openai`, and `openrouter`
|
|
40
45
|
- Self-evolution loop runs in two tracks:
|
|
41
46
|
- `assistant` (user-facing improvements)
|
|
42
47
|
- `framework` (self-evolving engine improvements)
|
package/assistant/README.md
CHANGED
|
@@ -36,20 +36,43 @@ npm install -g .
|
|
|
36
36
|
gaia doctor
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
-
##
|
|
39
|
+
## Provider Onboarding
|
|
40
40
|
|
|
41
|
-
|
|
42
|
-
The default OAuth broker is Codex CLI (web/device flow):
|
|
41
|
+
Run the guided onboarding wizard:
|
|
43
42
|
|
|
44
43
|
```bash
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
gaia onboard
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
The wizard lets you choose provider and connection style:
|
|
48
|
+
|
|
49
|
+
1. `openrouter` -> API key + model selection
|
|
50
|
+
2. `openai` -> API key
|
|
51
|
+
3. `anthropic` -> API key
|
|
52
|
+
4. `openai-codex` -> OAuth via Codex CLI
|
|
53
|
+
|
|
54
|
+
Direct non-interactive examples:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
# OpenRouter
|
|
58
|
+
gaia onboard --provider openrouter --api-key "$OPENROUTER_API_KEY" --model openrouter/auto --yes
|
|
59
|
+
|
|
60
|
+
# Anthropic
|
|
61
|
+
gaia onboard --provider anthropic --api-key "$ANTHROPIC_API_KEY" --yes
|
|
62
|
+
|
|
63
|
+
# OpenAI API key
|
|
64
|
+
gaia onboard --provider openai --api-key "$OPENAI_API_KEY" --model gpt-4.1-mini --yes
|
|
65
|
+
|
|
66
|
+
# OpenAI Codex OAuth
|
|
67
|
+
gaia onboard --provider openai-codex --yes
|
|
47
68
|
```
|
|
48
69
|
|
|
49
|
-
|
|
70
|
+
Gaia still supports explicit auth commands if you prefer manual control.
|
|
71
|
+
For Codex OAuth:
|
|
50
72
|
|
|
51
73
|
```bash
|
|
52
|
-
npm run gaia -- auth
|
|
74
|
+
npm run gaia -- auth login --source codex-cli --provider openai-codex
|
|
75
|
+
npm run gaia -- auth status
|
|
53
76
|
```
|
|
54
77
|
|
|
55
78
|
Optional compatibility path (legacy): link from OpenClaw profile store.
|
|
@@ -59,6 +82,8 @@ Use `--source openclaw`.
|
|
|
59
82
|
|
|
60
83
|
- OAuth tokens are stored in Gaia local state:
|
|
61
84
|
`~/.gaia-assistant/auth-profiles.json` (or `$GAIA_ASSISTANT_HOME/auth-profiles.json`)
|
|
85
|
+
- API keys can be stored in Gaia local secret store:
|
|
86
|
+
`~/.gaia-assistant/secrets.json` (or `$GAIA_ASSISTANT_HOME/secrets.json`)
|
|
62
87
|
- Launcher config stores profile selection metadata in:
|
|
63
88
|
`~/.gaia-assistant/config.json` (or `$GAIA_ASSISTANT_HOME/config.json`)
|
|
64
89
|
- Never commit auth stores or local runtime state to git.
|
|
@@ -73,6 +98,39 @@ The evolution loop runs with two tracks:
|
|
|
73
98
|
|
|
74
99
|
Default scheduling and policy live in `tools/agent-config.yml`.
|
|
75
100
|
|
|
101
|
+
## Action Traces
|
|
102
|
+
|
|
103
|
+
Gaia writes structured local traces to:
|
|
104
|
+
|
|
105
|
+
- `~/.gaia-assistant/traces/actions.jsonl`
|
|
106
|
+
|
|
107
|
+
Use:
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
gaia traces --last 5
|
|
111
|
+
gaia traces --type file_read
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Trace schema fields:
|
|
115
|
+
|
|
116
|
+
- `id` (UUID)
|
|
117
|
+
- `timestamp` (ISO-8601 UTC)
|
|
118
|
+
- `action_type` (for example `chat_turn`, `note_capture`, `permission_decision`)
|
|
119
|
+
- `input_summary` (redacted summary string)
|
|
120
|
+
- `output_summary` (redacted summary string)
|
|
121
|
+
- `duration_ms` (float)
|
|
122
|
+
- `permission_level` (`safe`, `confirm`, `forbidden`)
|
|
123
|
+
- `status` (`ok`, `error`, `blocked`)
|
|
124
|
+
- `schema_version` (integer)
|
|
125
|
+
- `metadata` (optional object for downstream tooling)
|
|
126
|
+
|
|
127
|
+
Capability policy can be reviewed and overridden locally:
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
gaia capability list
|
|
131
|
+
gaia capability set send_email confirm
|
|
132
|
+
```
|
|
133
|
+
|
|
76
134
|
## Budget Policy
|
|
77
135
|
|
|
78
136
|
Default budget split:
|
|
@@ -88,6 +146,36 @@ Expected environment variables for direct API mode:
|
|
|
88
146
|
|
|
89
147
|
- `ANTHROPIC_API_KEY`
|
|
90
148
|
- `OPENAI_API_KEY`
|
|
149
|
+
- `OPENROUTER_API_KEY`
|
|
150
|
+
|
|
151
|
+
Reasoning provider selection is configured by onboarding in launcher config,
|
|
152
|
+
and can be overridden per run:
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
# one-off override from Gaia launcher
|
|
156
|
+
gaia run --mode single --reasoning-provider openai --reasoning-model gpt-4.1-mini
|
|
157
|
+
gaia run --mode single --reasoning-provider openrouter --reasoning-model openrouter/auto
|
|
158
|
+
|
|
159
|
+
# npm/local clone equivalent
|
|
160
|
+
npm run gaia -- run --mode single --reasoning-provider openai --reasoning-model gpt-4.1-mini
|
|
161
|
+
npm run gaia -- run --mode single --reasoning-provider openrouter --reasoning-model openrouter/auto
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
OpenRouter quick setup:
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
export OPENROUTER_API_KEY="your-openrouter-key"
|
|
168
|
+
gaia onboard --provider openrouter
|
|
169
|
+
gaia run --mode single --reasoning-provider openrouter --reasoning-model openrouter/auto
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
OpenAI quick setup:
|
|
173
|
+
|
|
174
|
+
```bash
|
|
175
|
+
export OPENAI_API_KEY="your-openai-key"
|
|
176
|
+
gaia onboard --provider openai --model gpt-4.1-mini
|
|
177
|
+
gaia run --mode single --reasoning-provider openai --reasoning-model gpt-4.1-mini
|
|
178
|
+
```
|
|
91
179
|
|
|
92
180
|
Provider OAuth profile support is exposed through Gaia-native commands:
|
|
93
181
|
|
|
@@ -102,9 +190,33 @@ Direct Python fallback (if preferred):
|
|
|
102
190
|
|
|
103
191
|
OpenClaw linking remains available as an optional compatibility source.
|
|
104
192
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
193
|
+
The self-evolution loop planner supports Anthropic, OpenAI, and OpenRouter in
|
|
194
|
+
non-dry runs. Tier-2 LLM alignment checks currently run only with Anthropic;
|
|
195
|
+
when using OpenAI or OpenRouter, Tier-1 deterministic alignment checks still apply.
|
|
196
|
+
|
|
197
|
+
## Agent Follow-Up
|
|
198
|
+
|
|
199
|
+
For agents continuing this track, use contributor workflow from:
|
|
200
|
+
|
|
201
|
+
- `skills/gaia-contributor/SKILL.md`
|
|
202
|
+
- `skills/gaia-assistant-builder/SKILL.md`
|
|
203
|
+
|
|
204
|
+
Recommended handoff protocol:
|
|
205
|
+
|
|
206
|
+
1. Pull latest main and read this file + `tools/agent-config.yml`.
|
|
207
|
+
2. Check open work first:
|
|
208
|
+
- `gh issue list --state open`
|
|
209
|
+
- `gh pr list --state open`
|
|
210
|
+
3. Avoid duplication:
|
|
211
|
+
- `rg -n "<topic>" assistant tools infrastructure skills`
|
|
212
|
+
4. Prefer small, reviewable PRs for runtime changes.
|
|
213
|
+
5. Before pushing, run:
|
|
214
|
+
- `make check-all`
|
|
215
|
+
- `make test-smoke`
|
|
216
|
+
- `python3 -m py_compile tools/gaia-assistant.py tools/agent-loop.py tools/agent-alignment.py`
|
|
217
|
+
6. Update `CHANGELOG.md` with meaningful behavior changes.
|
|
218
|
+
7. If this is your first PR to Gaia, include Constitutional acknowledgment from
|
|
219
|
+
`skills/gaia-contributor/SKILL.md` in PR description.
|
|
108
220
|
|
|
109
221
|
## Maintainer Release Flow
|
|
110
222
|
|
package/package.json
CHANGED
package/tools/agent-config.yml
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
# repository. The agent runs on a schedule, picks tasks, validates them against
|
|
6
6
|
# the Constitution, and opens PRs (or auto-executes low-risk actions).
|
|
7
7
|
#
|
|
8
|
-
# SECURITY NOTE: No secrets are stored here.
|
|
9
|
-
#
|
|
8
|
+
# SECURITY NOTE: No secrets are stored here. API keys are read from
|
|
9
|
+
# environment variables at runtime.
|
|
10
10
|
# =============================================================================
|
|
11
11
|
|
|
12
12
|
# ---------------------------------------------------------------------------
|
|
@@ -18,13 +18,28 @@ agent:
|
|
|
18
18
|
description: "Self-evolving autonomous agent for Gaia Minds"
|
|
19
19
|
|
|
20
20
|
# ---------------------------------------------------------------------------
|
|
21
|
-
#
|
|
21
|
+
# Reasoning provider settings
|
|
22
22
|
# ---------------------------------------------------------------------------
|
|
23
23
|
reasoning:
|
|
24
|
-
|
|
24
|
+
provider: "anthropic" # anthropic | openai | openrouter
|
|
25
|
+
models:
|
|
26
|
+
anthropic: "claude-sonnet-4-5-20250929"
|
|
27
|
+
openai: "gpt-4.1-mini"
|
|
28
|
+
openrouter: "openrouter/auto"
|
|
25
29
|
max_tokens: 4096
|
|
26
30
|
temperature: 0.3 # low for consistent reasoning
|
|
27
|
-
|
|
31
|
+
openai:
|
|
32
|
+
base_url: "https://api.openai.com/v1"
|
|
33
|
+
timeout_seconds: 120
|
|
34
|
+
openrouter:
|
|
35
|
+
base_url: "https://openrouter.ai/api/v1"
|
|
36
|
+
app_name: "gaia-minds-agent"
|
|
37
|
+
app_url: "https://github.com/Gaia-minds/gaia-minds"
|
|
38
|
+
timeout_seconds: 120
|
|
39
|
+
# API keys are read from env vars, never stored in config:
|
|
40
|
+
# - ANTHROPIC_API_KEY (for anthropic provider)
|
|
41
|
+
# - OPENAI_API_KEY (for openai provider)
|
|
42
|
+
# - OPENROUTER_API_KEY (for openrouter provider)
|
|
28
43
|
|
|
29
44
|
# ---------------------------------------------------------------------------
|
|
30
45
|
# Cycle settings
|