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.

Why Don't We Version UIs?

1•gruensk•31s ago•0 comments

Diesel Margins Top $100 a Barrel to Reach Record High as Supply Crunch Grows

https://www.bloomberg.com/news/articles/2026-08-18/diesel-margins-top-100-a-barrel-to-reach-recor...
1•toomuchtodo•57s ago•1 comments

Hacker Koan

https://simple.wikipedia.org/wiki/Hacker_koan
1•gregsadetsky•3m ago•0 comments

The AI Slop Spiral

https://nolanfrausto.com/posts/ai-slop-spiral/
1•frausto•3m ago•0 comments

Eight hours of vintage department store Christmas music [video]

https://www.youtube.com/watch?v=nQKlEkKXBzQ
1•mooreds•4m ago•0 comments

Employees from lower class backgrounds face backlash when they negotiate

https://hbr.org/2026/08/research-employees-from-lower-class-backgrounds-negotiate-less-and-face-m...
1•underlipton•4m ago•0 comments

Recent grads say AI is making it harder to get a job. Economists aren't sure

https://text.npr.org/nx-s1-5910677
1•mooreds•6m ago•0 comments

the 404 test

https://www.oblo.mov/writing/the-404-test/
1•bahrtw•8m ago•0 comments

Show HN: Cronloop, run Claude Code or Codex on a schedule

https://cronloop.ai/
1•miketromba•9m ago•1 comments

Amazon Leo plans to connect mobile devices from space

https://www.aboutamazon.com/news/amazon-leo/amazon-leo-direct-to-device-satellite-service-explained
1•nateb2022•9m ago•0 comments

Self-Verification with DeepSeek V4 Flash Beats Claude Fable 5 on Terminal-Bench

https://github.com/llm-as-a-verifier/llm-as-a-verifier
1•yogthos•10m ago•0 comments

Trump Labels Map of Strait of Hormuz 'New U.S. Territory'

https://www.forbes.com/sites/zacharyfolk/2026/08/18/trump-labels-map-of-strait-of-hormuz-new-us-t...
1•bushwart•10m ago•0 comments

Sol Loves to Cheat

https://jumploops.com/blog/sol-loves-to-cheat/
1•jumploops•11m ago•0 comments

Ranked: Popular Cities for Digital Nomads

https://www.visualcapitalist.com/cp/ranked-the-30-most-popular-cities-for-digital-nomads/
1•mdp2021•11m ago•0 comments

Claude: Degraded Performance for Multiple Models

https://status.claude.com/incidents/q7txxvbsftgq
15•matt89•12m ago•4 comments

Superpowers, Not Superintelligence

https://bond.now/news/superpowers-not-superintelligence
1•edbernays•13m ago•0 comments

Changes for Apps in the European Union

https://developer.apple.com/news/?id=gmws0jgp
1•johnbehnke•13m ago•1 comments

How Turkey may have solved the Kurdish insurgency

https://www.nytimes.com/2026/08/18/opinion/turkey-kurds-pkk-hamas.html
1•marojejian•14m ago•1 comments

Git at Any Scale

https://cursor.com/blog/git-at-any-scale
2•meetpateltech•14m ago•0 comments

Launch HN: machine0 (YC S26) – Persistent CPU and GPU VMs from the CLI

https://machine0.io
3•bwm•14m ago•1 comments

Some contradictions of hybrid back to work (2023)

https://euri.ca/blog/2023-hybrid-back-to-work/
1•mooreds•14m ago•0 comments

Magnitude – Open-source AI coding agent that runs local models offline

https://digitalescapetools.com/tools/tool.html?id=magnitude
2•xabd•15m ago•0 comments

The new Framework 12 [video]

https://www.youtube.com/watch?v=459a7YBmBOE
3•what-is-water•15m ago•0 comments

Acadia Bringing the benefits of elm to SQLite and PostgreSQL

https://acadia.engineering/
2•BoumTAC•16m ago•1 comments

Mindful Motorcycle Racing

https://samsonracing.substack.com/p/mindful-motorcycle-racing
2•Wagthesam•17m ago•0 comments

Mojo is now open source!

https://www.modular.com/blog/mojo-open-source
12•visheshdembla•17m ago•0 comments

Swinth – By Sung J. Woo

https://www.goto10retro.com/p/the-history-of-swinth
3•rbanffy•17m ago•0 comments

A Transcript Is a Choice

https://sprag.ai/blog/a-transcript-is-a-choice
2•ericalind•18m ago•0 comments

A local ePub eBook server for my xteink

https://solariz.de/posts/26/04-xteink-local-epub-server
2•speckx•19m ago•0 comments

Apple announces changes for apps in the European Union

https://www.apple.com/newsroom/2026/08/apple-announces-changes-for-apps-in-the-european-union/
17•newusertoday•19m ago•14 comments