Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@

# Synthetic AI API Key
# SYN_API_KEY=...

# Tavily Search API Key (for research-agent)
# SEARCH_API_KEY=tvly-...
4 changes: 4 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ Code Puppy features a modular agent architecture. Each agent has its own system
| `file_operations.py` | List, read, grep filesystem operations |
| `agent_tools.py` | Agent invocation and reasoning tools |
| `tools_content.py` | Content manipulation utilities |
| `search_tool.py` | Web search via Tavily API |

### `code_puppy/tools/browser/`

Expand Down Expand Up @@ -265,6 +266,9 @@ You can create custom agents using JSON files! Place them in `~/.code_puppy/agen
**System Operations:**
- `agent_run_shell_command` - Execute shell commands

**Web Search:**
- `search` - Search the web via Tavily API (requires `SEARCH_API_KEY`)

**Agent Operations:**
- `agent_share_your_reasoning` - Share thought process
- `list_agents` - List available agents
Expand Down
42 changes: 42 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,48 @@ uvx code-puppy

## Usage

### Research Agent (Tavily Search)

Set your API key:

```bash
export SEARCH_API_KEY="tvly-..."
```

Optional provider override:

```bash
export SEARCH_PROVIDER="tavily"
```

Run the research agent:

```bash
python -m code_puppy --agent research-agent "What is app.tavily.com? Cite sources."
```

Search parameters supported: `search_depth`, `topic`, `time_range`, `include_domains`, `exclude_domains`, `include_raw_content`, `include_images`, `include_answer`.

### Troubleshooting

If `uv` warns about hardlinking during installs/tests on Windows, set:

```bash
export UV_LINK_MODE=copy
```

PowerShell:

```powershell
$env:UV_LINK_MODE="copy"
```

CMD:

```cmd
set UV_LINK_MODE=copy
```

### Adding Models from models.dev 🆕

While there are several models configured right out of the box from providers like Synthetic, Cerebras, OpenAI, Google, and Anthropic, Code Puppy integrates with [models.dev](https://models.dev) to let you browse and add models from **65+ providers** with a single command:
Expand Down
6 changes: 3 additions & 3 deletions code_puppy/tools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,13 @@
register_agent_run_shell_command,
register_agent_share_your_reasoning,
)
from code_puppy.tools.display import (
display_non_streamed_result as display_non_streamed_result,
)
from code_puppy.tools.file_modifications import register_delete_file, register_edit_file
from code_puppy.tools.file_operations import (
register_grep,
register_list_files,
register_read_file,
)
from code_puppy.tools.search_tool import register_search

# Map of tool names to their individual registration functions
TOOL_REGISTRY = {
Expand All @@ -84,6 +82,8 @@
# Command Runner
"agent_run_shell_command": register_agent_run_shell_command,
"agent_share_your_reasoning": register_agent_share_your_reasoning,
# Search
"search": register_search,
# Browser Control
"browser_initialize": register_initialize_browser,
"browser_close": register_close_browser,
Expand Down
Loading