single-file-agents

Report Abuse

Basic Information

A collection of single-file Python agents designed to demonstrate and deliver focused, single-purpose GenAI workflows. The repository packages small, self-contained scripts that each implement an agent for a practical task such as generating jq commands, running DuckDB SQL queries, transforming CSVs with Polars, scraping web content, editing files and executing bash commands, or producing structured meta-prompts. Agents are built to run via the uv runner and target multiple model providers including Gemini, OpenAI, and Anthropic. The README provides command-line usage examples, required environment variables for API keys, and sample test data. The project is aimed at developers and practitioners who want quick, reproducible examples of prompt engineering, tool use patterns, and how to orchestrate model-based tools in single-file form.

Links

App Details

Features
Self-contained single-file agents with embedded dependency management designed to run with the uv tool. Minimal, precise prompt patterns and prompt chains tailored for each task. Cross-provider examples that use Gemini, OpenAI, and Anthropic model capabilities. Specific agent implementations include jq command generation, DuckDB SQL agents, Polars CSV transformations, a web scraper using the Firecrawl API, a Bash file editor agent, and a meta-prompt generator. Included test assets comprise a DuckDB database, a SQLite database, and a JSON file to exercise filtering, sorting, and aggregation. Command-line driven usage examples and support notes list required CLI tools such as jq and DuckDB and environment variables for API keys. Patterns emphasize reusability and running scripts from cloud or gist via uv.
Use Cases
The repo provides ready-to-run examples for prototyping model-driven utilities and automations without setting up a larger framework. Users can quickly experiment with concrete tasks like querying local databases with LLM-generated SQL, performing CSV analytics with Polars, scraping and extracting web content, or letting an agent edit files and run shell commands. Included test data and CLI examples make it straightforward to validate behaviors and iterate on prompts. Cross-provider scripts help compare model tool-use and function-calling approaches. The single-file format lowers friction for sharing, running from a gist or server, and teaching effective prompt and tooling patterns for building small, focused AI assistants.

Please fill the required fields*