Agent in 9 Lines Python
I asked myself: what would a minimal implementation of an agent look like? Something that works out of the box, is a real agent with tool calling, but without 1000s of lines of code, without dozens or hundreds of npm or pypi dependencies. Something with just a few 'essential' features (not a whole kitchen sink that most agent harnesses come with nowadays). An implementation close to pseudocode that you can look at in one page, everything there at a glance, no scrolling. This is the agent.py I ended up with so far: import json,sys;from subprocess import getoutput as sh;from urllib.request…
Agent in 9 Lines Python launched on July 22, 2026 with 21 votes, #854 of 24,623 launches that month and more than 90% of that year's launches.
In plain words
Agent in 9 Lines Python is a minimal implementation of an AI agent with tool calling capabilities, designed to work out of the box with minimal dependencies. Written in just nine lines of Python code, it enables an agent to interact with users and execute shell commands through a simple, readable implementation. The project is intended for developers who want to understand how agents work or build lightweight agent functionality without the complexity and bloat of larger frameworks.
written from the facts on this page · September 2026
From the sources
agent in 9 lines python. GitHub Gist: instantly share code, notes, and snippets.
Search Gists Search Gists Sign in Sign up You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert {{ message }} Instantly share code, notes, and snippets. Clone this repository at <script src="https://gist.github.com/tosh/6e91a9dbf08dd630c535e7345ac7f0b5.js"></script> Save tosh/6e91a9dbf08dd630c535e7345ac7f0b5 to your computer and use it in GitHub Desktop. Embed Select an option Embed Embed this gist in your website. Share Copy sharable link for this gist. Clone via HTTPS Clone using the web URL. No…from gist.github.com
In the maker’s words, at launch
I asked myself: what would a minimal implementation of an agent look like? Something that works out of the box, is a real agent with tool calling, but without 1000s of lines of code, without dozens or hundreds of npm or pypi dependencies. Something with just a few 'essential' features (not a whole kitchen sink that…
Does a similar job
all alternatives →
Agent Builder by ThesysFeb 2026 · thesys.dev · ▲425Build AI agents that respond with UI instead of text

Agency – Unifying human, AI, and other computing systems, in Python2023 · github.com · ▲106Hello hackernews! I'm excited to share a new open source python library I just released for creating AI agent-integrated systems. The name is `agency`. It differs from other agent libraries, most importantly in that it's intended to address a distinct part of the overall problem, that of agent integration. It is not an agent toolchain like LangChain and others. `agency` is a framework intended for safely integrating agents with computing systems and humans in a way that all parties can easily understand and communicate with each other. I've spent a lot of time on the readme which contains a…
Freeact – A Lightweight Library for Code-Action Based Agents2025 · github.com · ▲122Hello! We just released freeact (https://github.com/gradion-ai/freeact), a lightweight agent library that empowers language models to act as autonomous agents through executable code actions. By enabling agents to express their actions directly in code rather than through constrained formats like JSON, freeact provides a flexible and powerful approach to solving complex, open-ended problems that require dynamic solution paths. * Supports dynamic installation and utilization of Python packages at runtime * Agents learn from feedback and store successful code actions as…
Epismo Agent PackageApr 2026 · epismo.ai · ▲106Hi HN, I’m Hiroki, founder of Epismo. Every day, people share “must-use” prompts, but copying a single prompt rarely reproduces real outcomes. The missing piece is the workflow: task decomposition, step order, intermediate artifacts, and quality checks. So I built Workflow Hub, an open library of human-AI workflows you can clone and run. Each workflow includes step definitions, inputs, expected artifacts/outputs, and verification checks, so you can copy the whole process, not just a prompt. You can clone a workflow, customize it, then execute it in Epismo with the best agent for each…
Pu.sh – a full coding-agent harness in 400 lines of shellApr 2026 · pu.dev · ▲92I originally was just messing with pi-autoresearch. Gave it a sample task to build the most portable coding agent. First cut was 6 KB of shell. Great for one-shots, unusable interactively. I was shocked it actually worked. Started building up -- adding features — but with a self-imposed rule: no new dependencies, and sub 500 LOC. This thing had to be truly portable. Just sh, curl, awk. System primitives only. Which means I did some genuinely disgusting things in awk, including JSON parsing and the OpenAI Responses tool loop with reasoning items carried across turns. It's now ~400 lines. In…
More ai this month
the category →



Paintings by AI models: programs run through a simulation of oil paint.
AI · 21d ago · stillwet.art
PixVerse R2▲381A real-time world model you can explore and change
AI · 29d ago · world.pixverse.video

Source: Show HN post ↗ · launch text quoted in part
Launched alongside, July 2026
the whole month →- IR
I might be the only SRE on Earth with his own bowling center. It's a more in-depth gig than you'd think. My family and I bought an abandoned 8-lane bowling center in the rural mid-west. In our small town there weren't many recreation options for families. You've heard of a food desert? This is an R&R desert. It had been abandoned for a good reason. The roof leaks, the electrical system was constantly surging, and my 70-year-old bowling equipment (still) doesn't work perfectly. The system that keeps your score is particularly interesting to me. It's the thing you watch during your game, but…
Life & fun · Jul 2026

18 Words▲1,160Play 18 Words, the free daily word puzzle. The official home is 18words.com. Tap Play now to open today
Life & fun · Jul 2026 · 18words.com
- BA
Over the past few months, our team has been building more and more slidedecks using web frontend technologies with coding harnesses like Claude Code, but a common complaint is to make even small edits we need to edit the code either manually or via the harness. To avoid this loop, I ended up creating Bento, a single HTML file with everything you need in a slide tool including animations and shared editing. There's no install or cloud login, everything works offline. The default deck is around 560 KB and it doesn't need to fetch anything once you got it. Open it in a browser and then you can…
Dev tools · Jul 2026 · bento.page

A few days ago I found myself trying out GLM 5.2 and was really positively impressed. The capabilities and security I was getting from this LLM are similar to those I've gotten from models like Claude or GPT, and this really surprised me. But then I thought, "I wonder how it would work on a normal computer like mine," and above all, "I wonder if it would work without going into OOM on a computer like mine." So I started working with the help of agents to test this possibility. I started converting the model to int4, understanding MTP usage, and if possible implementing DSA for long context.…
AI · Jul 2026 · github.com
OpenSEO▲928Hello! For the last 2 months, I've been building OpenSEO. It's a user friendly UI wrapping the DataForSEO API which has high quality SEO data for keywords, backlinks, AI SEO and competitor research. Instead of paying $100+ per month, you buy DataForSEO credits and pay only for usage. The coolest thing about the project so far has been hearing about what people are building on top of it. People are using coding agents to quickly integrate with Google Search Console, Google Ads and building their own AI SEO and reporting features. Many were already building their own custom solutions around…
Dev tools · Jul 2026 · openseo.so