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.

99% of My Website Traffic Is Bots

https://patronview.com/news/99-percent-of-my-website-traffic-is-bots/
2•petercooper•2m ago•0 comments

China-Free Batteries Made from Salt Are Finally Here

https://www.wsj.com/business/energy-oil/china-free-batteries-made-from-salt-are-finally-here-cc1c...
1•Vaslo•2m ago•0 comments

Show HN: LettersPractice – Teach your child to read with a modified SRS engine

https://letterspractice.com/
1•NiloCK•2m ago•0 comments

Ultraviolet Bird Photography

https://uvbirds.com/
1•EndXA•3m ago•0 comments

Wellsy: Health and Journal

https://www.wellsy.se/en
1•planting•3m ago•0 comments

Local AI Stack Planner

https://local-ai-models.ai/
1•krunck•3m ago•0 comments

Map of the Internet (2006)

https://xkcd.com/195/
1•basilikum•4m ago•0 comments

What Gives AI-Generated Text Away? Not Em Dashes [video]

https://www.youtube.com/watch?v=2jSU0mIzsMM
1•amichail•6m ago•0 comments

AI Threatens Our Economy and Democracy Itself

https://www.spiegel.de/international/business/was-marx-right-how-ai-threatens-our-economy-and-dem...
2•dmckinno•6m ago•0 comments

The 25 Objects That Explain America

https://www.nytimes.com/interactive/2026/08/04/opinion/museum-of-america.html
1•bookofjoe•7m ago•1 comments

Ford Fathom Is Here the $29,945 Electric Truck [video]

https://www.youtube.com/watch?v=4tYewY3P_CY
1•rawgabbit•7m ago•0 comments

Moonshot's AI model Kimi k3 breaks out of testing environment, researchers say

https://www.reuters.com/legal/litigation/chinese-startup-moonshots-ai-model-breaks-out-testing-en...
2•tom2026hn•8m ago•0 comments

Your Big Brain Wouldn't Be Possible Without Sugar

https://nautil.us/your-big-brain-wouldnt-be-possible-without-sugar-1283454
1•Brajeshwar•9m ago•0 comments

Ask HN: Claude Code Alternatives

1•salahadawi•9m ago•0 comments

How many paper folds would get you to the moon?

https://www.scientificamerican.com/article/how-many-paper-folds-would-get-you-to-the-moon/
1•beardyw•11m ago•1 comments

2026 Worst City for Bed Bugs Is Chicago, IL

https://www.orkin.com/press-room/chicago-worst-city-for-bed-bugs-again
1•speckx•11m ago•0 comments

From Handmade to AI-Made Websites: 20 Years in Website Development

https://www.xfive.co/blog/20-years-website-development
1•lubos76•13m ago•0 comments

I Built Remembr

https://apps.apple.com/us/app/remembr-shared-reminders/id6791300772
1•samltschenk•13m ago•2 comments

99.1% Totality

https://twitter.com/garrytan/status/2062760454649487491
1•gmays•14m ago•1 comments

As Reddit stock falls, CEO questions value of Google's AI Overviews

https://arstechnica.com/ai/2026/08/reddit-ceo-on-ai-overviews-were-still-looking-for-that-win-win/
3•mooreds•15m ago•0 comments

Official Dwarf Fortress Guide for Beginners (2026) [video]

https://www.youtube.com/watch?v=aRTwK8XR6kE
1•skibz•15m ago•0 comments

Bb Agent IDE

https://github.com/get-bb/bb
1•dfaiv•15m ago•1 comments

Mining Bitcoin with 2013 USB sticks, a Jalapeño and my phone (pure Python)

https://github.com/03012009BTC/miners-bitcoin-lottery
1•03012009BTC•16m ago•0 comments

Halcyon Video – a 3D video store for your media server

https://github.com/halcyon-video/halcyon-video
1•Gander5739•16m ago•0 comments

A Vision for Cargo

https://epage.github.io/blog/2026/08/cargo-vision/
1•birdculture•16m ago•0 comments

Do Personal AI Conversations Reduce Loneliness? [pdf]

https://www.ifo.de/DocDL/cesifo1_wp12882.pdf
1•mooreds•18m ago•0 comments

AI and the Enshittification Era with Cory Doctorow [video]

https://www.youtube.com/watch?v=-dAIJRjb-Bw
3•mooreds•18m ago•0 comments

AMD Instinct Coder Puts 8 MI325X GPUs Behind Local AI Coding

https://www.storagereview.com/news/amd-instinct-coder-puts-8-mi325x-gpus-behind-local-ai-coding-c...
1•galaxyLogic•19m ago•0 comments

Forcing TypeScript to Be Exhaustive

https://www.carlos-menezes.com/posts/exhaustive-checking-typescript
1•carlos-menezes•19m ago•0 comments

AI and the University – Carson Gross [video]

https://www.youtube.com/watch?v=ZUk2TKZIo7s
2•isaacvando•20m ago•0 comments