supyagent 0.2.0__tar.gz → 0.2.1__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.
- {supyagent-0.2.0 → supyagent-0.2.1}/PKG-INFO +27 -3
- {supyagent-0.2.0 → supyagent-0.2.1}/README.md +26 -2
- {supyagent-0.2.0 → supyagent-0.2.1}/pyproject.toml +1 -1
- {supyagent-0.2.0 → supyagent-0.2.1}/supyagent/cli/main.py +72 -1
- supyagent-0.2.1/supyagent/default_tools/__init__.py +74 -0
- supyagent-0.2.1/supyagent/default_tools/files.py +439 -0
- supyagent-0.2.1/supyagent/default_tools/shell.py +217 -0
- supyagent-0.2.1/supypowers/__init__.py +6 -0
- supyagent-0.2.1/supypowers/files.py +439 -0
- supyagent-0.2.1/supypowers/shell.py +217 -0
- {supyagent-0.2.0 → supyagent-0.2.1}/.gitignore +0 -0
- {supyagent-0.2.0 → supyagent-0.2.1}/LICENSE +0 -0
- {supyagent-0.2.0 → supyagent-0.2.1}/agents/assistant.yaml +0 -0
- {supyagent-0.2.0 → supyagent-0.2.1}/agents/coder.yaml +0 -0
- {supyagent-0.2.0 → supyagent-0.2.1}/agents/planner.yaml +0 -0
- {supyagent-0.2.0 → supyagent-0.2.1}/agents/researcher.yaml +0 -0
- {supyagent-0.2.0 → supyagent-0.2.1}/agents/summarizer.yaml +0 -0
- {supyagent-0.2.0 → supyagent-0.2.1}/agents/writer.yaml +0 -0
- {supyagent-0.2.0 → supyagent-0.2.1}/plans/initial_plan.md +0 -0
- {supyagent-0.2.0 → supyagent-0.2.1}/scripts/release.sh +0 -0
- {supyagent-0.2.0 → supyagent-0.2.1}/sprints/README.md +0 -0
- {supyagent-0.2.0 → supyagent-0.2.1}/sprints/sprint_1_foundation.md +0 -0
- {supyagent-0.2.0 → supyagent-0.2.1}/sprints/sprint_2_sessions.md +0 -0
- {supyagent-0.2.0 → supyagent-0.2.1}/sprints/sprint_3_repl.md +0 -0
- {supyagent-0.2.0 → supyagent-0.2.1}/sprints/sprint_4_execution.md +0 -0
- {supyagent-0.2.0 → supyagent-0.2.1}/sprints/sprint_5_multiagent.md +0 -0
- {supyagent-0.2.0 → supyagent-0.2.1}/sprints/sprint_6_polish.md +0 -0
- {supyagent-0.2.0 → supyagent-0.2.1}/supyagent/__init__.py +0 -0
- {supyagent-0.2.0 → supyagent-0.2.1}/supyagent/__main__.py +0 -0
- {supyagent-0.2.0 → supyagent-0.2.1}/supyagent/cli/__init__.py +0 -0
- {supyagent-0.2.0 → supyagent-0.2.1}/supyagent/core/__init__.py +0 -0
- {supyagent-0.2.0 → supyagent-0.2.1}/supyagent/core/agent.py +0 -0
- {supyagent-0.2.0 → supyagent-0.2.1}/supyagent/core/config.py +0 -0
- {supyagent-0.2.0 → supyagent-0.2.1}/supyagent/core/context.py +0 -0
- {supyagent-0.2.0 → supyagent-0.2.1}/supyagent/core/credentials.py +0 -0
- {supyagent-0.2.0 → supyagent-0.2.1}/supyagent/core/delegation.py +0 -0
- {supyagent-0.2.0 → supyagent-0.2.1}/supyagent/core/executor.py +0 -0
- {supyagent-0.2.0 → supyagent-0.2.1}/supyagent/core/llm.py +0 -0
- {supyagent-0.2.0 → supyagent-0.2.1}/supyagent/core/registry.py +0 -0
- {supyagent-0.2.0 → supyagent-0.2.1}/supyagent/core/session_manager.py +0 -0
- {supyagent-0.2.0 → supyagent-0.2.1}/supyagent/core/tools.py +0 -0
- {supyagent-0.2.0 → supyagent-0.2.1}/supyagent/models/__init__.py +0 -0
- {supyagent-0.2.0 → supyagent-0.2.1}/supyagent/models/agent_config.py +0 -0
- {supyagent-0.2.0 → supyagent-0.2.1}/supyagent/models/session.py +0 -0
- {supyagent-0.2.0 → supyagent-0.2.1}/supyagent/utils/__init__.py +0 -0
- {supyagent-0.2.0 → supyagent-0.2.1}/supyagent/utils/paths.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: supyagent
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.1
|
|
4
4
|
Summary: LLM agents powered by supypowers - build AI agents with tool use, multi-agent orchestration, and secure credential management
|
|
5
5
|
Project-URL: Homepage, https://github.com/ergodic-ai/supyagent
|
|
6
6
|
Project-URL: Documentation, https://github.com/ergodic-ai/supyagent#readme
|
|
@@ -68,6 +68,9 @@ uv pip install supyagent
|
|
|
68
68
|
## Quick Start
|
|
69
69
|
|
|
70
70
|
```bash
|
|
71
|
+
# Initialize supyagent (sets up default tools)
|
|
72
|
+
supyagent init
|
|
73
|
+
|
|
71
74
|
# Set up your API key (stored securely)
|
|
72
75
|
supyagent config set ANTHROPIC_API_KEY
|
|
73
76
|
|
|
@@ -229,6 +232,7 @@ delegates:
|
|
|
229
232
|
|
|
230
233
|
| Command | Description |
|
|
231
234
|
|---------|-------------|
|
|
235
|
+
| `supyagent init` | Initialize project with default tools |
|
|
232
236
|
| `supyagent new <name>` | Create a new agent |
|
|
233
237
|
| `supyagent list` | List all agents |
|
|
234
238
|
| `supyagent show <name>` | Show agent details |
|
|
@@ -281,6 +285,25 @@ While chatting, use these commands:
|
|
|
281
285
|
| `/clear` | Clear conversation history |
|
|
282
286
|
| `/quit` | Exit the chat |
|
|
283
287
|
|
|
288
|
+
## Bundled Tools
|
|
289
|
+
|
|
290
|
+
Running `supyagent init` installs these default tools:
|
|
291
|
+
|
|
292
|
+
### Shell (`shell.py`)
|
|
293
|
+
- `run_command` - Execute shell commands
|
|
294
|
+
- `run_script` - Run multi-line bash scripts
|
|
295
|
+
- `which` - Find executable paths
|
|
296
|
+
- `get_env` - Get environment variables
|
|
297
|
+
|
|
298
|
+
### Files (`files.py`)
|
|
299
|
+
- `read_file` / `write_file` - File I/O
|
|
300
|
+
- `list_directory` - List files with glob patterns
|
|
301
|
+
- `copy_file` / `move_file` / `delete_file` - File operations
|
|
302
|
+
- `create_directory` - Create directories
|
|
303
|
+
- `file_info` - Get file metadata
|
|
304
|
+
|
|
305
|
+
You can add your own tools by creating Python files in `supypowers/`.
|
|
306
|
+
|
|
284
307
|
## Project Structure
|
|
285
308
|
|
|
286
309
|
```
|
|
@@ -290,8 +313,9 @@ your-project/
|
|
|
290
313
|
│ ├── planner.yaml
|
|
291
314
|
│ └── researcher.yaml
|
|
292
315
|
├── supypowers/ # Tool definitions (Python)
|
|
293
|
-
│ ├──
|
|
294
|
-
│
|
|
316
|
+
│ ├── shell.py # Shell commands (bundled)
|
|
317
|
+
│ ├── files.py # File operations (bundled)
|
|
318
|
+
│ └── my_tools.py # Your custom tools
|
|
295
319
|
└── .supyagent/ # Runtime data (gitignore this)
|
|
296
320
|
├── sessions/ # Conversation history
|
|
297
321
|
├── credentials/ # Encrypted secrets
|
|
@@ -32,6 +32,9 @@ uv pip install supyagent
|
|
|
32
32
|
## Quick Start
|
|
33
33
|
|
|
34
34
|
```bash
|
|
35
|
+
# Initialize supyagent (sets up default tools)
|
|
36
|
+
supyagent init
|
|
37
|
+
|
|
35
38
|
# Set up your API key (stored securely)
|
|
36
39
|
supyagent config set ANTHROPIC_API_KEY
|
|
37
40
|
|
|
@@ -193,6 +196,7 @@ delegates:
|
|
|
193
196
|
|
|
194
197
|
| Command | Description |
|
|
195
198
|
|---------|-------------|
|
|
199
|
+
| `supyagent init` | Initialize project with default tools |
|
|
196
200
|
| `supyagent new <name>` | Create a new agent |
|
|
197
201
|
| `supyagent list` | List all agents |
|
|
198
202
|
| `supyagent show <name>` | Show agent details |
|
|
@@ -245,6 +249,25 @@ While chatting, use these commands:
|
|
|
245
249
|
| `/clear` | Clear conversation history |
|
|
246
250
|
| `/quit` | Exit the chat |
|
|
247
251
|
|
|
252
|
+
## Bundled Tools
|
|
253
|
+
|
|
254
|
+
Running `supyagent init` installs these default tools:
|
|
255
|
+
|
|
256
|
+
### Shell (`shell.py`)
|
|
257
|
+
- `run_command` - Execute shell commands
|
|
258
|
+
- `run_script` - Run multi-line bash scripts
|
|
259
|
+
- `which` - Find executable paths
|
|
260
|
+
- `get_env` - Get environment variables
|
|
261
|
+
|
|
262
|
+
### Files (`files.py`)
|
|
263
|
+
- `read_file` / `write_file` - File I/O
|
|
264
|
+
- `list_directory` - List files with glob patterns
|
|
265
|
+
- `copy_file` / `move_file` / `delete_file` - File operations
|
|
266
|
+
- `create_directory` - Create directories
|
|
267
|
+
- `file_info` - Get file metadata
|
|
268
|
+
|
|
269
|
+
You can add your own tools by creating Python files in `supypowers/`.
|
|
270
|
+
|
|
248
271
|
## Project Structure
|
|
249
272
|
|
|
250
273
|
```
|
|
@@ -254,8 +277,9 @@ your-project/
|
|
|
254
277
|
│ ├── planner.yaml
|
|
255
278
|
│ └── researcher.yaml
|
|
256
279
|
├── supypowers/ # Tool definitions (Python)
|
|
257
|
-
│ ├──
|
|
258
|
-
│
|
|
280
|
+
│ ├── shell.py # Shell commands (bundled)
|
|
281
|
+
│ ├── files.py # File operations (bundled)
|
|
282
|
+
│ └── my_tools.py # Your custom tools
|
|
259
283
|
└── .supyagent/ # Runtime data (gitignore this)
|
|
260
284
|
├── sessions/ # Conversation history
|
|
261
285
|
├── credentials/ # Encrypted secrets
|
|
@@ -21,13 +21,14 @@ from supyagent.core.config import ConfigManager, load_config
|
|
|
21
21
|
from supyagent.core.executor import ExecutionRunner
|
|
22
22
|
from supyagent.core.registry import AgentRegistry
|
|
23
23
|
from supyagent.core.session_manager import SessionManager
|
|
24
|
+
from supyagent.default_tools import install_default_tools, list_default_tools
|
|
24
25
|
from supyagent.models.agent_config import AgentNotFoundError, load_agent_config
|
|
25
26
|
|
|
26
27
|
console = Console()
|
|
27
28
|
|
|
28
29
|
|
|
29
30
|
@click.group()
|
|
30
|
-
@click.version_option(version="0.2.
|
|
31
|
+
@click.version_option(version="0.2.1", prog_name="supyagent")
|
|
31
32
|
def cli():
|
|
32
33
|
"""
|
|
33
34
|
Supyagent - LLM agents powered by supypowers.
|
|
@@ -37,12 +38,82 @@ def cli():
|
|
|
37
38
|
Quick start:
|
|
38
39
|
|
|
39
40
|
\b
|
|
41
|
+
supyagent init # Set up default tools
|
|
42
|
+
supyagent config set # Configure API keys
|
|
40
43
|
supyagent new myagent # Create an agent
|
|
41
44
|
supyagent chat myagent # Start chatting
|
|
42
45
|
"""
|
|
43
46
|
pass
|
|
44
47
|
|
|
45
48
|
|
|
49
|
+
@cli.command()
|
|
50
|
+
@click.option(
|
|
51
|
+
"--tools-dir",
|
|
52
|
+
"-t",
|
|
53
|
+
default="supypowers",
|
|
54
|
+
help="Directory for tools (default: supypowers/)",
|
|
55
|
+
)
|
|
56
|
+
@click.option(
|
|
57
|
+
"--force",
|
|
58
|
+
"-f",
|
|
59
|
+
is_flag=True,
|
|
60
|
+
help="Overwrite existing files",
|
|
61
|
+
)
|
|
62
|
+
def init(tools_dir: str, force: bool):
|
|
63
|
+
"""
|
|
64
|
+
Initialize supyagent in the current directory.
|
|
65
|
+
|
|
66
|
+
This sets up:
|
|
67
|
+
- Default tools in supypowers/ (shell commands, file operations)
|
|
68
|
+
- agents/ directory for agent configurations
|
|
69
|
+
|
|
70
|
+
\b
|
|
71
|
+
Examples:
|
|
72
|
+
supyagent init
|
|
73
|
+
supyagent init --tools-dir my_tools
|
|
74
|
+
"""
|
|
75
|
+
console.print("[bold]Initializing supyagent...[/bold]")
|
|
76
|
+
console.print()
|
|
77
|
+
|
|
78
|
+
# Create agents directory
|
|
79
|
+
agents_dir = Path("agents")
|
|
80
|
+
if not agents_dir.exists():
|
|
81
|
+
agents_dir.mkdir(parents=True)
|
|
82
|
+
console.print(f" [green]✓[/green] Created {agents_dir}/")
|
|
83
|
+
else:
|
|
84
|
+
console.print(f" [dim]○[/dim] {agents_dir}/ already exists")
|
|
85
|
+
|
|
86
|
+
# Install default tools
|
|
87
|
+
tools_path = Path(tools_dir)
|
|
88
|
+
|
|
89
|
+
if force:
|
|
90
|
+
# Remove and reinstall
|
|
91
|
+
import shutil
|
|
92
|
+
|
|
93
|
+
if tools_path.exists():
|
|
94
|
+
shutil.rmtree(tools_path)
|
|
95
|
+
|
|
96
|
+
if tools_path.exists() and any(tools_path.glob("*.py")):
|
|
97
|
+
console.print(f" [dim]○[/dim] {tools_dir}/ already has tools")
|
|
98
|
+
else:
|
|
99
|
+
count = install_default_tools(tools_path)
|
|
100
|
+
console.print(
|
|
101
|
+
f" [green]✓[/green] Installed {count} default tools to {tools_dir}/"
|
|
102
|
+
)
|
|
103
|
+
|
|
104
|
+
# Show available tools
|
|
105
|
+
console.print()
|
|
106
|
+
console.print("[bold]Available tools:[/bold]")
|
|
107
|
+
for tool in list_default_tools():
|
|
108
|
+
console.print(f" • [cyan]{tool['name']}[/cyan]: {tool['description']}")
|
|
109
|
+
|
|
110
|
+
console.print()
|
|
111
|
+
console.print("[bold]Next steps:[/bold]")
|
|
112
|
+
console.print(" 1. Configure your API key: [cyan]supyagent config set[/cyan]")
|
|
113
|
+
console.print(" 2. Create an agent: [cyan]supyagent new myagent[/cyan]")
|
|
114
|
+
console.print(" 3. Start chatting: [cyan]supyagent chat myagent[/cyan]")
|
|
115
|
+
|
|
116
|
+
|
|
46
117
|
@cli.command()
|
|
47
118
|
@click.argument("name")
|
|
48
119
|
@click.option(
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Default supypowers tools bundled with supyagent.
|
|
3
|
+
|
|
4
|
+
These tools are copied to the user's project when running `supyagent init`.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
import shutil
|
|
8
|
+
from pathlib import Path
|
|
9
|
+
|
|
10
|
+
# Path to the bundled default tools
|
|
11
|
+
TOOLS_DIR = Path(__file__).parent
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def get_bundled_tools() -> list[Path]:
|
|
15
|
+
"""Get list of bundled tool files."""
|
|
16
|
+
return [f for f in TOOLS_DIR.glob("*.py") if f.name != "__init__.py"]
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def install_default_tools(target_dir: Path | str = "supypowers") -> int:
|
|
20
|
+
"""
|
|
21
|
+
Install default tools to a target directory.
|
|
22
|
+
|
|
23
|
+
Args:
|
|
24
|
+
target_dir: Directory to install tools to (default: supypowers/)
|
|
25
|
+
|
|
26
|
+
Returns:
|
|
27
|
+
Number of files installed
|
|
28
|
+
"""
|
|
29
|
+
target = Path(target_dir)
|
|
30
|
+
target.mkdir(parents=True, exist_ok=True)
|
|
31
|
+
|
|
32
|
+
installed = 0
|
|
33
|
+
for tool_file in get_bundled_tools():
|
|
34
|
+
dest = target / tool_file.name
|
|
35
|
+
if not dest.exists():
|
|
36
|
+
shutil.copy(tool_file, dest)
|
|
37
|
+
installed += 1
|
|
38
|
+
|
|
39
|
+
# Create __init__.py if not exists
|
|
40
|
+
init_file = target / "__init__.py"
|
|
41
|
+
if not init_file.exists():
|
|
42
|
+
init_file.write_text('"""Supypowers tools for this project."""\n')
|
|
43
|
+
installed += 1
|
|
44
|
+
|
|
45
|
+
return installed
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def list_default_tools() -> list[dict]:
|
|
49
|
+
"""
|
|
50
|
+
List available default tools.
|
|
51
|
+
|
|
52
|
+
Returns:
|
|
53
|
+
List of tool info dicts
|
|
54
|
+
"""
|
|
55
|
+
tools = []
|
|
56
|
+
for tool_file in get_bundled_tools():
|
|
57
|
+
# Read first docstring
|
|
58
|
+
content = tool_file.read_text()
|
|
59
|
+
description = ""
|
|
60
|
+
if '"""' in content:
|
|
61
|
+
start = content.find('"""') + 3
|
|
62
|
+
end = content.find('"""', start)
|
|
63
|
+
if end > start:
|
|
64
|
+
description = content[start:end].strip().split("\n")[0]
|
|
65
|
+
|
|
66
|
+
tools.append(
|
|
67
|
+
{
|
|
68
|
+
"name": tool_file.stem,
|
|
69
|
+
"file": tool_file.name,
|
|
70
|
+
"description": description,
|
|
71
|
+
}
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
return tools
|