frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

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.

My I3-Emacs Integration

https://khz.ac/software/i3-integration.html
1•nosolace•25s ago•0 comments

Experimental Drug Retatrutide Yields Dramatic Weight Loss

https://www.nytimes.com/2026/05/21/science/retatrutide-weight-loss-drug.html
1•bookofjoe•55s ago•1 comments

Why T. Rex had tiny arms

https://nautil.us/we-finally-have-the-answer-for-t-rexs-tiny-arms-1280997
2•marojejian•10m ago•0 comments

Earliest Uses of Various Mathematical Symbols

https://mathshistory.st-andrews.ac.uk/Miller/mathsym/
3•layer8•15m ago•0 comments

Bun.Image

https://bun.com/docs/runtime/image
4•chakintosh•16m ago•0 comments

AI Governance 2026: I Almost Quit over This Shit (and Why You Might Too)

https://medium.com/open-ai/ai-governance-2026-i-almost-quit-over-this-shit-and-why-you-might-too-...
3•sukhpinder0804•21m ago•1 comments

Show HN: Fruitsy, a slot machine game

https://fruitsy.surge.sh
3•stagas•21m ago•0 comments

Jira Is Turing-Complete

https://seriot.ch/computation/jira.html
4•MrFinch•23m ago•0 comments

Codex is flagged as malware on macOS

https://github.com/openai/codex/issues/23195
3•vldszn•23m ago•3 comments

Wildlife is watching us, too – and changing their behavior in response

https://news.yale.edu/2026/05/21/wildlife-watching-us-too-and-changing-their-behavior-response
3•hhs•28m ago•1 comments

BFI Online Video Collection

https://replay.bfi.org.uk/collection/458
2•philo23•28m ago•1 comments

World Machines

https://worldmachines.org/resources
3•jerlendds•29m ago•0 comments

Curious cases of financial engineering in biotech

https://www.owlposting.com/p/curious-cases-of-financial-engineering
2•abhishaike•30m ago•0 comments

Birds can see into the UV spectrum, picking up signals that the human eye cannot

https://www.binghamton.edu/news/story/6207/beyond-black-research-explores-the-feather-color-of-am...
3•hhs•31m ago•0 comments

ParsOS NEXT, Learn how does a GUI works

https://github.com/amirali1390-bit/ParsOS-NEXT
2•amirali901•33m ago•1 comments

Hi-res microscopes give biologists petabytes of data

https://news.berkeley.edu/2026/05/22/hi-res-microscopes-give-biologists-petabytes-of-data-scienti...
3•hhs•33m ago•1 comments

Guinea worm disease nears worldwide elimination, with only 10 cases in 2025

https://www.cidrap.umn.edu/dracunculiasis/guinea-worm-disease-nears-worldwide-elimination-only-10...
3•randycupertino•44m ago•1 comments

Alberta will vote on whether to remain part of Canada. What now?

https://www.bbc.com/news/articles/c809jg1gj9yo
4•tartoran•44m ago•2 comments

Polsia raised $30M; source map: fake ARR, dead users, god-mode over your company

https://zero-arr.vercel.app
25•not-chatgpt•48m ago•11 comments

Don't Roll Your Own

https://susam.net/do-not-roll-your-own.html
18•adunk•49m ago•6 comments

Memdeklaro: Open-source self-sovereign identity

https://memdeklaro.org
4•anonymous123•50m ago•0 comments

Customizing an LLM for Enterprise Software Engineering

https://arxiv.org/abs/2605.16517
4•daureg•50m ago•0 comments

Byrne's Euclid

https://www.c82.net/euclid/
4•layer8•54m ago•1 comments

SpaceX files to go public, and the math requires a little faith

https://techcrunch.com/video/spacex-files-to-go-public-and-the-math-requires-a-little-faith/
3•Timofeibu•59m ago•0 comments

Dirty Frag, Copy Fail, Fragnesia: A Worrisome Linux Security Trend

https://www.theregister.com/security/2026/05/23/dirty-frag-copy-fail-fragnesia-the-start-of-a-wor...
5•Timofeibu•59m ago•0 comments

Inside an N64 Cartridge: How the Hardware Actually Works [video]

https://www.youtube.com/watch?v=4Yix4NzRv9s
3•skibz•1h ago•0 comments

The Crypto Coin was the tell – thoughts on GSD, and it's crypto rugpull

https://vexjoy.com/posts/the-crypto-coin-was-the-tell/
2•AndyNemmity•1h ago•0 comments

The Appreciation Constituency: Land, Credit and the Politics of Protected Assets

https://americanaffairsjournal.org/2026/05/the-appreciation-constituency-land-credit-and-the-poli...
2•robocat•1h ago•0 comments

The Polyglot Protocol – senior-engineer guardrails for AI coding agents

https://github.com/sabir-gbs/the-polyglot-protocol
2•sabirsemerkant•1h ago•0 comments

GLP-1s Linked to Lower Risk of Cancer Spread in Four Tumor Types

https://www.medpagetoday.com/meetingcoverage/asco/121397
3•randycupertino•1h ago•0 comments