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.

No Joke: Scientists Launch OnlyFans Account to Raise Money for Marmot Project

https://cowboystatedaily.com/2026/07/30/scientists-turn-to-onlymarms-videos-of-marmots-on-onlyfan...
1•Bender•1m ago•0 comments

Ukraine's Strike on Iranian Ship Shows How Two Wars Could Merge and Spiral

https://www.nytimes.com/2026/07/31/us/politics/iran-ukraine-war.html
1•mapping365•1m ago•0 comments

Not just Neanderthals: Ghost lineage in Africa left its mark on our DNA

https://arstechnica.com/science/2026/07/not-just-neanderthals-ghost-lineage-in-africa-left-its-ma...
1•Bender•2m ago•0 comments

Reddit keeps its DMCA fight over Google search results alive

https://arstechnica.com/tech-policy/2026/07/reddit-keeps-weird-dmca-lawsuit-against-web-scraper-a...
1•Bender•3m ago•0 comments

Gemini 2.5 Pro and Gemini 3 Flash Deprecated – GitHub Changelog

https://github.blog/changelog/2026-07-31-gemini-2-5-pro-and-gemini-3-flash-deprecated/
1•smokeeaasd•6m ago•0 comments

Hacker News, GitHub and AI

https://pelle.io/posts/hackernews-github-ai/
1•pellepelster•9m ago•1 comments

The CIA Found a Soviet Ghost Station Full of Cold War Secrets

https://www.popularmechanics.com/military/a73274458/batmans-skyhook-cia-mission/
1•RickJWagner•9m ago•0 comments

Mary Celeste

https://en.wikipedia.org/wiki/Mary_Celeste
2•thunderbong•10m ago•0 comments

Inspect Claude Code sessions with lnav

https://blog.disintegrator.dev/posts/lnav-claude-code/
1•disintegrator•11m ago•0 comments

Judge denies X.AI's attempt to stop Minnesota's AI nudification ban

https://www.ag.state.mn.us/Office/Communications/2026/07/31_xAI.asp
1•slowin•13m ago•0 comments

Same-Day Delivery, Same-Day Detonation: Wildberries' Hit by a Ukrainian Drone

https://jeffreylminch.substack.com/p/same-day-delivery-same-day-detonation
2•rmason•16m ago•0 comments

How A Yale AI-cheating dispute became a 13-count federal lawsuit

https://arstechnica.com/tech-policy/2026/07/how-a-yale-ai-cheating-dispute-became-a-13-count-fede...
1•nickff•19m ago•0 comments

If you don't know how compilers work, then you don't know how computers work

https://steve-yegge.blogspot.com/2007/06/rich-programmer-food.html
2•lemonberry•20m ago•2 comments

Evaluating Agents across Supabase

https://supabase.com/evals
2•bhkdotdev•21m ago•1 comments

Show HN: Nudge: A desktop productivity pet app

https://github.com/itsmy-bday/nudge
1•eddie-b•24m ago•0 comments

GrapheneOS vs DeniableOS

https://deniable.io/blog/grapheneos-vs-deniableos
1•Cider9986•25m ago•1 comments

The unintended consequences of LLMs as a labor-augmenting technology in science

https://arxiv.org/abs/2607.17397
1•aanet•25m ago•1 comments

Show HN: I Built a (Country) Geography Guessing Game

https://www.whatcountryisit.com/
1•eightturn•26m ago•0 comments

You Should Be Writing By Hand

https://lauriepenny.substack.com/p/you-should-be-writing-by-hand
2•andyjohnson0•27m ago•0 comments

Smevals – a small eval suite for evaluating models, prompts, and harnesses

https://primeradiant.com/blog/2026/smevals.html
1•toomuchtodo•29m ago•1 comments

How to Create Engaging Udemy Courses That Students Love

https://wealthblueprinthq.substack.com/p/how-to-create-engaging-udemy-courses
1•trimoxer•30m ago•0 comments

Minnesota OK's "open" meetings behind TSA checkpoint

https://papersplease.org/wp/2026/05/22/minnesota-oks-open-meetings-behind-tsa-checkpoint/
1•Jimmc414•35m ago•0 comments

Bend – A high-level language running on GPUs

https://xcancel.com/antibot/captcha
2•MrBuddyCasino•35m ago•0 comments

How 'America First' Stance Could Shut U.S. Scientists Out

https://www.propublica.org/article/federal-science-grants-russell-vought-omb
3•Jimmc414•37m ago•0 comments

CircuitProver: Agentic Lean 4 Theorem Proving for Hardware Verification

https://arxiv.org/abs/2607.27259
1•Jimmc414•39m ago•0 comments

Surveillance and Your Soul, or Why Privacy Is Essential

https://unsigned.io/articles/2022_02_02_surveillance-and-your-soul-or-why-privacy-is-essential.html
1•Cider9986•43m ago•0 comments

We're 15-year-olds tired of switching study apps, so we built our own

https://reviscio.com
2•Luka_Takki•48m ago•3 comments

If you don't want Apple reject your app, protect yourself

https://www.apprejectkit.com/
1•jonvolio•49m ago•0 comments

The Social Construct of Privacy

https://medium.com/@despina.g127/the-social-construct-of-privacy-f469f1314816
1•vednig•50m ago•0 comments

Radar – Your Messages. Your Bitcoin. Together, at Last

https://radar.chat/
1•Cider9986•51m ago•0 comments