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 Virtual Drug That Created Fortnite

https://comuniq.xyz/post?t=1339
1•01-_-•5m ago•0 comments

Chinese tech makes desalinating seawater cheaper than producing bottled water

https://www.scmp.com/news/china/science/article/3358699/chinese-tech-makes-desalinating-seawater-...
1•01-_-•7m ago•0 comments

IBM claims first sub-1 nanometer chip technology

https://arstechnica.com/gadgets/2026/06/ibm-claims-worlds-first-sub-1-nanometer-chip-technology/
1•surprisetalk•10m ago•0 comments

A new Plaza Accord for global currencies wouldn't work

https://www.economist.com/finance-and-economics/2026/06/30/a-new-plaza-accord-for-global-currenci...
1•petethomas•13m ago•0 comments

Ireland is big tech's lapdog – and that compromises its EU presidency

https://www.theguardian.com/commentisfree/2026/jun/30/ireland-big-tech-lapdog-eu-presidency-digit...
1•TMWNN•14m ago•0 comments

Single header Parser Combinators for C

https://github.com/steve-chavez/CParseC
1•steve-chavez•14m ago•0 comments

The fat cats of state government

https://scottvanvoorhis.substack.com/p/serving-the-public-or-serving-themselves
1•sbvanvoorhis•20m ago•0 comments

Vinton Cerf Is Retiring from Google

https://techcrunch.com/2026/06/30/the-father-of-the-internet-is-finally-retiring/
3•coloneltcb•23m ago•0 comments

Leash: Browser Without URL Bar

https://www.leash.ax
1•bergie•25m ago•0 comments

Russia's plan to drill in Arctic revives controversial theory of 'endless oil'

https://www.science.org/content/article/russia-s-plan-drill-superdeep-holes-arctic-revives-contro...
3•Tomte•27m ago•0 comments

Private equity fund investors turn to debt-like deals in downturn

https://www.ft.com/content/4675b8bb-4047-458a-be01-90c2aff29219
1•petethomas•27m ago•1 comments

Trump reports over $1.4B in income from crypto ventures

https://www.reuters.com/world/us/trump-reports-more-than-14-billion-income-crypto-ventures-2026-0...
6•kaycebasques•29m ago•1 comments

CertAlloc–An O(1) memory allocator formally verified -TLA+ and CBMC

https://github.com/thedevilhimselfcodes/CertAlloc
2•VindanaSandun•31m ago•0 comments

Found a great blog on Advance Threat Intel

1•RawatManish•32m ago•0 comments

America can switch off AI. Europe must switch gears before it's too late

https://www.euronews.com/my-europe/2026/06/30/america-can-switch-off-the-worlds-ai-europe-must-sw...
5•TMWNN•32m ago•0 comments

1M Context: Making Long-Horizon Tasks Stable and Practical

https://docs.z.ai/guides/llm/glm-5.2
1•Alien1Being•35m ago•0 comments

Ferrari and BMW join Tesla, China in switch from copper to cheaper aluminium

https://www.reuters.com/business/autos-transportation/ferrari-bmw-join-tesla-china-switch-copper-...
5•gostsamo•36m ago•0 comments

Fable 5 is greenlit to return

https://www.theverge.com/ai-artificial-intelligence/958964/anthropic-claude-fable-5-is-back
4•ExMachina73•41m ago•0 comments

Kaist AI reads mouse gestures as language

https://news.nate.com/view/20260701n15527?mid=n1101
1•geox•41m ago•0 comments

Combined LDL-C, Lp(a) and HsCRP Assessment Identifies Long-Term Risk of Ascvd

https://www.acc.org/latest-in-cardiology/journal-scans/2026/06/23/13/25/combined-ldl-c-lpa-and-hs...
1•brandonb•43m ago•0 comments

Claude Sonnet 5 is here

https://old.reddit.com/r/ClaudeAI/comments/1ujwggp/introducing_claude_sonnet_5_our_most_agentic/
3•adithyaharish•51m ago•0 comments

Redeploying Fable 5

https://www.anthropic.com/news/redeploying-fable-5
27•meetpateltech•55m ago•2 comments

The Internet Is Being Erased [video]

https://www.youtube.com/watch?v=-hAn2qDok_g
3•zvmaz•56m ago•1 comments

Taiwanese Go Deep into Debt to Amp 100% Stock Rally

https://www.bloomberg.com/news/articles/2026-06-23/tsmc-fueled-ai-frenzy-makes-taiwan-capital-of-...
2•mgh2•56m ago•0 comments

What Happened to the Fight for the Internet?

https://dustycloud.org/blog/what-happened-to-the-fight-for-the-internet/
2•HotGarbage•1h ago•0 comments

How to talk about "AI" without adding to the anthropomorphization

https://buttondown.com/maiht3k/archive/how-to-talk-about-ai-without-adding-to-the/
1•measurablefunc•1h ago•0 comments

Medicare starts covering GLP-1 drugs for weight loss

https://www.washingtonpost.com/health/2026/06/29/medicare-is-about-cover-glp-1-drugs-weight-loss-...
4•brandonb•1h ago•1 comments

Mojo Roadmap

https://mojolang.org/docs/roadmap/
1•Alien1Being•1h ago•0 comments

Stop Killing the Internet

https://www.stopkillingtheinternet.com/
3•HotGarbage•1h ago•0 comments

LLM-style scaling laws hold for sensor data

https://www.empirical.health/blog/llm-scaling-laws-hold-for-sensor-data/
2•brandonb•1h ago•0 comments