@mndrk/agx 1.4.8 → 1.4.9
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 +137 -43
- package/index.js +1663 -500
- package/package.json +1 -1
- package/skills/agx/SKILL.md +96 -35
- package/todo-api/package-lock.json +841 -0
- package/todo-api/package.json +15 -0
- package/todo-api/server.js +327 -0
package/README.md
CHANGED
|
@@ -1,45 +1,140 @@
|
|
|
1
1
|
# agx
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Task orchestrator for autonomous AI agents. Uses `mem` for persistent memory across sessions.
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
6
|
npm install -g @mndrk/agx
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
+
## Core Concept: Wake-Work-Sleep Cycle
|
|
10
|
+
|
|
11
|
+
Agents have **no memory** between sessions. All continuity comes from `mem`:
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
WAKE → Load state → WORK → Save state → SLEEP → repeat
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
This enables truly autonomous operation across multiple sessions.
|
|
18
|
+
|
|
9
19
|
## Quick Start
|
|
10
20
|
|
|
11
21
|
```bash
|
|
22
|
+
# Create and run a task
|
|
23
|
+
agx new "Build a REST API with auth"
|
|
24
|
+
agx run build-rest-api
|
|
25
|
+
|
|
26
|
+
# Or one command for full autonomous mode
|
|
12
27
|
agx -a -p "Build a REST API with auth"
|
|
13
|
-
# ✓ Created task: build-rest-api
|
|
14
|
-
# ✓ Daemon started
|
|
28
|
+
# ✓ Created task: build-rest-api
|
|
29
|
+
# ✓ Daemon started
|
|
15
30
|
# ✓ Working...
|
|
16
31
|
```
|
|
17
32
|
|
|
18
|
-
|
|
33
|
+
## Task Management
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
agx new "<goal>" # Create task
|
|
37
|
+
agx run [task] # Run task (loads context, wakes agent)
|
|
38
|
+
agx tasks # Interactive TUI - browse all tasks
|
|
39
|
+
agx status # Current task status
|
|
40
|
+
agx context [task] # View task context
|
|
41
|
+
agx pause [task] # Pause task
|
|
42
|
+
agx remove [task] # Delete task (alias: rm, delete)
|
|
43
|
+
agx tail [task] # Live tail logs
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Interactive Tasks Browser
|
|
47
|
+
|
|
48
|
+
`agx tasks` opens a TUI showing all tasks with status, progress, and last run time.
|
|
49
|
+
|
|
50
|
+
Keys: `↑/↓` select, `enter` details, `r` run, `p` pause, `d` done, `x` remove
|
|
51
|
+
|
|
52
|
+
## Steering: Nudge a Task
|
|
53
|
+
|
|
54
|
+
Send guidance to an agent for its next wake cycle:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
agx nudge <task> "focus on auth first" # Add nudge
|
|
58
|
+
agx nudge <task> # View pending nudges
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Nudges are shown to the agent on wake and then cleared.
|
|
62
|
+
|
|
63
|
+
## Memory Commands (via mem)
|
|
64
|
+
|
|
65
|
+
Agents persist state using these commands:
|
|
66
|
+
|
|
67
|
+
### Define Objective
|
|
68
|
+
```bash
|
|
69
|
+
mem goal "<objective>" # Set/update goal
|
|
70
|
+
mem criteria add "<text>" # Add success criterion
|
|
71
|
+
mem constraint add "<rule>" # Add boundary/constraint
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### Track Progress
|
|
75
|
+
```bash
|
|
76
|
+
mem next "<step>" # Set what you're working on
|
|
77
|
+
mem checkpoint "<msg>" # Save progress point
|
|
78
|
+
mem criteria <n> # Mark criterion #n complete
|
|
79
|
+
mem progress # Check progress %
|
|
80
|
+
```
|
|
19
81
|
|
|
20
|
-
|
|
82
|
+
### Learn & Adapt
|
|
83
|
+
```bash
|
|
84
|
+
mem learn "<insight>" # Task-specific learning
|
|
85
|
+
mem learn -g "<insight>" # Global learning (all tasks)
|
|
86
|
+
mem stuck "<reason>" # Mark blocker
|
|
87
|
+
mem stuck clear # Clear blocker
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Build Playbook
|
|
91
|
+
```bash
|
|
92
|
+
mem learnings -g # List global learnings
|
|
93
|
+
mem promote <n> # Promote learning to playbook
|
|
94
|
+
mem playbook # View global playbook
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### Query
|
|
98
|
+
```bash
|
|
99
|
+
mem context # Full context for agent
|
|
100
|
+
mem history # Task progression
|
|
101
|
+
mem query "<search>" # Search all memory
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### Complete
|
|
105
|
+
```bash
|
|
106
|
+
mem done # Mark task complete
|
|
107
|
+
```
|
|
21
108
|
|
|
22
|
-
|
|
23
|
-
1. Creates a task from your prompt
|
|
24
|
-
2. Starts background daemon
|
|
25
|
-
3. Agent works on the task
|
|
26
|
-
4. Wakes every 15 minutes to continue
|
|
27
|
-
5. Stops when agent outputs `[done]` or `[blocked]`
|
|
109
|
+
## Agent Workflow
|
|
28
110
|
|
|
29
|
-
|
|
111
|
+
When an agent wakes, it should:
|
|
30
112
|
|
|
31
|
-
|
|
113
|
+
1. **Orient** - Read state (goal, criteria, progress, next step, nudges)
|
|
114
|
+
2. **Plan** - Define criteria if missing, set intent with `mem next`
|
|
115
|
+
3. **Execute** - Work toward criteria, save learnings
|
|
116
|
+
4. **Checkpoint** - Save progress with `mem checkpoint`
|
|
117
|
+
5. **Adapt** - Handle blockers or ask user for nudge
|
|
118
|
+
|
|
119
|
+
## Daemon Mode
|
|
120
|
+
|
|
121
|
+
Run tasks automatically on a schedule:
|
|
32
122
|
|
|
33
123
|
```bash
|
|
34
|
-
agx
|
|
35
|
-
agx
|
|
36
|
-
agx
|
|
37
|
-
agx daemon logs
|
|
124
|
+
agx daemon start # Start background daemon
|
|
125
|
+
agx daemon stop # Stop daemon
|
|
126
|
+
agx daemon status # Check if running
|
|
127
|
+
agx daemon logs # View logs
|
|
38
128
|
```
|
|
39
129
|
|
|
130
|
+
The daemon:
|
|
131
|
+
- Polls continuously for active tasks
|
|
132
|
+
- Runs up to 5 tasks in parallel
|
|
133
|
+
- Logs to `~/.agx/logs/<taskname>.log`
|
|
134
|
+
|
|
40
135
|
## One-Shot Mode
|
|
41
136
|
|
|
42
|
-
For quick questions without
|
|
137
|
+
For quick questions without task creation:
|
|
43
138
|
|
|
44
139
|
```bash
|
|
45
140
|
agx -p "explain this error"
|
|
@@ -54,37 +149,36 @@ agx claude -p "refactor this function"
|
|
|
54
149
|
| gemini | g | Google Gemini |
|
|
55
150
|
| ollama | o | Local Ollama |
|
|
56
151
|
|
|
57
|
-
##
|
|
58
|
-
|
|
59
|
-
Agents control their state via markers:
|
|
60
|
-
|
|
61
|
-
```
|
|
62
|
-
[checkpoint: Built login page] # Save progress
|
|
63
|
-
[learn: JWT works better here] # Record insight
|
|
64
|
-
[next: Add signup flow] # Set next step
|
|
65
|
-
[done] # Task complete
|
|
66
|
-
[blocked: Need API key] # Can't proceed
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
## Manual Control (Optional)
|
|
70
|
-
|
|
71
|
-
For power users who want fine control:
|
|
152
|
+
## Key Flags
|
|
72
153
|
|
|
73
154
|
```bash
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
155
|
+
-a, --autonomous # Full auto: create task + daemon + work until done
|
|
156
|
+
-p, --prompt # The prompt/goal
|
|
157
|
+
-y, --yolo # Skip confirmations
|
|
158
|
+
--continue <task> # Continue specific task
|
|
78
159
|
```
|
|
79
160
|
|
|
80
|
-
##
|
|
161
|
+
## Key Principles
|
|
81
162
|
|
|
82
|
-
|
|
163
|
+
- **Memory is everything** - Agents forget between sessions. Save state.
|
|
164
|
+
- **Criteria drive completion** - No criteria = no way to know when done.
|
|
165
|
+
- **Checkpoint often** - Sessions can die anytime.
|
|
166
|
+
- **Ask when stuck** - Get a nudge from the user vs. spinning.
|
|
167
|
+
- **Learn & promote** - Build the playbook for future tasks.
|
|
83
168
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
agx
|
|
169
|
+
## Architecture
|
|
170
|
+
|
|
171
|
+
```
|
|
172
|
+
agx (agent execution)
|
|
173
|
+
├── Uses mem CLI for all state operations
|
|
174
|
+
├── Nudges via: mem set/get/pop
|
|
175
|
+
├── Tasks via: mem tasks --json
|
|
176
|
+
└── Context via: mem context --json
|
|
177
|
+
|
|
178
|
+
mem (storage layer)
|
|
179
|
+
├── Git-backed state in ~/.mem
|
|
180
|
+
├── Branch per task
|
|
181
|
+
└── KV primitives (set/get/pop)
|
|
88
182
|
```
|
|
89
183
|
|
|
90
184
|
## License
|