frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

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•12mo 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•12mo 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•12mo 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.

In 1987, a Student Set Out to Fix a Mac Problem. Ended Up Creating "Photoshop"

https://dailygalaxy.com/2026/04/knoll-brothers-photoshop-creation-story/
1•rmason•1m ago•0 comments

Creative Ideas Emerge to Make Data Centers Beautiful Amid NIMBY Backlash

https://x.com/i/trending/2049962384308289888
1•rmason•5m ago•0 comments

Australia wants to be first nation in the world to eliminate a cancer

https://www.bbc.com/news/articles/cd6w15vgp7lo
1•dabinat•5m ago•0 comments

Senate Panel Backs Guard Act, AI Age Verification Bill

https://reclaimthenet.org/senate-panel-backs-guard-act-ai-age-verification-bill
1•anonymousiam•6m ago•0 comments

FireImg Is Live

https://www.fireimg.com/demo/
1•mjnestor•10m ago•0 comments

Making Money (Or Not) Writing

https://countercraft.substack.com/p/on-making-money-or-not-writing
1•crescit_eundo•12m ago•0 comments

When a Species' Survival Hinges on Every Single Embryo

https://nautil.us/when-a-species-survival-hinges-on-every-single-embryo-1280373
2•Brajeshwar•12m ago•0 comments

Turning chess into a roguelike via design first principles

https://elbowgreasegames.substack.com/p/below-the-crown-launches-10
1•spacemarine1•15m ago•0 comments

I Built an L1 Blockchain Alone in Indonesia

https://paragraph.com/@satyakwikp@gmail.com/i-built-an-l1-blockchain-alone-heres-whats-actually-r...
1•sentrixchain•19m ago•0 comments

Linux averaging ~350 CVEs per day

https://crib.social/notice/B5rY6M7oM93li4Takq
1•gslepak•19m ago•0 comments

PDF Editify

https://pdfeditify.com/
1•Benish_Zulfiqar•20m ago•0 comments

True Frontier labs in India: What do we need to make it happen?

https://twitter.com/ponnappa/status/2050261742174028026
1•ridiculous_leke•22m ago•0 comments

Whimsical Animations Course Open House

https://courses.joshwcomeau.com/wham/open-house/00-introduction
9•SpyCoder77•22m ago•1 comments

Token spend breaks budgets – what next?

https://newsletter.pragmaticengineer.com/p/the-pulse-token-spend-breaks-budgets
1•keeda•25m ago•0 comments

Why Half Your Skills Expire Every Few Years

https://arpitbhayani.me/blogs/half-life/
1•jojobhai•25m ago•0 comments

I Have Lived in Your Camp

https://green.spacedino.net/i-have-lived-in-your-camp/
1•exceptione•26m ago•0 comments

AI is starting to beat doctors at making correct diagnoses

https://www.science.org/content/article/ai-starting-beat-doctors-making-correct-diagnoses
2•bglazer•26m ago•0 comments

The AI scaffolding layer is collapsing. LlamaIndex's CEO explains what survives

https://venturebeat.com/infrastructure/the-ai-scaffolding-layer-is-collapsing-llamaindexs-ceo-exp...
1•momentmaker•29m ago•0 comments

Running Doom on a Travel Router with Touch Screen

https://hackaday.com/2026/05/01/running-doom-on-a-travel-router-with-touch-screen/
1•momentmaker•30m ago•0 comments

The Case for Euthanizing Everyone at Age 65

https://marshallbrain.com/youve-had-your-turn-the-case-for-euthanizing-everyone-at-age-65
1•p2detar•31m ago•1 comments

Elegy for the Hereditary Peers

https://engelsbergideas.com/essays/elegy-for-the-hereditary-peers/
1•bookofjoe•32m ago•0 comments

GIMP 3.4 Will probably draw circles

https://fosstodon.org/@CmykStudent/116455148076446506
3•marcodiego•33m ago•0 comments

Claude Code completes the first level of several ARC AGI 3 games

https://arc-agi-runs.web.app/ls20-47471d22-3e73-4d9b-8ff7-972ef3ea5195/
1•dextersjab•33m ago•1 comments

Upcoming Blender Development Fund and AI Policies

https://www.blender.org/news/upcoming-blender-development-fund-and-ai-policies/
1•dagmx•35m ago•0 comments

Pentagon inks deals with AI giants, but not Anthropic

https://www.dw.com/en/pentagon-inks-deals-with-ai-giants-but-not-anthropic/a-77012715
3•herodoturtle•36m ago•0 comments

The anatomy of message execution after an API returns 200 OK

https://blog.bridgexapi.io/the-anatomy-of-message-execution-what-happens-after-your-api-returns-2...
1•Bridgexapi•37m ago•0 comments

Our poor sleeping habits are filling our brains with neurotoxins (2015)

https://qz.com/424120/our-poor-sleeping-habits-could-be-filling-our-brains-with-neurotoxins
1•downbad_•37m ago•1 comments

Show HN: Pixel-Perfect MaterialX in Blender and Three.js

https://ben3d.ca/blog/pixel-perfect-materialx-in-blender-and-threejs
1•bhouston•38m ago•0 comments

5x speedup of sqlglot (pure Python SQL parser) with mypyc

https://www.fivetran.com/blog/how-we-accelerated-transpilation-by-compiling-sqlglot-with-mypyc
1•captaintobs•41m ago•0 comments

Show HN: Arc Browser + Agents IDE

https://github.com/armantsaturian/ArcNext
1•ArmanTsaturian•42m ago•0 comments