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

Claude Code sometimes hallucinates user messages

https://www.lesswrong.com/posts/F2jg34PYtwWZMvzme/edward-james-young-s-shortform?commentId=JvQkqc...
2•cubefox•31s ago•0 comments

The New York Times is wrong about the birth rate

https://www.theargumentmag.com/p/the-new-york-times-is-wrong-about
1•RickJWagner•2m ago•0 comments

When Your Digital Life Vanishes

https://www.newyorker.com/magazine/2026/04/27/when-your-digital-life-vanishes
1•littlexsparkee•2m ago•0 comments

5 days No AI. An AI detox challenge

https://zymacs.github.io/post/five-days-no-ai/
1•kernzistor45•3m ago•1 comments

Elon Musk's Mistaken Call for a 'Universal High Income'

https://reason.com/2026/04/17/elon-musks-mistaken-call-for-a-universal-high-income/
1•RickJWagner•3m ago•0 comments

ggsql: A Grammar of Graphics for SQL

https://opensource.posit.co/blog/2026-04-20_ggsql_alpha_release/
2•thomasp85•4m ago•1 comments

Show HN: Free Incident War Rooms for Team Training SRE/DevOps

https://youbrokeprod.com/
1•cdnsteve•5m ago•0 comments

PostmarketOS Conference

https://postmarketos.org/conference/
1•birdculture•6m ago•0 comments

Show HN: Native desktop app for Google Tasks

https://kitetasks.com
1•tocopoco•7m ago•1 comments

Robots beat human records at Beijing half-marathon

https://techcrunch.com/2026/04/19/robots-beat-human-records-at-beijing-half-marathon/
2•Brajeshwar•8m ago•0 comments

Compression is all you need: Modeling Mathematics

https://arxiv.org/abs/2603.20396
1•ggraphilia•8m ago•0 comments

Show HN: Lightflare – Self-hosted AI agent server for teams

https://github.com/shzlw/lightflare
1•yuegui•8m ago•0 comments

Backblaze Account Takeover

https://fyr.io/post/backblaze-account-takeover
1•MD87•9m ago•0 comments

Rust adoption stalls amid shift in memory-safe programming trends

https://www.developer-tech.com/news/rust-adoption-stalls-memory-safe-programming-trends/
2•gpvos•9m ago•0 comments

Envelops – self-hosted open-source dotenvx Ops – full CLI compatibility

https://envelops.dev
1•itsjustmechris•11m ago•0 comments

Something unexpected: Sunbathers live longer

https://www.health.harvard.edu/blog/heres-something-unexpected-sunbathers-live-longer-201606069738
1•bilsbie•13m ago•0 comments

Why nearly every farmer who grows these Chile peppers is a woman

https://text.npr.org/g-s1-116759
2•mooreds•13m ago•0 comments

Extra minutes of morning sunlight before 10 a.m. improves sleep quality

https://twitter.com/BlueLightDiet/status/2045965784208601339
2•bilsbie•13m ago•1 comments

SCE Core – a state-evolution engine for explainable AI reasoning

https://github.com/yanixkz/sce-core
1•yanixkz•15m ago•1 comments

Judge sides with ICE tracker creators in DHS/DOJ First Amendment lawsuit

https://www.engadget.com/apps/judge-sides-with-creators-of-banned-ice-trackers-who-allege-dhs-and...
9•speckx•15m ago•0 comments

Strengthening your network security with APNIC's products and tools

https://blog.apnic.net/2026/04/20/strengthening-your-network-security-with-apnics-products-and-to...
1•8organicbits•16m ago•0 comments

I Build with GenAI Now

https://www.jjude.com/tech-notes/build-with-genai-tasks/
1•jjude•16m ago•0 comments

Amazon customers furious as delivery drones drop boxes from 10 feet in the air

https://nypost.com/2026/04/17/lifestyle/amazon-customers-claim-delivery-drones-are-damaging-orders/
3•smurda•17m ago•0 comments

I built a business idea validator: what will kill it, not just what sounds good

https://ismyideaanygood.vercel.app
1•PD_Coder•18m ago•0 comments

The 'Google for AI Agents' Is Coming – and It's Being Built Outside Big Tech

https://superai.systems/
1•joshuabellew•18m ago•1 comments

Build AI evals from real failures

https://latitude.so/blog/annotation-queue-bridge
1•paulaq•19m ago•0 comments

Show HN: Slop-O-Meter, an experimental tool to detect slopware projects

https://slop-o-meter.dev/
1•pscanf•20m ago•0 comments

US appeals court declares 158-year-old home distilling ban unconstitutional

https://www.reuters.com/legal/government/us-appeals-court-declares-158-year-old-home-distilling-b...
1•geox•21m ago•0 comments

Accept: Text/Markdown

https://acceptmarkdown.com/
1•bretthopper•24m ago•0 comments

Creusot 0.11.0: VerifyThis Winner

https://devlog.creusot.rs/2026-04-20/
1•syrak•24m ago•0 comments