SIGNAL GRIDv0.1

Show HN: Agent in 9 Lines Python

1 sources1 storiesFirst seen 7/22/2026Score34Mixed Progress
Single Source
CoverageRecencyEngagementVelocityBignessConfidenceClipability
Bigness
34
Coverage
13
Recency
96
Engagement
23
Velocity
0
Confidence
20
Clipability
60
Polarization
0
Claims
3
Contradictions
0
Breakthrough
50

Sentiment Mix

Positive0%
Neutral100%
Negative0%

Geography

EuropeNorth America

Expert Signals

tosh

author1 mention

Hacker News

source1 mention

AI-Generated Claims

Generated from linked receipts; click sources for full context.

Show HN: Agent in 9 Lines Python.

Supported by 1 story

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.

Supported by 1 story

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 import Request as R,urlopen url=sys.argv[1];h=[];b=dict(model="gpt-5.6",input=h,tools=[dict(type="custom",name="sh")]) while p:=input("> "): h+=[dict(role="user",content=p)];H={"Content-Type":"application/json"} while True: o=(r:=json.load(urlopen(R(url,json.dumps(b).encode(),H))))["output"] h+=o;c=[i for i in o if i["type"]=="custom_tool_call"];z=r["usage"]["total_tokens"]/10500 if not...

Supported by 1 story

Related Events

Timeline (1 stories)

Jul 22 05:32 PMFirst
Show HN: Agent in 9 Lines Python
Hacker News23 engagement

Receipts (1)

Bias Snapshot

Center
Left 0%Center 100%Right 0%
Agggist.github.com7/22/2026