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.

Are you better than the screen watchers?

https://sailsandcommas.com/2026/05/30/are-you-better-than-the-screen-watchers/
1•Curiositry•8m ago•0 comments

Cloudflare launched self-managed OAuth for all

https://blog.cloudflare.com/oauth-for-all/
1•terryds•9m ago•1 comments

Libaui – Tk clone in XCB and C

https://github.com/onanaxm/libaui
2•onuelito•11m ago•0 comments

Zombie unicorns are haunting Silicon Valley

https://www.economist.com/business/2026/06/21/zombie-unicorns-are-haunting-silicon-valley
1•andsoitis•11m ago•1 comments

Electronics can now be printed onto living tissues

https://www.economist.com/science-and-technology/2026/06/24/electronics-can-now-be-printed-onto-l...
1•andsoitis•13m ago•0 comments

Scbkr – an owner-signed responsibility-chain workbench for local LLMs

https://github.com/HIJO790401/scbkr-local-responsibility-model
1•look888•15m ago•0 comments

SystemVerilog

https://en.wikipedia.org/wiki/SystemVerilog
1•handfuloflight•20m ago•0 comments

Accidental Anonymity

https://macwright.com/2026/06/24/accidental-anonymity
1•maxutility•22m ago•0 comments

Mr. Big (Police Procedure)

https://en.wikipedia.org/wiki/Mr._Big_(police_procedure)
1•killingtime74•24m ago•0 comments

Duolicious – Open-source dating app

https://github.com/duolicious/duolicious
2•roger_penrose•24m ago•0 comments

TronBrowser is an open-source, privacy-first, AI-native web browser

https://tronbrowser.dev/
1•buffer_overlord•26m ago•1 comments

Remembering the life and artwork of Ron Spears

https://magic.wizards.com/en/news/feature/remembering-the-life-and-artwork-of-ron-spears
1•WalterGR•36m ago•0 comments

Writers and Drugs

https://lithub.com/are-writers-intrinsically-vulnerable-to-alcohol-and-drugs/
3•dang•37m ago•1 comments

The effortless genius of Super Mario 64

https://ravi64.com/messi-effortless-genius-super-mario-64/
1•merlioncity•40m ago•0 comments

Paintings by Adolf Hitler

https://en.wikipedia.org/wiki/Paintings_by_Adolf_Hitler
3•num42•43m ago•0 comments

Bible as RAG Database

https://www.crosscanon.com/
23•jacksonastone•45m ago•11 comments

Bitcoin hits 20-month low as market sentiment sours

https://www.ft.com/content/41d1da8f-e1a8-4953-9d89-a8caa84cd26c
6•1vuio0pswjnm7•45m ago•0 comments

The Microsoft Store on Windows 11 is great now (2025)

https://www.windowscentral.com/microsoft/windows-11/the-microsoft-store-on-windows-11-is-actually...
1•kristianp•46m ago•0 comments

Golden Boot – Club Impact Tracker

https://golden-boot-club-impact.vercel.app/
2•saq7•49m ago•1 comments

Tech companies dealing with data center protests locally fighting losing battle

https://fortune.com/2026/06/22/data-center-opposition-goes-national-despite-only-8-percent-living...
2•1vuio0pswjnm7•49m ago•0 comments

Exploring the internal representations of Pangram 3.3.2

https://www.pangram.com/pangram-space
8•krackers•51m ago•1 comments

The Harvard Data Nerd Defending America's Goal at the World Cup

https://www.wsj.com/sports/soccer/matt-freese-goalkeeper-usa-world-cup-495d3f0a
1•pondsider•51m ago•0 comments

The Carwash Problem: Why Your IT Organization Isn't Ready for AI-Generated Code

https://atkatana.com/blog/hyper-loops-draft.html
1•atkatana•54m ago•0 comments

World-first burn treatment performed at leading Canadian hospital

https://www.hamiltonhealthsciences.ca/share/news-world-first-burn-15june26/
2•BiraIgnacio•55m ago•0 comments

Europe Became the World Champion of Heat Deaths

https://maartenboudry.substack.com/p/how-europe-became-the-world-champion
1•osnium123•1h ago•0 comments

Calling everything AI-generated is lazy

https://00f.net/2026/06/25/stop-calling-everything-ai-generated/
4•anotherevan•1h ago•1 comments

RealTalk – a growth agent that pushes Slack/SMS alerts instead of a dashboard

https://www.realtlkk.com/
1•Quise•1h ago•0 comments

Noctis, an open-source music player for local libraries

https://noctisapp.cc/
1•heartached•1h ago•0 comments

Ending All Respiratory Infections

https://blog.interceptfund.com/p/ending-respiratory-infections
27•EthanFantl•1h ago•5 comments

A Special Wireless-Free Nikon Camera Is Publicly Available for the First Time

https://petapixel.com/2026/06/24/a-special-wireless-free-nikon-camera-is-publicly-available-for-t...
2•HardwareLust•1h ago•1 comments