frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

AI agent with 2 deps that uses Shannon Entropy to decide when to act vs. ask

https://github.com/borhen68/picoagents
2•borhensaidi•1h ago

Comments

borhensaidi•1h ago
I got frustrated with LangChain being impossible to audit (500+ transitive dependencies, 100K+ LOC), so I built picoagent — an AI agent framework with only numpy and websockets as external dependencies.

The interesting technical decision: instead of prompting the LLM to pick a tool, I use Shannon Entropy (H(X) = -Σp·log₂(p)) on the softmax score distribution over available tools. If entropy is above 1.5 bits, the agent asks for clarification instead of guessing. In my tests this cuts false positive tool calls by 40-60%.

The threshold adapts over time using a simple online learning system that tracks success/failure rates per session — no external data sent anywhere.

Other things that might be interesting to HN: - Zero-trust sandbox with 18+ regex deny patterns blocking rm -rf, fork bombs, sudo, reverse shells, path traversal - Dual-layer memory: numpy .npz vector embeddings + LLM consolidation to MEMORY.md (no Pinecone, no vector DB) - The entire entropy gate is 64 lines of readable Python - 5 chat channels (Telegram, Discord, Slack, WhatsApp, Email) with unified memory - MCP-native (Model Context Protocol) stdio server - Hot-reloadable Markdown skills via SIGHUP

It's early and rough. I'm looking for feedback on: - Is 1.5 bits the right entropy threshold or should it be dynamic from day one? - What dangerous shell patterns am I missing in the sandbox? - Is the dual-memory approach (vector + markdown consolidation) worth the complexity?

GitHub: https://github.com/borhen68/picoagents

Happy to answer questions about any of the implementation decisions.

guerython•1h ago
Solid move on the entropy gate. We log the softmax H for every tool call and keep a tiny EMA+stddev per tool (`H_new=(1-α)H_old+αH_now`). The gate then lets calls through only when `H < max(base, mean+2σ)` and resets the mean when we see two consecutive confirmed failures, so the threshold drifts with the workload instead of hardcoding 1.5 bits.

On the sandbox side, we blocked not just `rm -rf`/fork bombs but also `os.execve('/proc/self/exe')`, `chmod`/`chown` on symlinks under `/tmp`, and we intercept raw `socket/connect` via ptrace so no new outbound channels spawn even if a regex slips. These traps stopped most of the pivoting tricks we saw in the first week.

Swarming, spinning microrobots can manipulate their surroundings

https://news.cornell.edu/stories/2026/02/swarming-spinning-microrobots-can-manipulate-their-surro...
1•geox•5m ago•0 comments

I'm Sorry This New Artist Sucks [video]

https://www.youtube.com/watch?v=eKxNGFjyRv0
1•thunderbong•9m ago•0 comments

Show HN: I Get IT – Why My GitHub Repos, and Websites Get Zero Traction

https://useviralize.com
1•jcrosbz•9m ago•1 comments

Opponent Modeling Wins 2× Faster Than Stockfish

https://blog.lukesalamone.com/posts/winning-faster-than-stockfish/
1•salamo•10m ago•0 comments

Personal token: share equity in your lifetime upside

https://github.com/homan9/personal-token/blob/main/whitepaper.md
1•koopuluri•14m ago•0 comments

Future of Devtools and Moats

https://ravivyas.com/2026/03/01/dev-tools-and-moats
2•ravivyas•15m ago•1 comments

Piezoelectric gel to regenerate lost bone (e.g. periodontitis)

https://oralbiolife.com/
1•camebeforeagain•15m ago•1 comments

Show HN: Orcv: If tmux was built for window management on macOS in 2026

https://github.com/jasonjmcghee/orcv
1•jasonjmcghee•17m ago•1 comments

Show HN: I used LLMs to build a compression tool that beats xz on x86_64 ELFs

3•mohsen1•17m ago•1 comments

Vibe Knowing

https://idiallo.com/blog/large-language-models-make-us-feel-smarter
1•foxfired•17m ago•0 comments

How Nanotech Made an Old Leukemia Drug 22,000x Stronger

https://www.medscape.com/viewarticle/how-nanotech-made-old-leukemia-drug-22-000x-stronger-2026a10...
1•wjb3•22m ago•1 comments

Show HN: Aver – A Git-native Markdown-based tracker for knowledge setwardship

https://github.com/dentm42/aver
1•dentm42•22m ago•1 comments

AI Now Has Its Own Cursor

https://clawdcursor.com/
1•AmrDabb•26m ago•0 comments

FOMC Insight Engine: semantic search over Fed archives

https://causalityineconomics.com/fomc_archive
2•jez•26m ago•0 comments

Which State Governs the Internet's Fine Print

https://tostracker.app/analysis/governing-law
1•tldrthelaw•27m ago•0 comments

Customer Intelligence Protocol

https://github.com/Cole-Cant-Code/CIP-Customer-Intelligence-Protocol
1•ColeW•27m ago•1 comments

Show HN: YourFinanceWORKS – Open-source financial management with AI

https://www.yourfinanceworks.com
1•snowsky•27m ago•0 comments

Show HN: Leyoda – Shareable startup cards with analytics

https://leyoda.eu
1•whitehatd•30m ago•1 comments

Show HN: BeatCanvas – A browser-based demoscene visualizer for SoundCloud

https://beatcanvas.net/
1•fsrc•30m ago•1 comments

A U.S. scholarship thrills a teacher in India. Then came soul-crushing questions

https://www.npr.org/2026/03/01/g-s1-104772/teacher-india-school-patriarchy-fulbright
3•aanet•32m ago•0 comments

Most common fields of study, from 1970 to now

https://flowingdata.com/2026/02/19/fields-of-study-ranked-by-bachelors-degrees-since-1970/
3•gmays•33m ago•0 comments

Show HN: ClawShield – Open-source security proxy for AI agents (Go, eBPF)

https://github.com/SleuthCo/clawshield-public
1•sleuthco•33m ago•1 comments

Quarkdown: Markdown with Superpowers

https://quarkdown.com/
2•amichail•36m ago•0 comments

Show HN: Remoat – Control Antigravity from your phone via Telegram

https://github.com/optimistengineer/remoat
3•optimistengr•37m ago•1 comments

Show HN: EWA Compare – Compare 21 earned wage access providers worldwide

https://www.earnedwageaccess.com
1•Bielrv•38m ago•0 comments

Waymo robotaxi blocks EMS responding to Austin mass shooting

https://www.axios.com/local/austin/2026/03/02/waymo-vehicle-blocks-ems-austin-mass-shooting
1•mikhael•41m ago•0 comments

Show HN: LightJJ – Web-Based UI for Jujutsu VCS

https://github.com/chronologos/lightjj
1•Chronologos•46m ago•0 comments

Show HN: Timber – Ollama for classical ML models, 336x faster than Python

https://github.com/kossisoroyce/timber
2•kossisoroyce•48m ago•0 comments

Claude and the Dow: AI is unlike other tech because AI has embedded judgment

https://www.dbreunig.com/2026/03/01/the-issue-is-embedded-judgment.html
1•dbreunig•52m ago•0 comments

Clickout staff journalists sacked and misleadingly replaced with AI writers

https://pressgazette.co.uk/news/staff-journalists-sacked-and-misleadingly-replaced-with-ai-writers/
2•starkparker•53m ago•0 comments