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.

Vincent's parents 'never say he's good enough' so he turned to a couple online

https://www.bbc.com/news/articles/cpq3dnr5vlzo
1•breve•2m ago•0 comments

The whirlwind 24 hours that led to export controls on Anthropic

https://www.politico.com/news/2026/06/13/inside-the-whirlwind-24-hours-that-led-the-white-house-t...
1•ls612•4m ago•0 comments

Surface Data vs. Deep Data [video]

https://www.youtube.com/watch?v=vk6lgHjjGp8
1•zetamax•7m ago•0 comments

The Siren Song of Illness

https://www.nybooks.com/articles/2026/06/25/the-siren-song-of-illness-master-of-contradictions-je...
1•t0lo•10m ago•0 comments

The Missing Infrastructure Between AI Agents and the EVM

https://blog.bridgexapi.io/the-missing-infrastructure-between-ai-agents-and-the-evm
1•Bridgexapi•10m ago•0 comments

Fable: Two edges of one opinion, on a model switched off

https://rebraining.org/fable
1•Jakko-KAAMOS•12m ago•0 comments

'Tell Him He's a Piece of Shit': Meta's New AI Unit Is a Total Mess

https://www.wired.com/story/mark-zuckerberg-meta-employee-meeting-interrupt-ai/
4•momentmaker•17m ago•0 comments

Let's Destroy American Science

https://nasawatch.com/policy/lets-destroy-american-science/
4•voxadam•21m ago•0 comments

Russian families use AI to 'resurrect' loved ones killed in Ukraine

https://www.bbc.com/news/articles/cwy24v72n19o
3•breve•22m ago•0 comments

Monero Inflation Checker

https://www.moneroinflation.com/
1•Cider9986•25m ago•0 comments

Switzerland to vote on plan to cap population at 10 million

https://www.bbc.com/news/articles/cx23kz7e76po
2•breve•27m ago•0 comments

4 things to know about the new sunscreen ingredient the FDA approved

https://www.npr.org/2026/06/13/nx-s1-5856385/sunscreen-skin-protection-bemotrizinol
11•mikhael•30m ago•0 comments

The "Best" HN Comments

https://news.ycombinator.com/bestcomments
2•embedding-shape•32m ago•0 comments

There is no such thing as an AI 'artist'

https://www.spiked-online.com/2026/06/07/there-is-no-such-thing-as-an-ai-artist/
3•mikelgan•34m ago•1 comments

The AI supply chain is a software supply chain with new failure modes

https://blog.r-lopes.com/newsletter/2026-06-03
2•dovelome•35m ago•0 comments

Fable 5: They switched off my AI mid-build. The timeline is the story

https://medium.com/@alirezarezvani/fable-5-anthropic-and-us-gorvernment-how-ai-export-controls-ju...
2•jungard•35m ago•0 comments

FDA OKs first new sunscreen ingredient in more than 25 years

https://apnews.com/article/sunscreen-fda-bemotrizinol-ingredient-uva-protection-9b9c7e04b418b3c9c...
7•marc__1•36m ago•1 comments

The Future of Software Engineering Is Here; It's Just Not Evenly Distributed

https://twitter.com/jmugan/status/2065962078322438524
2•jmugan•40m ago•0 comments

Goldman and Morgan Stanley to Pocket $100M Each in SpaceX IPO Fees

https://www.wsj.com/livecoverage/spacex-ipo-stock-market-06-12-2026/card/goldman-and-morgan-stanl...
3•vismit2000•40m ago•0 comments

Color Photos of Stalin-Era Soviet Union Taken by a US Diplomat

https://rarehistoricalphotos.com/stalin-era-soviet-union-pictures-martin-manhoff/
3•Cider9986•42m ago•0 comments

Anthropic's Economic Policy Framework [pdf]

https://www-cdn.anthropic.com/files/4zrzovbb/website/9ea607a5dd67c168093829b701f3a0a6d21156d5.pdf
2•jonbaer•42m ago•0 comments

Policy on the AI Exponential

https://www.anthropic.com/policy-on-the-ai-exponential/epf
2•jonbaer•43m ago•0 comments

10th Gen Honda Civic Updates Are Signed with AOSP Test Keys

https://juniperspring.org/posts/honda-evil-valet/
3•librick•51m ago•1 comments

The Difference Between Rest and Idleness

https://idle.news/blog/on-the-difference-between-rest-and-idleness/
3•vinhnx•57m ago•0 comments

We're combatting AI scams with security, legislation and more

https://blog.google/innovation-and-ai/technology/safety-security/combatting-ai-scams/
3•gnabgib•57m ago•0 comments

XP-era Windows spotted haunting London's driverless railway

https://www.theregister.com/offbeat/2026/06/13/xp-era-windows-spotted-haunting-londons-driverless...
3•Bender•59m ago•0 comments

UK digital ID gets brain trust to 'challenge' ministers on policy

https://www.theregister.com/public-sector/2026/06/12/uk-digital-id-gets-brain-trust-to-challenge-...
3•Bender•1h ago•0 comments

Google fires sueball at alleged Chinese phishers over AI-powered fraud ops

https://www.theregister.com/security/2026/06/12/google-fires-sueball-at-alleged-chinese-phishers-...
3•Bender•1h ago•0 comments

Tracking Wind Patterns Using 3D Mercator Map

https://github.com/jamalrfordii-arch/Vanguard-Map
2•Lawyer24•1h ago•0 comments

Image Compression

https://www.makingsoftware.com/chapters/image-compression
3•vinhnx•1h ago•1 comments