frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Show HN: AgentShield SDK – Runtime security for agentic AI applications

https://pypi.org/project/agentshield-sdk/
2•iamsanjayk•1y ago
Hi HN,

We built AgentShield, a Python SDK and CLI to add a security checkpoint for AI agents before they perform potentially risky actions like external API calls or executing generated code.

Problem: Agents calling arbitrary URLs or running unchecked code can lead to data leaks, SSRF, system damage, etc.

Solution: AgentShield intercepts these actions:

- guarded_get(url=...): Checks URL against policies (block internal IPs, HTTP, etc.) before making the request.

- safe_execute(code_snippet=...): Checks code for risky patterns (os import, eval, file access, etc.) before execution.

It works via a simple API call to evaluate the action against configurable security policies. It includes default policies for common risks.

Get Started:

Install: pip install agentshield-sdk

Get API Key (CLI): agentshield keys create

Use in Python: from agentshield_sdk import AgentShield # shield = AgentShield(api_key=...) # await shield.guarded_get(url=...) # await shield.safe_execute(code_snippet=...)

Full details, documentation, and the complete README are at <https://pypi.org/project/agentshield-sdk/>

We built this because securing agent interactions felt crucial as they become more capable. It's still early days, and we'd love to get your feedback on the approach, usability, and policies.

Comments

subhampramanik•1y ago
Looks interesting -- Does it work like a wrapper on top of OpenAI specs? Like, can we just replace the OpenAI package with this, and it's fully integrated?
iamsanjayk•1y ago
Hey, thanks for asking! Good question.

AgentShield isn't a wrapper around the OpenAI package, so you wouldn't replace openai with it. Think of AgentShield as a separate safety check you call just before your agent actually tries to run a specific risky action.

So, you'd still use the openai library as normal to get your response (like a URL to call or code to run). Then, before you actually use httpx/requests to call that URL, or exec() to run the code, you'd quickly check it with shield.guarded_get(the_url) or shield.safe_execute(the_code).

Currently, It focuses on securing the action itself (the URL, the code snippet) rather than wrapping the LLM call that generated it.

New Tariffs Cover 99.4% of U.S. Imports. Your Plan Doesn't

https://medium.com/@alanscottencinas/new-tariffs-cover-99-4-of-u-s-imports-your-plan-doesnt-cb3a7...
1•encinas88•1m ago•0 comments

Code mode can help smaller LLM models

https://instavm.io/blog/how-code-mode-can-help-smaller-llm-models
1•mkagenius•4m ago•0 comments

Show HN: The TERSE state language and protocol

https://github.com/terse-lang/terse
1•infiniteAdmin•5m ago•1 comments

WICG Proposal Draft: Web Smart Card API

https://wicg.github.io/web-smart-card/
1•ubavic•6m ago•0 comments

Geometric Median

https://en.wikipedia.org/wiki/Geometric_median
1•rzk•7m ago•0 comments

SIMD within a bignum in pure Python

https://www.da.vidbuchanan.co.uk/blog/python-swar.html
1•fanf2•8m ago•0 comments

Click to Pray, Click to Leak: The Pope's Official App Exposes 700K+ User Emails

https://bobdahacker.com/blog/click-to-pray
2•OuterVale•12m ago•0 comments

Sharecoin – GPU fork of Bitcoin with a randomness beacon

https://github.com/TVHeroes/Sharecoin
2•TVHeroes•20m ago•0 comments

I'm Running a Programming Contest

https://eieio.games/blog/im-running-the-icfp-programming-contest/
1•signa11•21m ago•0 comments

The interesting part of an Agent Harness is what you add on top

https://www.martinrichards.me/post/whats_inside_the_harness/
1•3uler•22m ago•1 comments

Why a philosopher turned down Anthropic (AI industry asking the wrong questions)

https://www.ft.com/content/bdb3b820-905b-431e-82c0-386535755af1
1•bishopsmother•22m ago•0 comments

Memory Safety's Hardest Problem

https://matklad.github.io/2026/07/20/memory-safety-hardest-problem.html
1•miniBill•25m ago•0 comments

Continuation-Centric Computing with Arca

https://www.usenix.org/conference/osdi26/presentation/srivatsan
1•matt_d•26m ago•0 comments

Vortex – a Bluetooth-first alternative to KDE Connect

https://github.com/zoir-dev/vortex
2•zoyirjon•28m ago•0 comments

Ask HN: Teach Me Something New

1•chistev•28m ago•1 comments

Trump lashes out at 'fake news' jokes about 2028 presidential run, in press gala

https://www.france24.com/en/americas/20260725-trump-lashes-out-at-fake-news-and-jokes-about-2028-...
1•JPLeRouzic•28m ago•0 comments

Attorney General Bonta Secures Deal Halting Warner Bros

https://oag.ca.gov/news/press-releases/attorney-general-bonta-secures-deal-halting-warner-bros-pa...
1•01-_-•29m ago•0 comments

Australia's Next Target in the War on Kids Online: Your VPN

https://www.techdirt.com/2026/07/20/australias-next-target-in-the-war-on-kids-online-your-vpn/
1•01-_-•29m ago•0 comments

Against Slop: An Interview with Meghan O'Gieblyn

https://substack.nybooks.com/p/against-slop-an-interview-with-meghan
1•Michelangelo11•31m ago•0 comments

QBE Build Script for Windows

https://codeberg.org/codemplasi/QBE-Compiler-Backend-for-windows
1•triilman•32m ago•1 comments

A Rubyist in Go Land: Your First Pokémon API Client

https://baweaver.com/writing/2026/07/24/a-rubyist-in-go-land-your-first-pokemon-api-client/
1•thunderbong•33m ago•0 comments

The Last Honest Movie Star [video]

https://www.youtube.com/watch?v=1leVuo5M6w4
2•7777777phil•33m ago•0 comments

Amazon cuts some jobs in its artificial general intelligence unit

https://www.cnbc.com/2026/07/22/amazon-lays-off-some-employees-in-its-agi-unit.html
5•mgh2•35m ago•0 comments

Show HN: TS Compiler Knowledge Graph reducing AI tokens about 90%

https://github.com/samchon/ttsc/tree/master/packages/graph
2•autobe•37m ago•0 comments

Canadian woman who was NATO intern arrested in Belgium on spying charge

https://www.reuters.com/world/china/canadian-woman-who-was-nato-intern-arrested-belgium-spying-ch...
4•doener•37m ago•0 comments

Rhythm 0

https://en.wikipedia.org/wiki/Rhythm_0
3•hopelessluca•39m ago•0 comments

General Resolution: LLM Usage in Debian

https://www.debian.org/vote/2026/vote_002
4•ckastner•44m ago•0 comments

MouthPad is now available – control devices with your tongue [video]

https://www.youtube.com/watch?v=xReyIF5pwRo
3•Barbing•46m ago•1 comments

Lucky 13 Starship sends out satellites and stays intact

https://cosmiclog.com/2026/07/24/lucky-13-starship-sends-out-satellites-and-stays-intact/
2•ColinWright•50m ago•1 comments

When Notion Becomes Too Much and Obsidian Not Enough

https://rizz.dev/blog/guides/notion-versus-obsidian
1•rizzdev•52m ago•1 comments