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.

The YAML document from hell (2023)

https://ruuda.nl/2023/the-yaml-document-from-hell
1•vismit2000•8s ago•0 comments

Ask HN: Which GitHub features are needed in a code forge before you can migrate?

1•pksunkara•1m ago•0 comments

Asahi Linux 7.1 Progress Report

https://asahilinux.org/2026/06/progress-report-7-1/
1•pantalaimon•3m ago•0 comments

AI models' values are different from most people's

https://www.economist.com/briefing/2026/06/25/ai-models-values-are-very-different-from-most-peoples
1•felixdoerp•5m ago•0 comments

Universal Path Converter

https://universalpathconverter.com/
1•ankitg12•6m ago•0 comments

How Do Products Like LLM Gateways/VPN Handle User Payments?

1•Maxshot•6m ago•0 comments

Ask HN: How do you provide your AI agents with access to credentials/secrets?

1•pietz•7m ago•0 comments

Alternative for Germany's academic reform plans

https://www.nature.com/articles/d41586-026-01496-7
1•i-blis•9m ago•0 comments

FocusGolf – a swing-analysis app I'm building as an HCP36 amateur

https://play.google.com/store/apps/details?id=com.mode.golf.app&hl=en
1•dmitrijsc•12m ago•0 comments

Pine64 launch $50 smart speaker for Home Assistant tinkerers

https://www.omgubuntu.co.uk/2026/06/pine64-pinevoice-riscv-smart-speaker-launch
7•edward•13m ago•1 comments

Apple accelerates app development with new intelligence frameworks

https://www.apple.com/in/newsroom/2026/06/apple-aids-app-development-with-new-intelligence-framew...
1•adithyaharish•14m ago•0 comments

Trap–Bath Split

https://en.wikipedia.org/wiki/Trap%E2%80%93bath_split
1•YeGoblynQueenne•14m ago•0 comments

I built a native iOS video player for local media and SMB/Plex

https://apps.apple.com/us/app/lux-video-player-hd-media/id6762520464
1•Moonarkh•21m ago•0 comments

AI Engineering Roadmap

https://aiengineeringfromscratch.com/prereqs.html
1•rohitghumare•22m ago•0 comments

Using a local iPhone MCP server to plan Apple Watch workouts with Codex

https://bernhardhering.de/blog/ask-my-health-codex-workout-plan/
1•boernei•24m ago•0 comments

AI Agent vs. Cron

1•vasanthps•24m ago•0 comments

Show HN: LokalBot – meetings, notes, and autocomplete that never leave your Mac

https://www.lokalbot.com/
1•stevyhacker•24m ago•0 comments

GLM-5.2's Code Reviews Are Only as Good as Your Prompt

https://blog.kilo.ai/p/glm-52s-code-reviews-are-only-as
2•justiceforsaas•28m ago•0 comments

Why averaging LLM benchmark scores is fundamentally broken

https://arxiv.org/abs/2605.11205
1•testofschool•30m ago•0 comments

Perseverance Finds Complex Organic Matter on Mars

https://www.sci.news/space/perseverance-complex-organic-matter-mars-14882.html
2•wasting_time•30m ago•0 comments

Ditching Claude for OpenCode and OpenRouter

https://www.ianwootten.co.uk/2026/07/01/ditching-claude-for-opencode-and-openrouter/
3•jandeboevrie•31m ago•0 comments

Show HN: Bol.ai – Extract structured data from Bills of Lading

https://bol.ai/
1•dutchcode•31m ago•0 comments

Show HN: Pokayoke – turn repo conventions into deterministic checks for agents

https://pokayoke.codes
1•sarreph•33m ago•0 comments

How can we make Twitter friendlier

4•RoastSlop•42m ago•1 comments

Dynamo Draughts. 10x10 game for DOS, open source

https://orac81.itch.io/dynamo-draughts
2•orac81•42m ago•0 comments

Show HN: Petabyte-scale storage for AI agent sandboxes

https://twitter.com/aniketmaurya/status/2072249879573754225
3•theaniketmaurya•45m ago•1 comments

Solar Panels: AC vs. DC (2008)

https://rimstar.org/renewnrg/solarpwr.htm
1•tetris11•46m ago•0 comments

Google Gemini Claims to be "structurally protective" of Donald Trump

https://www.thatprivacyguy.com/blog/google-ai-guardrails-protect-trump/
3•AlexanderHanff•47m ago•1 comments

Single Dose of Frog-Derived Gut Bacterium Eradicates 100% of Tumors in Mice

https://www.thefocalpoints.com/p/new-study-frog-derived-gut-bacterium
3•mpweiher•48m ago•0 comments

Vast Majority support clampdown on social media to protect children

https://www.ippr.org/media-office/vast-majority-support-clampdown-on-social-media-to-protect-chil...
1•vrganj•54m ago•0 comments