@praveencs/agent 0.7.0 → 0.7.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 CHANGED
@@ -1,67 +1,183 @@
1
1
  # Agent Runtime
2
2
 
3
- An autonomous, goal-oriented AI agent runtime with persistent memory, skill execution, and self-improvement capabilities.
3
+ An autonomous, goal-oriented AI agent runtime with persistent memory, skill execution, and self-improvement capabilities. The agent acts as your digital employee, capable of breaking down high-level objectives into actionable tasks, executing them using a variety of skills, and learning from its experiences.
4
4
 
5
- ## Features
5
+ ---
6
6
 
7
- - **🧠 Goal Decomposition**: Breaks high-level objectives into actionable tasks using LLM reasoning.
8
- - **⚡ Autonomous Execution**: Runs tasks in the background via a daemon process.
9
- - **💾 Persistent Memory**: SQLite-based memory store with FTS5 search for context retention.
10
- - **🛠️ Skill System**: Extensible toolset defined by simple markdown prompts.
11
- - **📊 Reporting**: Generates daily activity reports and executive summaries.
12
- - **❤️ Self-Improvement**: Tracks skill performance and automatically patches broken skills.
7
+ ## 🚀 Features
13
8
 
14
- ## Quick Start
9
+ - **🧠 Goal Decomposition**: Uses LLM reasoning to break complex, high-level objectives into specific, actionable tasks.
10
+ - **⚡ Autonomous Execution**: Runs tasks in the background via a robust daemon process, respecting dependencies and priorities.
11
+ - **💾 Persistent Memory**: SQLite-based semantic memory with FTS5 search. Stores facts, project context, and learned patterns across sessions.
12
+ - **🛠️ Extensible Skill System**: Capabilities are defined by simple markdown prompts (`prompt.md`). Install skills from a hub or create your own.
13
+ - **📊 Reporting**: Generates daily standup reports and executive summaries of activity and progress.
14
+ - **❤️ Self-Improvement**: Tracks skill performance metrics and automatically attempts to patch/repair failing skills using the LLM.
15
+
16
+ ---
17
+
18
+ ## 📦 Installation
15
19
 
16
20
  ```bash
17
- # 1. Install & Configure
18
21
  npm install -g @praveencs/agent
22
+ ```
23
+
24
+ ### Initial Configuration
25
+ After installation, initialize the configuration:
26
+
27
+ ```bash
19
28
  agent config --init
29
+ ```
20
30
 
21
- # 2. Add a Goal
22
- agent goal add "Create a personal blog with Next.js" --priority 1
31
+ This will create a default configuration file (`~/.agent/config.json`) where you can set your LLM provider API keys (OpenAI, Anthropic, Azure, Ollama) and other preferences.
32
+
33
+ ---
34
+
35
+ ## 📖 User Guide
36
+
37
+ ### 1. The Workflow
38
+ The typical workflow follows a **Plan → Decompose → Execute → Report** cycle:
39
+
40
+ 1. **Plan**: Tell the agent what you want to achieve.
41
+ ```bash
42
+ agent goal add "Create a personal blog with Next.js and PostgreSQL" --priority 1
43
+ # Output: Goal #1 created
44
+ ```
45
+
46
+ 2. **Decompose**: Ask the agent to break it down.
47
+ ```bash
48
+ agent goal decompose 1
49
+ # Output: Goal decomposed into 5 tasks (Scaffold, DB Setup, Styling...)
50
+ ```
51
+ *The agent uses its LLM planner to analyze the goal and your available skills to create a task list.*
52
+
53
+ 3. **Execute**: Start the daemon to work on tasks autonomously.
54
+ ```bash
55
+ agent daemon start
56
+ ```
57
+ *The daemon runs in the background, processing tasks, handling retries, and logging activity.*
58
+
59
+ You can check progress at any time:
60
+ ```bash
61
+ agent goal list # See goal status
62
+ agent goal status 1 # See detailed task status for Goal #1
63
+ agent daemon status # Check if the worker is running
64
+ ```
65
+
66
+ 4. **Report**: Get a summary of what happened.
67
+ ```bash
68
+ agent report generate --summary
69
+ ```
70
+ *Generates a notification-style summary of completed work, new learnings, and any blockers.*
71
+
72
+ ### 2. Managing Skills
73
+ Skills are the tools your agent uses (e.g., `git-commit`, `docker-deploy`, `file-write`).
74
+
75
+ - **List installed skills**:
76
+ ```bash
77
+ agent skills list
78
+ ```
79
+
80
+ - **Find new skills**:
81
+ ```bash
82
+ agent skills search "database"
83
+ agent skills browse
84
+ ```
85
+
86
+ - **Install a skill**:
87
+ ```bash
88
+ agent skills install <skill-name>
89
+ ```
90
+
91
+ - **Create a custom skill**:
92
+ ```bash
93
+ agent skills create my-new-skill
94
+ ```
95
+ *This creates a template at `.agent/skills/my-new-skill/prompt.md`. Edit this file to define what the skill does using natural language instructions for the LLM.*
96
+
97
+ - **Self-Repair (Doctor)**:
98
+ If a skill is failing, the agent can diagnose and fix it.
99
+ ```bash
100
+ agent skills stats # View success rates
101
+ agent skills doctor my-skill # Analyze error logs
102
+ agent skills fix my-skill # Attempt AI auto-repair
103
+ ```
104
+
105
+ ### 3. Memory & Context
106
+ The agent automatically saves important information (like "Project uses Tailwind CSS") to its memory. You can search or manage this manually.
107
+
108
+ - **Search memory**:
109
+ ```bash
110
+ agent memory search "database credentials"
111
+ ```
112
+ - **Add a fact**:
113
+ ```bash
114
+ agent memory add "The staging server IP is 10.0.0.5" --category fact
115
+ ```
116
+
117
+ ---
118
+
119
+ ## 🤖 CLI Command Reference
120
+
121
+ ### General
122
+ | Command | Description |
123
+ |Str |---|
124
+ | `agent run "<instruction>"` | Run a one-off instruction immediately |
125
+ | `agent config --init` | Initialize configuration |
126
+ | `agent doctor` | Check system health (dependencies, config) |
127
+
128
+ ### Goal Management
129
+ | Command | Description |
130
+ |---|---|
131
+ | `agent goal add "<title>"` | Create a new high-level goal |
132
+ | `agent goal list` | List all active goals |
133
+ | `agent goal decompose <id>` | AI-power breakdown of a goal into tasks |
134
+ | `agent goal status <id>` | View tasks and progress for a goal |
135
+ | `agent goal task <id> "<title>"` | Manually add a task to a goal |
136
+ | `agent goal run` | Manually run pending tasks (if daemon is off) |
137
+
138
+ ### Daemon (Background Service)
139
+ | Command | Description |
140
+ |---|---|
141
+ | `agent daemon start` | Start the background worker |
142
+ | `agent daemon stop` | Stop the background worker |
143
+ | `agent daemon status` | View daemon health and uptime |
144
+ | `agent daemon logs` | View recent execution logs |
23
145
 
