Single-file agents for specific tasks
Top 75.0% on sourcepulse
This repository provides a collection of single-file Python agents designed for specific tasks, leveraging modern GenAI models from OpenAI, Anthropic, and Gemini. It targets developers and researchers looking for practical, prompt-engineered AI solutions that are easy to deploy and integrate. The primary benefit is the ability to quickly utilize powerful, focused AI capabilities without complex project setups.
How It Works
The agents are built as self-contained Python files, utilizing the uv
package installer for efficient dependency management. Each agent focuses on a single task, such as querying databases (DuckDB, SQLite), processing JSON with jq
, generating meta-prompts, editing files and executing bash commands, or performing web scraping. The design emphasizes precise prompt engineering and leverages the function-calling or tool-use capabilities of various LLMs to achieve specific outcomes.
Quick Start & Requirements
uv
: curl -LsSf https://astral.sh/uv/install.sh | sh
git clone <repository-url>
export GEMINI_API_KEY='...'
, export OPENAI_API_KEY='...'
, export ANTHROPIC_API_KEY='...'
, export FIRECRAWL_API_KEY='...'
uv
, jq
(macOS: brew install jq
), DuckDB CLI (macOS: brew install duckdb
).uv run sfa_jq_gemini_v1.py --exe "..."
or uv run sfa_duckdb_openai_v2.py -d ./data/analytics.db -p "..."
Highlighted Details
uv
for fast dependency resolution and execution.Maintenance & Community
The project is maintained by IndyDevDan, with shout-outs to the uv
team and Simon Willison for inspiration. Further resources and related projects are linked in the README.
Licensing & Compatibility
MIT License. Permissive for use in other projects, with a request for a shout-out to the author's YouTube channel.
Limitations & Caveats
Some agents are noted as "buggy but usually works" (e.g., sfa_duckdb_gemini_v2.py
). The term "agent" is used loosely for some scripts, which may represent prompt chains rather than full agents.
3 months ago
Inactive