frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: SafeAgent – exactly-once execution guard for AI agent side effects

3•Lions2026•3h ago
I built a small Python library called SafeAgent that protects real-world side effects when AI agents retry tool calls.

One issue we ran into while experimenting with agent workflows is that retries can trigger irreversible actions multiple times:

agent calls tool ↓ network timeout ↓ agent retries ↓ side effect happens twice

Examples:

• duplicate payment • duplicate email • duplicate ticket • duplicate trade

Most systems solve this ad-hoc using idempotency keys scattered around different services.

SafeAgent centralizes this into a small execution guard.

The idea is simple:

1. every tool execution gets a request_id 2. SafeAgent records the execution receipt 3. retries return the original receipt instead of running the side effect again

Example:

FIRST CALL REAL SIDE EFFECT: sending email

SECOND CALL WITH SAME request_id SafeAgent returns the original execution receipt (no second side effect)

The project is early but includes examples for:

• OpenAI tool calls • LangChain style tools • CrewAI actions

PyPI: https://pypi.org/project/safeagent-exec-guard/

GitHub: https://github.com/azender1/SafeAgent

Curious how other people are handling retry safety for agent side effects.

Comments

Lions2026•3h ago
A bit more context on why I built this.

While experimenting with LLM agents calling tools, I ran into a reliability problem: retries can easily trigger irreversible actions more than once.

For example:

agent → call tool network timeout → retry agent retries tool call side effect runs twice

That can mean:

duplicate payment

duplicate email

duplicate ticket

duplicate trade

Most systems solve this locally with idempotency keys, but in agent workflows the retries can come from multiple layers (agent loops, orchestration frameworks, API retries, etc.).

SafeAgent is a small execution guard that sits between the agent and the side effect. Every tool call gets a request_id, and SafeAgent records a durable execution receipt. If the same request is replayed, it returns the original receipt instead of executing again.

guerython•1h ago
We hit the same failure mode while running agents through n8n. Every tool call writes (request_id, tool, input_hash, response) into Postgres with a unique constraint. The guard query grabs that row first; if it already exists with a success flag we return the stored receipt instead of re-running the side effect. That way retries from the agent loop, HTTP transport, or queue worker may replay the cached payload and skip the duplicate action. Storing the error state alongside the success payload was the hardest bit so we don’t swallow a real failure while pretending it succeeded.

Show HN: A weird thing that detects your pulse from the browser video

https://pulsefeedback.io/
58•kilroy123•3d ago•26 comments

Show HN: Beecon Infrastructure as Intent, open source IaC built for AI agents

https://beecon.sh
3•gtlpanda•1h ago•0 comments

Show HN: µJS, a 5KB alternative to Htmx and Turbo with zero dependencies

https://mujs.org
128•amaury_bouchard•22h ago•60 comments

Show HN: ANSI-Saver – A macOS Screensaver

https://github.com/lardissone/ansi-saver
92•lardissone•16h ago•34 comments

Show HN: Qry – CLI web search that always outputs JSON, with swappable back ends

https://github.com/justEstif/qry
2•justEstif•3h ago•0 comments

Show HN: SafeAgent – exactly-once execution guard for AI agent side effects

3•Lions2026•3h ago•2 comments

Show HN: Ethernity: Secure paper backups with age encryption and SSS

https://github.com/MinorGlitch/ethernity
2•minorglitch•3h ago•1 comments

Show HN: SiClaw – Open-source AIOps with a hypothesis-driven diagnostic engine

https://github.com/scitix/siclaw
2•SherryWong•4h ago•0 comments

Show HN: DailyDefense – Daily tower defense for agents or humans

https://www.dailydefense.ai
2•pj4533•4h ago•0 comments

Show HN: Kula – Lightweight, self-contained Linux server monitoring tool

https://github.com/c0m4r/kula
82•c0m4r•1d ago•54 comments

Show HN: I open-sourced my Steam game, 100% written in Lua, engine is also open

https://github.com/willtobyte/reprobate
53•delduca•1d ago•20 comments

Show HN: Moongate – Ultima Online server emulator in .NET 10 with Lua scripting

https://github.com/moongate-community/moongatev2
280•squidleon•1d ago•161 comments

Show HN: Claude-replay – A video-like player for Claude Code sessions

https://github.com/es617/claude-replay
96•es617•1d ago•32 comments

Show HN: Leonardo – FFmpeg Video Converter for Linux Creators

https://github.com/RossContino1/Leonardo
8•RossC17331•13h ago•2 comments

Show HN: Jarvey - a local JARVIS for MacOS

https://github.com/novynlabs-repo/Jarvey
2•AhmedAshraf•8h ago•0 comments

Show HN: OpenGraviton – Run 500B+ parameter models on a consumer Mac Mini

https://opengraviton.github.io
8•fatihturker•14h ago•2 comments

Show HN: SRA – A new architectural pattern for modern product engineering

https://github.com/FelixZY/specification-realization-assembly-bible
4•FelixZY•12h ago•0 comments

Show HN: Help] I run 4 AI-driven companies simultaneously from my terminal

https://github.com/NikitaDmitrieff/auto-co-meta
3•Ndmtrieff•9h ago•2 comments

Show HN: Agentpng – turn agent sessions into shareable images

https://www.agentpng.dev/
3•siegers•9h ago•0 comments

Show HN: 1v1 coding game that LLMs struggle with

https://yare.io
25•levmiseri•2d ago•7 comments

Show HN: OpenGrammar Open-source, self-hostable Grammarly alternative

https://swadhinbiswas.github.io/opengrammar/
3•0x0003r•10h ago•0 comments

Show HN: MicroBin – Easy File Sharing for Everyone – Self-Hostable

https://my.microbin.eu/
2•dszb•10h ago•0 comments

Show HN: OculOS – Any desktop app as a JSON API via OS accessibility tree

https://github.com/huseyinstif/oculos
15•stif1337•23h ago•9 comments

Show HN: Meshcraft – Text-to-3D and image-to-3D with selectable AI engines

https://meshcraft.xyz
2•otmardev•10h ago•0 comments

Show HN: Ruffle.rs brought back a 2012 Flash MMO to the modern web

https://oldschoolrealms.com/
5•crosschainer•11h ago•0 comments

Show HN: Swarm – Program a colony of 200 ants using a custom assembly language

https://dev.moment.com/
189•armandhammer10•2d ago•61 comments

Show HN: Smelt – Extract structured data from PDFs and HTML using LLM

https://github.com/akdavidsson/smelt
4•smeltcli•17h ago•0 comments

Show HN: Diamond – an interactive CLI for editing trees

https://github.com/justindmassey/diamond
3•justindmassey•18h ago•0 comments

Show HN: TeamShotsPro – AI team headshots from a selfie in 60 seconds

https://www.teamshotspro.com
2•Mvhaperen•13h ago•0 comments

Show HN: I built a daily game that tests if you can tell 1999 apart from 2005

https://yeartobeat.com/
3•FKJ•13h ago•1 comments