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.

Should AI labs be treated like the owners of dangerous animals?

https://www.economist.com/science-and-technology/2026/08/06/should-ai-labs-be-treated-like-the-ow...
1•reasonableklout•1m ago•0 comments

What counts as cooking? In defense of the store-bought sauce

https://iza.ac/posts/2026/06/what-counts-as-cooking/
1•mooreds•4m ago•0 comments

When Matt Taibbi Met Mike Benz

https://agentsofinfluence.substack.com/p/when-matt-taibbi-met-mike-benz
1•hn_acker•6m ago•0 comments

Classifying Capabilities (Extended Version)

https://arxiv.org/abs/2607.24504
1•matt_d•14m ago•0 comments

Annessaia – a sandboxed WASM app runtime with its own UI toolkit

https://github.com/vm100900/annessaia
1•virenmane•14m ago•0 comments

Is the IDE Dead?

https://textlog.cc/post/251
2•s-xyz•22m ago•0 comments

Solving Legal Problems with Dags

https://lexifina.com/blog/solving-legal-problems-with-dags
2•alansaber•23m ago•0 comments

Project Lana attempts to formalize hard to understand Mochizuki's IUT in Lean

https://anabelian.org/
2•ur-whale•24m ago•1 comments

Simplest CMS you'll ever need. Manage content right in your GitHub repository

https://pagescms.org/
3•Leftium•27m ago•0 comments

Atlas of Surveillance

https://www.atlasofsurveillance.org/
1•bookofjoe•27m ago•0 comments

The worlds longest song makes a chord change

https://www.msn.com/en-us/music/news/the-worlds-slowest-organ-concert-makes-a-chord-change/vi-AA2...
2•thatxliner•29m ago•0 comments

Am I the problem? Interviewing another team to find out

https://www.macchaffee.com/blog/2026/am-i-the-problem/
2•birdculture•45m ago•0 comments

A quick look at zero-knowledge proofs

https://bernsteinbear.com/blog/zkp/
3•tekknolagi•46m ago•1 comments

First JDK 28 Early-Access Build Including JEP 401: Value Objects

https://jdk.java.net/28/
1•mfiguiere•47m ago•0 comments

Kona EBMS – energy based models

https://logicalintelligence.com/kona-ebms-energy-based-models
1•binyu•47m ago•0 comments

Laws of Development

https://gavin.wtf/blog/laws-of-development/
2•gavino•50m ago•0 comments

Energy-Based Models Explained: The AI Beyond Next-Token [video]

https://www.youtube.com/watch?v=NYmXYF8A3Q4
1•binyu•53m ago•0 comments

Software as Executable Domain Knowledge

https://swipeleft.ai/servicematch/papers/software-as-executable-domain-knowledge/
3•jamesrbockrath•54m ago•0 comments

Graphify – Less token use for Claude Code

https://github.com/Graphify-Labs/graphify
2•potatobox•56m ago•0 comments

X changes revenue sharing to reward original content

https://twitter.com/XCreators/status/2085835082166653393
2•judah•1h ago•0 comments

Show HN: Agent Tunnels – coding agents collaborate across companies

https://agenttunnels.com/
2•lakshman111•1h ago•2 comments

Chilean Supreme Court ruling on the protection of brain activity 2023

https://pmc.ncbi.nlm.nih.gov/articles/PMC10929545/
2•rmason•1h ago•1 comments

Show HN: Tocic – Chatbot table of content browser extension

https://addons.mozilla.org/en-US/firefox/addon/tocic-chatbot-table-of-content/
1•a_c•1h ago•0 comments

Ex-Gawker editor AJ Daulerio on life after addiction

https://www.theguardian.com/media/ng-interactive/2026/aug/06/aj-daulerio-gawker-sobriety-addiction
2•Michelangelo11•1h ago•0 comments

Biomes – Exotic Matter Chapter 1 Now Available (Indie Mmorpg)

https://www.glitch.fun/games/42de534c-600f-4228-af9e-b69faef94cce/play
1•bingewave•1h ago•0 comments

How and Why I Stopped Buying New Laptops (2020)

https://solar.lowtechmagazine.com/2020/12/how-and-why-i-stopped-buying-new-laptops/
1•downbad_•1h ago•2 comments

Archive of Animal Photography Reveals 18,000 Species and Counting

https://www.smithsonianmag.com/science-nature/this-amazing-archive-of-animal-photography-reveals-...
3•sohkamyung•1h ago•0 comments

Right to Repair–For Your Body

https://fourthievesvinegar.org/
6•_____k•1h ago•0 comments

Show HN: Dirblock+envblock – tiny whitelist guards for dirs and env secrets

https://github.com/roku-oss/dirblock
2•pfrench42•1h ago•1 comments

Show HN: More Branchless Optimization

https://sites.google.com/view/david-kooi/blog/branchless_in_c
1•kooi•1h ago•0 comments