24
- # 3. Decompose & Plan
25
- agent goal decompose 1
146
+ ### Skills
147
+ | Command | Description |
148
+ |---|---|
149
+ | `agent skills list` | List installed skills |
150
+ | `agent skills search <query>` | Search the skill hub |
151
+ | `agent skills install <name>` | Install a skill from hub or path |
152
+ | `agent skills stats` | View performance metrics |
153
+ | `agent skills doctor <name>` | Diagnose a failing skill |
154
+ | `agent skills fix <name>` | Auto-fix a broken skill |
26
155
 
27
- # 4. Start Autonomous Mode
28
- agent daemon start
156
+ ### Reports
157
+ | Command | Description |
158
+ |---|---|
159
+ | `agent report generate` | Generate today's activity report |
160
+ | `agent report generate --summary` | Generate an AI executive summary |
29
161
 
30
- # View status
31
- agent daemon status
32
- agent goal list
33
- ```
162
+ ---
34
163
 
35
- ## Core Concepts
164
+ ## 🛠️ Architecture
36
165
 
37
- ### Goals & Tasks
38
- Goals are high-level objectives. The agent breaks them down into atomic **Tasks**.
39
- Each task can be executed by a specific **Skill** or by general LLM reasoning.
166
+ The runtime consists of several modular components:
40
167
 
41
- ### Skills
42
- Skills are the agent's tools. They are defined in `prompt.md` files.
43
- - `agent skills list` - View installed skills
44
- - `agent skills create <name>` - Create a new skill
45
- - `agent skills doctor <name>` - Diagnose issues
46
- - `agent skills fix <name>` - Auto-repair a broken skill
168
+ 1. **Orchestrator (CLI)**: Entry point for user interaction.
169
+ 2. **Goal Manager**: State machine for tracking objectives (`Active`, `Completed`, `Failed`).
170
+ 3. **Planner (Decomposer)**: LLM-based engine that breaks goals into dependency-aware tasks.
171
+ 4. **Executor**: The engine that runs tasks. It matches tasks to skills and executes them securely.
172
+ 5. **Memory Store**: Semantic storage using SQLite vector/FTS.
173
+ 6. **Auto-Fixer Loop**: A meta-level process that monitors execution metrics and patches skills that drift or break.
47
174
 
48
- ### Memory
49
- The agent remembers what it learns.
50
- - `agent memory search "context"` - Search the knowledge base
51
- - `agent report generate` - View daily activity
175
+ ---
52
176
 
53
- ## Architecture
177
+ ## 🤝 Contributing
54
178
 
55
- - **`src/daemon`**: Background service manager.
56
- - **`src/goals`**: Planning and execution engine.
57
- - **`src/memory`**: SQLite storage layer.
58
- - **`src/skills`**: Skill loader and auto-fixer.
59
- - **`src/llm`**: Multi-provider LLM router.
179
+ We welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to set up your development environment.
60
180
 
61
- ## Development
181
+ ## License
62
182
 
63
- ```bash
64
- npm install
65
- npm run build
66
- npm test
67
- ```
183
+ MIT
@@ -18,7 +18,7 @@ export function createCLI() {
18
18
  program
19
19
  .name('agent')
20
20
  .description('Agent Runtime — autonomous, goal-oriented AI agent with skills, plans, memory, and permissioned tools')
21
- .version('0.7.0')
21
+ .version('0.7.2')
22
22
  .option('--verbose', 'Enable verbose output')
23
23
  .option('--no-color', 'Disable colored output')
24
24
  .option('--config <path>', 'Path to config file');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@praveencs/agent",
3
- "version": "0.7.0",
3
+ "version": "0.7.2",
4
4
  "files": [
5
5
  "dist",
6
6
  "bin",