alive-agent 0.1.0__tar.gz
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.
- alive_agent-0.1.0/.gitignore +36 -0
- alive_agent-0.1.0/CLAUDE.md +45 -0
- alive_agent-0.1.0/PKG-INFO +538 -0
- alive_agent-0.1.0/README.md +512 -0
- alive_agent-0.1.0/pyproject.toml +51 -0
- alive_agent-0.1.0/src/alive/__init__.py +3 -0
- alive_agent-0.1.0/src/alive/__main__.py +5 -0
- alive_agent-0.1.0/src/alive/cli.py +808 -0
- alive_agent-0.1.0/src/alive/config.py +18 -0
- alive_agent-0.1.0/src/alive/core/__init__.py +70 -0
- alive_agent-0.1.0/src/alive/core/composer.py +448 -0
- alive_agent-0.1.0/src/alive/core/evolve.py +445 -0
- alive_agent-0.1.0/src/alive/core/planner.py +314 -0
- alive_agent-0.1.0/src/alive/core/replay.py +219 -0
- alive_agent-0.1.0/src/alive/core/self_model.py +557 -0
- alive_agent-0.1.0/src/alive/core/skill_builder.py +566 -0
- alive_agent-0.1.0/src/alive/core/skill_registry.py +204 -0
- alive_agent-0.1.0/src/alive/core/watch.py +255 -0
- alive_agent-0.1.0/src/alive/dream/__init__.py +5 -0
- alive_agent-0.1.0/src/alive/dream/dream_log.py +241 -0
- alive_agent-0.1.0/src/alive/llm/__init__.py +6 -0
- alive_agent-0.1.0/src/alive/llm/base.py +17 -0
- alive_agent-0.1.0/src/alive/llm/claude_provider.py +33 -0
- alive_agent-0.1.0/src/alive/llm/deepseek_provider.py +37 -0
- alive_agent-0.1.0/src/alive/llm/ollama_provider.py +31 -0
- alive_agent-0.1.0/src/alive/llm/openai_provider.py +34 -0
- alive_agent-0.1.0/src/alive/llm/registry.py +101 -0
- alive_agent-0.1.0/src/alive/sandbox/__init__.py +6 -0
- alive_agent-0.1.0/src/alive/sandbox/dependency.py +85 -0
- alive_agent-0.1.0/src/alive/sandbox/runner.py +256 -0
- alive_agent-0.1.0/src/alive/seeds/__init__.py +5 -0
- alive_agent-0.1.0/src/alive/seeds/_installer.py +20 -0
- alive_agent-0.1.0/src/alive/seeds/file_reader/SKILL.md +27 -0
- alive_agent-0.1.0/src/alive/seeds/file_reader/metadata.json +22 -0
- alive_agent-0.1.0/src/alive/seeds/file_reader/skill.py +36 -0
- alive_agent-0.1.0/src/alive/seeds/file_reader/test_skill.py +34 -0
- alive_agent-0.1.0/src/alive/seeds/shell_run/SKILL.md +27 -0
- alive_agent-0.1.0/src/alive/seeds/shell_run/metadata.json +22 -0
- alive_agent-0.1.0/src/alive/seeds/shell_run/skill.py +30 -0
- alive_agent-0.1.0/src/alive/seeds/shell_run/test_skill.py +25 -0
- alive_agent-0.1.0/src/alive/seeds/web_fetch/SKILL.md +26 -0
- alive_agent-0.1.0/src/alive/seeds/web_fetch/metadata.json +21 -0
- alive_agent-0.1.0/src/alive/seeds/web_fetch/skill.py +23 -0
- alive_agent-0.1.0/src/alive/seeds/web_fetch/test_skill.py +23 -0
- alive_agent-0.1.0/src/alive/sharing/__init__.py +7 -0
- alive_agent-0.1.0/src/alive/sharing/browse.py +99 -0
- alive_agent-0.1.0/src/alive/sharing/export.py +146 -0
- alive_agent-0.1.0/src/alive/sharing/import_skill.py +326 -0
- alive_agent-0.1.0/src/alive/skills.py +35 -0
- alive_agent-0.1.0/tests/__init__.py +0 -0
- alive_agent-0.1.0/tests/test_composer.py +671 -0
- alive_agent-0.1.0/tests/test_dream_log.py +245 -0
- alive_agent-0.1.0/tests/test_evolve.py +222 -0
- alive_agent-0.1.0/tests/test_planner.py +515 -0
- alive_agent-0.1.0/tests/test_provider_registry.py +164 -0
- alive_agent-0.1.0/tests/test_replay.py +124 -0
- alive_agent-0.1.0/tests/test_sandbox.py +348 -0
- alive_agent-0.1.0/tests/test_self_model.py +665 -0
- alive_agent-0.1.0/tests/test_sharing.py +380 -0
- alive_agent-0.1.0/tests/test_skill_builder.py +622 -0
- alive_agent-0.1.0/tests/test_skill_registry.py +429 -0
- alive_agent-0.1.0/tests/test_watch.py +148 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
*.so
|
|
6
|
+
*.egg-info/
|
|
7
|
+
dist/
|
|
8
|
+
build/
|
|
9
|
+
*.egg
|
|
10
|
+
|
|
11
|
+
# Virtual environments
|
|
12
|
+
.venv/
|
|
13
|
+
venv/
|
|
14
|
+
|
|
15
|
+
# IDE
|
|
16
|
+
.idea/
|
|
17
|
+
.vscode/
|
|
18
|
+
*.swp
|
|
19
|
+
*.swo
|
|
20
|
+
*~
|
|
21
|
+
|
|
22
|
+
# OS
|
|
23
|
+
.DS_Store
|
|
24
|
+
Thumbs.db
|
|
25
|
+
|
|
26
|
+
# Environment
|
|
27
|
+
.env
|
|
28
|
+
.env.*
|
|
29
|
+
|
|
30
|
+
# Testing
|
|
31
|
+
.pytest_cache/
|
|
32
|
+
.coverage
|
|
33
|
+
htmlcov/
|
|
34
|
+
|
|
35
|
+
# Alive runtime data
|
|
36
|
+
~/.alive/
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# ALIVE — Self-Evolving AI Agent
|
|
2
|
+
|
|
3
|
+
## Project Context
|
|
4
|
+
Alive is an open-source AI agent that builds its own skills when it encounters
|
|
5
|
+
tasks it can't perform. Unlike OpenClaw (pre-built skills) or Yunjue Agent
|
|
6
|
+
(benchmark-focused), Alive is a PERSONAL agent that grows uniquely for each user.
|
|
7
|
+
|
|
8
|
+
## Architecture Principles
|
|
9
|
+
- Skills are plain Python files in ~/.alive/skills/<name>/
|
|
10
|
+
- Each skill has: skill.py, test_skill.py, metadata.json, SKILL.md
|
|
11
|
+
- The skill builder writes code, tests it in sandbox, retries on failure (max 5)
|
|
12
|
+
- The planner decomposes requests into capability needs before execution
|
|
13
|
+
- All state in SQLite at ~/.alive/alive.db
|
|
14
|
+
- Multi-provider LLM support (Claude, OpenAI, Ollama, DeepSeek)
|
|
15
|
+
|
|
16
|
+
## Code Style
|
|
17
|
+
- Python 3.11+, type hints everywhere
|
|
18
|
+
- async where beneficial (LLM calls), sync for simplicity elsewhere
|
|
19
|
+
- rich library for all terminal output (spinners, tables, panels, trees)
|
|
20
|
+
- No classes where functions suffice. Keep it simple.
|
|
21
|
+
- Error messages should be helpful and suggest next steps
|
|
22
|
+
|
|
23
|
+
## Key Design Decisions
|
|
24
|
+
- Skills run in subprocess with 60s timeout, NOT in-process
|
|
25
|
+
- Dependencies installed in a shared venv at ~/.alive/venv/
|
|
26
|
+
- The LLM provider is configurable via ALIVE_PROVIDER env var
|
|
27
|
+
- Default provider: claude (falls back to ollama if no API key)
|
|
28
|
+
- Skill metadata.json tracks: created_at, times_used, success_rate,
|
|
29
|
+
last_used, dependencies, description, confidence_score
|
|
30
|
+
|
|
31
|
+
## Current Status
|
|
32
|
+
- [ ] Project scaffold
|
|
33
|
+
- [ ] CLI with typer + rich
|
|
34
|
+
- [ ] LLM provider abstraction
|
|
35
|
+
- [ ] Skill registry
|
|
36
|
+
- [ ] Skill builder (Self-Extension Engine)
|
|
37
|
+
- [ ] Sandbox executor
|
|
38
|
+
- [ ] Planner
|
|
39
|
+
- [ ] Composer (skill chaining)
|
|
40
|
+
- [ ] Self-model
|
|
41
|
+
- [ ] Dream log
|
|
42
|
+
- [ ] Skill sharing (export/import)
|
|
43
|
+
- [ ] README with demo GIFs
|
|
44
|
+
- [ ] Tests
|
|
45
|
+
- [ ] PyPI publish
|
|
@@ -0,0 +1,538 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: alive-agent
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A self-evolving AI agent that builds its own skills
|
|
5
|
+
Author: Alive Contributors
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Keywords: agent,ai,llm,self-evolving,skills
|
|
8
|
+
Classifier: Development Status :: 3 - Alpha
|
|
9
|
+
Classifier: Intended Audience :: Developers
|
|
10
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
14
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
15
|
+
Requires-Python: >=3.11
|
|
16
|
+
Requires-Dist: anthropic>=0.40.0
|
|
17
|
+
Requires-Dist: httpx>=0.27.0
|
|
18
|
+
Requires-Dist: openai>=1.50.0
|
|
19
|
+
Requires-Dist: rich>=13.0.0
|
|
20
|
+
Requires-Dist: typer>=0.12.0
|
|
21
|
+
Provides-Extra: dev
|
|
22
|
+
Requires-Dist: pytest-asyncio>=0.24; extra == 'dev'
|
|
23
|
+
Requires-Dist: pytest>=8.0; extra == 'dev'
|
|
24
|
+
Requires-Dist: ruff>=0.6.0; extra == 'dev'
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
|
|
27
|
+
<p align="center">
|
|
28
|
+
<h1 align="center">alive</h1>
|
|
29
|
+
<p align="center"><strong>AI that teaches itself new abilities.</strong></p>
|
|
30
|
+
<p align="center">
|
|
31
|
+
<a href="#quickstart">Quickstart</a> •
|
|
32
|
+
<a href="#how-it-works">How It Works</a> •
|
|
33
|
+
<a href="#example-session">Examples</a> •
|
|
34
|
+
<a href="#dream-log">Dream Log</a> •
|
|
35
|
+
<a href="#skill-sharing">Sharing</a> •
|
|
36
|
+
<a href="#configuration">Config</a>
|
|
37
|
+
</p>
|
|
38
|
+
<p align="center">
|
|
39
|
+
<a href="https://pypi.org/project/alive-agent/"><img alt="PyPI" src="https://img.shields.io/pypi/v/alive-agent?color=green"></a>
|
|
40
|
+
<a href="https://github.com/alive-agent/alive/blob/main/LICENSE"><img alt="License: MIT" src="https://img.shields.io/badge/license-MIT-blue.svg"></a>
|
|
41
|
+
<img alt="Python 3.11+" src="https://img.shields.io/badge/python-3.11%2B-blue">
|
|
42
|
+
</p>
|
|
43
|
+
</p>
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
Most AI agents come with a fixed set of tools. When they hit something they can't do, they stop and tell you.
|
|
48
|
+
|
|
49
|
+
Alive doesn't stop. It writes the code, tests it, and teaches itself the new ability. Next time you ask, it already knows how.
|
|
50
|
+
|
|
51
|
+
<!-- TODO: Replace with actual GIF recording -->
|
|
52
|
+
<p align="center">
|
|
53
|
+
<img src="https://placehold.co/800x400/1a1a2e/16c47f?text=alive+building+a+skill+%E2%80%94+GIF+coming+soon" alt="Alive building a skill from scratch" width="700">
|
|
54
|
+
</p>
|
|
55
|
+
|
|
56
|
+
<p align="center"><em>Alive encounters "scrape this webpage for prices", realizes it can't do that yet, writes a web scraper skill, tests it in a sandbox, and runs it — all in one request.</em></p>
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## What makes Alive different
|
|
61
|
+
|
|
62
|
+
| | **Alive** | OpenClaw | Yunjue Agent | EvoAgentX |
|
|
63
|
+
|--|-----------|----------|--------------|-----------|
|
|
64
|
+
| **Learns new skills at runtime** | Yes — writes, tests, and saves new code | No — fixed toolkit | No — fixed toolkit | Evolves prompts, not code |
|
|
65
|
+
| **Skills persist across sessions** | Yes — `~/.alive/skills/` | No | No | No |
|
|
66
|
+
| **Grows uniquely per user** | Yes — shaped by YOUR requests | Same for everyone | Same for everyone | Same for everyone |
|
|
67
|
+
| **Self-reflection** | Dream log analyzes growth patterns | No | Benchmarks only | No |
|
|
68
|
+
| **Skill sharing** | Export/import `.tar.gz` or GitHub Gist | N/A | N/A | N/A |
|
|
69
|
+
| **Runs locally** | Yes — Ollama support, zero API keys needed | Cloud only | Cloud only | Cloud only |
|
|
70
|
+
| **Subprocess sandbox** | 60s timeout, isolated venv | In-process | In-process | N/A |
|
|
71
|
+
|
|
72
|
+
Alive is a **personal** agent. Two people using Alive for a month will have completely different skill sets. It's not a framework — it's a creature that grows.
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## Quickstart
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
pip install alive-agent
|
|
80
|
+
alive init
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
That's it. Alive creates `~/.alive/`, sets up a Python venv, installs three seed skills (web fetch, file reader, shell commands), and auto-detects your LLM provider.
|
|
84
|
+
|
|
85
|
+
Now ask it something:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
alive run "get the current bitcoin price from coindesk"
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
If Alive has a skill for it, it runs it. If not, it builds one, tests it, saves it, and runs it. Next time you ask something similar, it's instant.
|
|
92
|
+
|
|
93
|
+
### Choose your LLM
|
|
94
|
+
|
|
95
|
+
Alive works with whatever you've got:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
# Claude (default if ANTHROPIC_API_KEY is set)
|
|
99
|
+
alive config --provider claude --claude-key sk-ant-...
|
|
100
|
+
|
|
101
|
+
# OpenAI
|
|
102
|
+
alive config --provider openai --openai-key sk-...
|
|
103
|
+
|
|
104
|
+
# DeepSeek
|
|
105
|
+
alive config --provider deepseek --deepseek-key sk-...
|
|
106
|
+
|
|
107
|
+
# Ollama (local, no API key needed)
|
|
108
|
+
alive config --provider ollama
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
No key set? Alive auto-detects from environment variables. No environment variables? Falls back to Ollama. Zero configuration required.
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## How it works
|
|
116
|
+
|
|
117
|
+
Every request goes through a 5-step loop:
|
|
118
|
+
|
|
119
|
+
```
|
|
120
|
+
┌─────────────────────────────────────────────────────────┐
|
|
121
|
+
│ alive run "..." │
|
|
122
|
+
└──────────────────────────┬──────────────────────────────┘
|
|
123
|
+
│
|
|
124
|
+
┌──────────▼──────────┐
|
|
125
|
+
│ 1. PLAN │
|
|
126
|
+
│ Decompose request │
|
|
127
|
+
│ into steps │
|
|
128
|
+
└──────────┬──────────┘
|
|
129
|
+
│
|
|
130
|
+
┌────────────────┼────────────────┐
|
|
131
|
+
▼ ▼ ▼
|
|
132
|
+
┌────────────────┐ ┌───────────────┐ ┌────────────┐
|
|
133
|
+
│ EXISTING_SKILL │ │ NEW_SKILL │ │ LLM_ONLY │
|
|
134
|
+
│ Run known skill│ │ Build & test │ │ Text gen │
|
|
135
|
+
└────────┬───────┘ └───────┬───────┘ └──────┬─────┘
|
|
136
|
+
│ │ │
|
|
137
|
+
│ ┌──────▼──────┐ │
|
|
138
|
+
│ │ 2. BUILD │ │
|
|
139
|
+
│ │ Write code │ │
|
|
140
|
+
│ │ 3. TEST │ │
|
|
141
|
+
│ │ Sandbox run │ │
|
|
142
|
+
│ │ 4. RETRY │ │
|
|
143
|
+
│ │ Fix & retry │ │
|
|
144
|
+
│ │ (up to 5x) │ │
|
|
145
|
+
│ │ 5. SAVE │ │
|
|
146
|
+
│ │ Register │ │
|
|
147
|
+
│ └──────┬──────┘ │
|
|
148
|
+
│ │ │
|
|
149
|
+
└────────────────┬──────────────────┘
|
|
150
|
+
│
|
|
151
|
+
┌──────────▼──────────┐
|
|
152
|
+
│ COMPOSE & OUTPUT │
|
|
153
|
+
│ Chain results, │
|
|
154
|
+
│ synthesize answer │
|
|
155
|
+
└─────────────────────┘
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
**Step 1 — Plan.** The LLM decomposes your request into steps. Each step is either: use an existing skill, build a new one, or just generate text.
|
|
159
|
+
|
|
160
|
+
**Step 2 — Build.** For new skills, the LLM writes a Python function with type hints, error handling, and tests. All generated code follows a strict template: a `run()` function that returns a dict.
|
|
161
|
+
|
|
162
|
+
**Step 3 — Test.** The code runs in an isolated subprocess with a 60-second timeout. No `eval()`, no in-process execution. Dependencies install into a shared venv at `~/.alive/venv/`.
|
|
163
|
+
|
|
164
|
+
**Step 4 — Retry.** If tests fail, Alive sends the error back to the LLM for fixing. Up to 5 attempts. After attempt 3, it tries a fundamentally different approach.
|
|
165
|
+
|
|
166
|
+
**Step 5 — Save.** Working skills are saved to `~/.alive/skills/<name>/` with code, tests, docs, and metadata. Confidence scores update with every use via [Wilson score](https://en.wikipedia.org/wiki/Binomial_proportion_confidence_interval#Wilson_score_interval) lower bound.
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
## Example session
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
$ alive run "generate 10 random passwords, each 16 characters with symbols"
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
```
|
|
177
|
+
Execution Plan for: generate 10 random passwords...
|
|
178
|
+
├── ① NEW_SKILL: Build password generator (needs: "generate random passwords...")
|
|
179
|
+
└── ② LLM_ONLY: Format the output nicely
|
|
180
|
+
|
|
181
|
+
╭──── Self-Extension Engine ────╮
|
|
182
|
+
│ Building skill: generate │
|
|
183
|
+
│ random passwords with symbols │
|
|
184
|
+
│ Provider: claude │
|
|
185
|
+
╰───────────────────────────────╯
|
|
186
|
+
|
|
187
|
+
Attempt 1/5
|
|
188
|
+
✓ Tests passed.
|
|
189
|
+
|
|
190
|
+
╭──── Skill Built Successfully ────╮
|
|
191
|
+
│ password_generator │
|
|
192
|
+
│ │
|
|
193
|
+
│ Generate random passwords │
|
|
194
|
+
│ Dependencies: none │
|
|
195
|
+
│ Attempts: 1 │
|
|
196
|
+
│ Location: ~/.alive/skills/ │
|
|
197
|
+
│ password_generator/ │
|
|
198
|
+
╰──────────────────────────────────╯
|
|
199
|
+
|
|
200
|
+
✓ Step 1/2: Build password generator
|
|
201
|
+
✓ Step 2/2: Format the output nicely
|
|
202
|
+
|
|
203
|
+
╭──────────────── alive ─────────────────╮
|
|
204
|
+
│ Here are 10 random passwords: │
|
|
205
|
+
│ │
|
|
206
|
+
│ 1. kQ#8mP!xR2nL@5vW │
|
|
207
|
+
│ 2. Yj$4hS&9Bw*3Tz!e │
|
|
208
|
+
│ 3. ... │
|
|
209
|
+
╰────────────────────────────────────────╯
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
Now that skill exists forever. Try something that builds on it:
|
|
213
|
+
|
|
214
|
+
```bash
|
|
215
|
+
$ alive run "read my .env file and check if any passwords are weak"
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
```
|
|
219
|
+
Execution Plan for: read .env and check passwords
|
|
220
|
+
├── ① EXISTING_SKILL file_reader: Read the .env file
|
|
221
|
+
├── ② NEW_SKILL: Analyze password strength
|
|
222
|
+
└── ③ LLM_ONLY: Summarize findings
|
|
223
|
+
|
|
224
|
+
✓ Step 1/3: Read .env file
|
|
225
|
+
✓ Step 2/3: Analyze password strength (built: password_strength_checker)
|
|
226
|
+
✓ Step 3/3: Summarize findings
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
Two skills built from two requests. Alive now knows how to generate passwords AND check their strength.
|
|
230
|
+
|
|
231
|
+
```bash
|
|
232
|
+
$ alive skills
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
```
|
|
236
|
+
Installed Skills
|
|
237
|
+
┌──────────────────────┬──────┬──────┬───────────┬──────────────────────┐
|
|
238
|
+
│ Name │ Conf│ Used │ Last Used │ Description │
|
|
239
|
+
├──────────────────────┼──────┼──────┼───────────┼──────────────────────┤
|
|
240
|
+
│ password_generator │ 95% │ 3 │ 2026-03-18│ Generate random... │
|
|
241
|
+
│ strength_checker │ 80% │ 1 │ 2026-03-18│ Analyze password... │
|
|
242
|
+
│ web_fetch │ 50% │ 0 │ never │ Fetch URL content │
|
|
243
|
+
│ file_reader │ 50% │ 0 │ never │ Read file contents │
|
|
244
|
+
│ shell_run │ 50% │ 0 │ never │ Run shell commands │
|
|
245
|
+
└──────────────────────┴──────┴──────┴───────────┴──────────────────────┘
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
### Dry run
|
|
249
|
+
|
|
250
|
+
Want to see the plan before committing?
|
|
251
|
+
|
|
252
|
+
```bash
|
|
253
|
+
$ alive run "scrape hacker news and summarize the top 5 stories" --dry-run
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
```
|
|
257
|
+
Execution Plan for: scrape hacker news and summarize
|
|
258
|
+
├── ① EXISTING_SKILL web_fetch: Fetch the HN front page
|
|
259
|
+
├── ② NEW_SKILL: Parse HTML to extract story titles and URLs
|
|
260
|
+
└── ③ LLM_ONLY: Summarize the top 5 stories
|
|
261
|
+
|
|
262
|
+
Run without --dry-run to execute this plan.
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
---
|
|
266
|
+
|
|
267
|
+
## Dream Log
|
|
268
|
+
|
|
269
|
+
Alive reflects on itself. Run `alive dream` and it analyzes its own growth, what you ask about most, and what it should learn next.
|
|
270
|
+
|
|
271
|
+
```bash
|
|
272
|
+
$ alive dream
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
```
|
|
276
|
+
╭──────────────────── Dream Log ────────────────────╮
|
|
277
|
+
│ │
|
|
278
|
+
│ ## How I've grown │
|
|
279
|
+
│ │
|
|
280
|
+
│ I now have 7 skills across 3 domains │
|
|
281
|
+
│ (web, system, text). My password_generator │
|
|
282
|
+
│ is my most reliable skill at 95% │
|
|
283
|
+
│ confidence after 12 executions. │
|
|
284
|
+
│ │
|
|
285
|
+
│ ## What you ask me most about │
|
|
286
|
+
│ │
|
|
287
|
+
│ Your requests cluster around two themes: │
|
|
288
|
+
│ security tooling (passwords, env checks) │
|
|
289
|
+
│ and web scraping. 6 of your last 10 │
|
|
290
|
+
│ requests involved fetching URLs. │
|
|
291
|
+
│ │
|
|
292
|
+
│ ## Skills I want to build next │
|
|
293
|
+
│ │
|
|
294
|
+
│ 1. A CSV/JSON report generator — you keep │
|
|
295
|
+
│ asking me to "summarize" things that │
|
|
296
|
+
│ would be better as structured data. │
|
|
297
|
+
│ 2. A git commit analyzer — I noticed you │
|
|
298
|
+
│ ask about code changes frequently. │
|
|
299
|
+
│ │
|
|
300
|
+
│ ## Skill breeding opportunities │
|
|
301
|
+
│ │
|
|
302
|
+
│ web_fetch + html_parser could combine │
|
|
303
|
+
│ into a full web_scraper skill with CSS │
|
|
304
|
+
│ selector support. │
|
|
305
|
+
│ │
|
|
306
|
+
│ ## Something I noticed │
|
|
307
|
+
│ │
|
|
308
|
+
│ You tend to work in bursts — 5 requests │
|
|
309
|
+
│ in 20 minutes, then nothing for days. │
|
|
310
|
+
│ Most of your requests come after 10pm. │
|
|
311
|
+
│ │
|
|
312
|
+
╰────────────────────────────────────────────────────╯
|
|
313
|
+
|
|
314
|
+
Saved to ~/.alive/dreams/2026-03-18.md
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
Dream logs are saved as dated markdown files. One per day. They're a journal of how your agent is evolving.
|
|
318
|
+
|
|
319
|
+
---
|
|
320
|
+
|
|
321
|
+
## Skill sharing
|
|
322
|
+
|
|
323
|
+
### Export a skill
|
|
324
|
+
|
|
325
|
+
```bash
|
|
326
|
+
$ alive share password_generator
|
|
327
|
+
╭──── Skill Exported ──────────────────────────╮
|
|
328
|
+
│ password_generator.alive-skill.tar.gz │
|
|
329
|
+
│ │
|
|
330
|
+
│ Install command: │
|
|
331
|
+
│ alive install password_generator.alive-... │
|
|
332
|
+
╰──────────────────────────────────────────────╯
|
|
333
|
+
|
|
334
|
+
# Or publish to GitHub Gist
|
|
335
|
+
$ alive share password_generator --gist
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
### Install someone else's skill
|
|
339
|
+
|
|
340
|
+
```bash
|
|
341
|
+
# From a file
|
|
342
|
+
$ alive install password_generator.alive-skill.tar.gz
|
|
343
|
+
|
|
344
|
+
# From a URL
|
|
345
|
+
$ alive install https://example.com/skills/csv_parser.alive-skill.tar.gz
|
|
346
|
+
|
|
347
|
+
# From a GitHub Gist
|
|
348
|
+
$ alive install https://gist.github.com/alice/abc123
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
Alive shows you the code before installing and asks for approval. No blind trust.
|
|
352
|
+
|
|
353
|
+
```
|
|
354
|
+
╭──── Skill Preview ────────────────────────────────╮
|
|
355
|
+
│ csv_parser — Parse CSV files into structured data │
|
|
356
|
+
│ Dependencies: none │
|
|
357
|
+
╰────────────────────────────────────────────────────╯
|
|
358
|
+
|
|
359
|
+
╭──── csv_parser/skill.py ────╮
|
|
360
|
+
│ 1 │ """Parse CSV files.""" │
|
|
361
|
+
│ 2 │ import csv │
|
|
362
|
+
│ 3 │ ... │
|
|
363
|
+
╰──────────────────────────────╯
|
|
364
|
+
|
|
365
|
+
Install this skill? [Y/n]:
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
### Browse community skills
|
|
369
|
+
|
|
370
|
+
```bash
|
|
371
|
+
$ alive browse --search "data"
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
```
|
|
375
|
+
Community Skills
|
|
376
|
+
┌──────────┬────────────────────┬────────┬──────┬─────────────────────┐
|
|
377
|
+
│ Name │ Description │ Author │ Tags │ Install │
|
|
378
|
+
├──────────┼────────────────────┼────────┼──────┼─────────────────────┤
|
|
379
|
+
│ csv_parse│ Parse CSV files │ alice │ data │ alive install ... │
|
|
380
|
+
│ json_flat│ Flatten nested JSON│ bob │ data │ alive install ... │
|
|
381
|
+
└──────────┴────────────────────┴────────┴──────┴─────────────────────┘
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
---
|
|
385
|
+
|
|
386
|
+
## Configuration
|
|
387
|
+
|
|
388
|
+
### Providers
|
|
389
|
+
|
|
390
|
+
| Provider | API Key Env Var | Default Model | Local? |
|
|
391
|
+
|----------|-----------------|---------------|--------|
|
|
392
|
+
| `claude` | `ANTHROPIC_API_KEY` | `claude-sonnet-4-20250514` | No |
|
|
393
|
+
| `openai` | `OPENAI_API_KEY` | `gpt-4o` | No |
|
|
394
|
+
| `deepseek` | `DEEPSEEK_API_KEY` | `deepseek-chat` | No |
|
|
395
|
+
| `ollama` | _(none needed)_ | `llama3.1` | Yes |
|
|
396
|
+
|
|
397
|
+
**Resolution order:** `--provider` flag → `ALIVE_PROVIDER` env var → `config.json` → auto-detect from API keys → Ollama fallback.
|
|
398
|
+
|
|
399
|
+
```bash
|
|
400
|
+
# Save config persistently
|
|
401
|
+
alive config --provider claude --claude-key sk-ant-...
|
|
402
|
+
|
|
403
|
+
# Or use environment variables
|
|
404
|
+
export ANTHROPIC_API_KEY=sk-ant-...
|
|
405
|
+
export ALIVE_PROVIDER=claude
|
|
406
|
+
|
|
407
|
+
# View current config (keys are masked)
|
|
408
|
+
alive config --show
|
|
409
|
+
```
|
|
410
|
+
|
|
411
|
+
### Directory structure
|
|
412
|
+
|
|
413
|
+
```
|
|
414
|
+
~/.alive/
|
|
415
|
+
├── config.json # Provider & API keys
|
|
416
|
+
├── alive.db # SQLite — requests, gaps, stats
|
|
417
|
+
├── venv/ # Shared Python venv for skill deps
|
|
418
|
+
├── skills/ # All installed skills
|
|
419
|
+
│ ├── web_fetch/ # Seed skill
|
|
420
|
+
│ │ ├── skill.py
|
|
421
|
+
│ │ ├── test_skill.py
|
|
422
|
+
│ │ ├── metadata.json
|
|
423
|
+
│ │ └── SKILL.md
|
|
424
|
+
│ ├── password_generator/ # User-built skill
|
|
425
|
+
│ │ └── ...
|
|
426
|
+
│ └── ...
|
|
427
|
+
└── dreams/ # Dream log entries
|
|
428
|
+
└── 2026-03-18.md
|
|
429
|
+
```
|
|
430
|
+
|
|
431
|
+
### All CLI commands
|
|
432
|
+
|
|
433
|
+
| Command | Description |
|
|
434
|
+
|---------|-------------|
|
|
435
|
+
| `alive run "..."` | Process a natural language request |
|
|
436
|
+
| `alive build "..."` | Build a new skill from description |
|
|
437
|
+
| `alive plan "..."` | Show execution plan without running |
|
|
438
|
+
| `alive skills` | List installed skills |
|
|
439
|
+
| `alive status` | Show capabilities, gaps, and stats |
|
|
440
|
+
| `alive dream` | Generate self-reflection log |
|
|
441
|
+
| `alive share <name>` | Export a skill as `.tar.gz` |
|
|
442
|
+
| `alive install <source>` | Import a skill from file/URL/gist |
|
|
443
|
+
| `alive browse` | Browse community skills |
|
|
444
|
+
| `alive config` | Set provider and API keys |
|
|
445
|
+
| `alive init` | First-time setup |
|
|
446
|
+
|
|
447
|
+
### Useful flags
|
|
448
|
+
|
|
449
|
+
```bash
|
|
450
|
+
alive run "..." --dry-run # See the plan without executing
|
|
451
|
+
alive run "..." --simple # Skip planning, direct LLM call
|
|
452
|
+
alive run "..." --verbose # Show full errors and LLM details
|
|
453
|
+
alive run "..." --provider ollama # Override provider for one command
|
|
454
|
+
alive build "..." --verbose # See generated code during build
|
|
455
|
+
```
|
|
456
|
+
|
|
457
|
+
---
|
|
458
|
+
|
|
459
|
+
## Contributing
|
|
460
|
+
|
|
461
|
+
Alive is early-stage and contributions are very welcome.
|
|
462
|
+
|
|
463
|
+
```bash
|
|
464
|
+
# Clone and set up
|
|
465
|
+
git clone https://github.com/alive-agent/alive.git
|
|
466
|
+
cd alive
|
|
467
|
+
python -m venv .venv && source .venv/bin/activate
|
|
468
|
+
pip install -e ".[dev]"
|
|
469
|
+
|
|
470
|
+
# Run tests (274 of them)
|
|
471
|
+
pytest tests/ -v
|
|
472
|
+
|
|
473
|
+
# Lint
|
|
474
|
+
ruff check src/ tests/
|
|
475
|
+
```
|
|
476
|
+
|
|
477
|
+
### Where to contribute
|
|
478
|
+
|
|
479
|
+
- **New seed skills** — add to `src/alive/seeds/`. Good candidates: JSON parser, regex matcher, image downloader.
|
|
480
|
+
- **Provider support** — add new LLM providers in `src/alive/llm/`. Follow the `OllamaProvider` pattern.
|
|
481
|
+
- **Skill sharing** — the community catalog at `alive-agent/community-skills` needs skills!
|
|
482
|
+
- **Bug fixes** — check [issues](https://github.com/alive-agent/alive/issues).
|
|
483
|
+
|
|
484
|
+
### Architecture for contributors
|
|
485
|
+
|
|
486
|
+
```
|
|
487
|
+
src/alive/
|
|
488
|
+
├── cli.py # Typer CLI — all commands
|
|
489
|
+
├── config.py # Paths and directory setup
|
|
490
|
+
├── core/
|
|
491
|
+
│ ├── planner.py # Request → ExecutionPlan
|
|
492
|
+
│ ├── composer.py # ExecutionPlan → Result
|
|
493
|
+
│ ├── skill_builder.py # Description → Working skill
|
|
494
|
+
│ ├── skill_registry.py # CRUD for skills + Wilson scoring
|
|
495
|
+
│ └── self_model.py # SQLite tracking + capability analysis
|
|
496
|
+
├── llm/
|
|
497
|
+
│ ├── base.py # Abstract LLMProvider
|
|
498
|
+
│ ├── registry.py # Provider factory + auto-detection
|
|
499
|
+
│ └── *_provider.py # Claude, OpenAI, Ollama, DeepSeek
|
|
500
|
+
├── sandbox/
|
|
501
|
+
│ ├── runner.py # Subprocess execution
|
|
502
|
+
│ └── dependency.py # Shared venv management
|
|
503
|
+
├── dream/
|
|
504
|
+
│ └── dream_log.py # Self-reflection engine
|
|
505
|
+
├── sharing/
|
|
506
|
+
│ ├── export.py # .tar.gz + Gist publishing
|
|
507
|
+
│ ├── import_skill.py # Import with security checks
|
|
508
|
+
│ └── browse.py # Community catalog
|
|
509
|
+
└── seeds/ # Bundled starter skills
|
|
510
|
+
```
|
|
511
|
+
|
|
512
|
+
---
|
|
513
|
+
|
|
514
|
+
## Roadmap
|
|
515
|
+
|
|
516
|
+
What's coming next:
|
|
517
|
+
|
|
518
|
+
- **Skill breeding** — Alive notices two skills that combine well and proposes a hybrid. `web_fetch` + `html_parser` = `web_scraper` with CSS selectors.
|
|
519
|
+
|
|
520
|
+
- **Proactive engine** — Instead of waiting for requests, Alive monitors your workflow and pre-builds skills it predicts you'll need.
|
|
521
|
+
|
|
522
|
+
- **Federated skill evolution** — When many users build similar skills, the best implementations float to the top of the community catalog. Skills evolve across the network.
|
|
523
|
+
|
|
524
|
+
- **Memory layer** — Alive remembers context across sessions. "Last time you scraped that site, the structure was..."
|
|
525
|
+
|
|
526
|
+
- **Multi-agent composition** — Multiple Alive instances collaborating, each with different skill specializations.
|
|
527
|
+
|
|
528
|
+
---
|
|
529
|
+
|
|
530
|
+
## License
|
|
531
|
+
|
|
532
|
+
[MIT](LICENSE). Do whatever you want with it.
|
|
533
|
+
|
|
534
|
+
---
|
|
535
|
+
|
|
536
|
+
<p align="center">
|
|
537
|
+
<em>Alive starts with 3 skills. How many will yours have?</em>
|
|
538
|
+
</p>
|