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.

When will the decimals in A/B repeat?

https://www.johndcook.com/blog/2026/06/27/decimal-period/
1•ibobev•1m ago•0 comments

Omarchy is the best thing I've stopped thinking about. 1 year review blog

https://codebynight.dev/posts/one-year-omarchy-learning-os-not-just-linux-setup/
1•shivc•1m ago•0 comments

Height of Harmonic Numbers

https://www.johndcook.com/blog/2026/06/27/height-of-harmonic-numbers/
1•ibobev•1m ago•0 comments

The Internet Doesn't Need More Content, It Needs More You

https://arunrocks.com/the-internet-needs-more-you/
1•arocks•1m ago•0 comments

Spritework on the ZX Spectrum: Preparing Our Graphics

https://bumbershootsoft.wordpress.com/2026/06/27/spritework-on-the-zx-spectrum-preparing-our-grap...
1•ibobev•2m ago•0 comments

Life lessons and hot takes from my 30s

https://shreyasprakash.com/life-lessons-30s/
1•mondo_daemon•5m ago•0 comments

Ask HN: Hiii

1•hari_vardhan•6m ago•0 comments

Google rejects claims of AI in Search hurting web traffic

https://indianexpress.com/article/technology/artificial-intelligence/google-denies-ai-search-hurt...
1•vednig•8m ago•0 comments

Ask HN: Sdfs

1•hari_vardhan•11m ago•0 comments

Ask HN: Are there any developers prefer writing code manually?

1•trowa159•15m ago•0 comments

Roundup of July 2026 Bootstrapper Events

https://bootstrappersbreakfast.com/2026/06/23/roundup-of-july-2026-bootstrapper-events/
1•skmurphy•16m ago•1 comments

Fake Windows: highly realistic LED screens that simulates sunlight into a room

https://twitter.com/iPaulCanada/status/2070560999300559283
4•aurenvale•19m ago•0 comments

The Real Cost of Using AI in 2026

https://adlrocha.substack.com/p/adlrocha-the-real-cost-of-using-ai
1•adlrocha•21m ago•0 comments

Hungary holds first post-Orban Budapest Pride march

https://www.dw.com/en/hungary-holds-first-post-orban-budapest-pride-march/a-77736596
2•bushwart•22m ago•0 comments

I-Regexp: An Interoperable Regular Expression Format

https://datatracker.ietf.org/doc/html/rfc9485
1•tonyg•23m ago•0 comments

Can we create a shield to protect Earth from solar storms?

https://physicsworld.com/a/can-we-create-a-shield-to-protect-earth-from-solar-storms/
1•visha1v•23m ago•0 comments

[Humor] You have violated the rules of our community

https://www.mangialardi.it/you-have-violated-the-rules-of-our-community/
1•rm30•28m ago•1 comments

Itcss: Scalable and Maintainable CSS Architecture (2021)

https://www.xfive.co/blog/itcss-scalable-maintainable-css-architecture
1•toilet•30m ago•0 comments

The US Lock of the Web

https://ache.one/notes/the-us-lock-of-the-web
1•enz•30m ago•0 comments

Flick – Self-hostable file sharing with human-friendly codes (Go/Next.js)

https://github.com/Flick-Corp/flick
1•dellixou•30m ago•0 comments

Show HN: CCA-F Gotchas – exam pitfalls turned into an earworm playlist

https://suno.com/playlist/8ee4368a-294e-4369-8896-c9eba40768ce
1•dvaughan•30m ago•0 comments

Chinese tech hub's shift into robotaxis leaves drivers by the wayside

https://www.ft.com/content/b1445598-e5e3-4530-9e82-e0155c44106b
1•bazzmt•31m ago•1 comments

A Transformer Becomes an LLM

https://bharad.dev/blog/from-transformer-to-llm
1•bharadwajp•31m ago•0 comments

6 Facts About Europe and Air Conditioning

https://heatmap.news/daily/europe-air-conditioning
1•salonium_•34m ago•0 comments

Policymakers can prep for a potential AI job apocalypse

https://www.wordsinsearchlight.org/p/how-policymakers-can-prep-for-a-potential
1•m-hodges•34m ago•0 comments

Show HN: Hikaru Labs – A private, 100% local alternative to iLoveIMG

https://hikarulabs.xyz
2•CFBL•35m ago•1 comments

Can China build its own ASML?

https://nikkei.shorthandstories.com/can-china-build-its-own-asml/
6•pieterr•50m ago•0 comments

China's CXMT Is Set to Challenge DRAM Incumbents

https://newsletter.semianalysis.com/p/chinas-cxmt-is-set-to-challenge-dram
5•pieterr•56m ago•0 comments

Authority is the degenerate case: what else propagates through the link graph?

https://zenodo.org/records/20981883
1•JasonDuke•56m ago•0 comments

Why growth harder to find: good ideas aren't becoming rare, but hard to share

https://www.nber.org/papers/w35182
1•oliculipolicula•1h ago•0 comments