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 UK's New Under-16 Social Media Ban Will Cause More Harm Than It Prevents

https://www.eff.org/deeplinks/2026/06/uks-new-under-16-social-media-ban-will-cause-more-harm-it-p...
1•Brajeshwar•2m ago•0 comments

Book Review: Where's My Flying Car?

https://www.astralcodexten.com/p/your-book-review-wheres-my-flying
1•zetalyrae•2m ago•0 comments

Glassblowing #2: Making a tungsten lamp and (bad) vacuum diode

https://maurycyz.com/projects/glass/2/
1•thomasjb•2m ago•0 comments

Top Bank Regulator Spoke at an Invite-Only Client Dinner After Fed Meeting

https://www.wsj.com/economy/central-banking/top-bank-regulator-spoke-at-an-invite-only-client-din...
1•petethomas•4m ago•0 comments

Shrinking a NixOS ISO from 458 MiB to 183 MiB

https://natkr.com/2026-06-19-nixos-but-smol/
1•logickkk1•5m ago•0 comments

Pre-Modern Armies for Worldbuilders: Officials, Contractors and Professionals

https://acoup.blog/2026/06/19/collections-pre-modern-armies-for-worldbuilders-part-iib-officials-...
3•JohnHammersley•6m ago•0 comments

Trust Identity Protocol v1.0, an open post-quantum standard for human identity

https://theailab.org/whitepaper
1•dineshmendhe•7m ago•0 comments

Ask HN: Do you find it annoying to share your availability over text/DMs?

2•siddhibee•7m ago•0 comments

Zenzizenzizenzic

https://en.wikipedia.org/wiki/Zenzizenzizenzic
7•gyosifov•10m ago•0 comments

Ask HN: Do you use Apache Iceberg in Production?

1•vira28•14m ago•0 comments

Optimizing for Decision Points

https://narphorium.com/blog/decision-points/
1•azhenley•14m ago•0 comments

The data black hole at the center of AI

https://www.dwarkesh.com/p/the-sample-efficiency-black-hole-2
1•jedixit•15m ago•0 comments

The Wrong End of the Problem

https://schrottner.at/2026/06/18/The-Wrong-End-of-the-Problem.html
1•aepfli•18m ago•0 comments

OCaml 5.5.0

https://discuss.ocaml.org/t/ocaml-5-5-0-released/18265
3•cod1r•21m ago•0 comments

Gemini CLI vs. Claude Code: Why agent capabilities matter more than prompts

https://imaxxs.com/behavioral-induction-capabilities-shape-execution
1•imaxxs•21m ago•0 comments

HN: A free book on how "AI easy money" scams work

https://singularityforge.space/2026/06/20/di-and-easy-money-on-the-edge-of-a-myth/
1•Voice_of_Void•21m ago•0 comments

Cervical cancer mortality trends after HPV vaccination in England 2001–24

https://www.thelancet.com/journals/lancet/article/PIIS0140-6736(26)00918-9/fulltext
4•bookofjoe•21m ago•0 comments

Europe buys the future, America builds it

https://economist.com/finance-and-economics/2026/06/18/europe-buys-the-future-america-builds-it
1•andsoitis•22m ago•0 comments

Google Is Using Nvidia's Playbook to Build a Rival AI Chip Business

https://www.wsj.com/tech/ai/google-is-using-nvidias-playbook-to-build-a-rival-ai-chip-business-1e...
2•Brajeshwar•27m ago•1 comments

Show HN: SkillsGuard – static scanner for malicious AI agent skills

https://github.com/Teycir/SkillsGuard
1•teycir•27m ago•0 comments

Computer Vision – Lecture 1.1 (Introduction: Organization) [video]

https://www.youtube.com/watch?v=YW1cIaOBkI8
1•skidrow•28m ago•0 comments

Anthropic Lacks Emotional Intelligence

https://www.lawfaremedia.org/article/anthropic-lacks-emotional-intelligence
1•ano-ther•29m ago•0 comments

Get notified the second Fable 5 comes back

https://fablewatch.com
1•markksantos•29m ago•0 comments

What happens if the EU loses the AI race [video]

https://www.youtube.com/watch?v=uVPoq1Svz7g
1•SpyCoder77•33m ago•0 comments

Show HN: Konxios a local first AI OS that connects LM Studio, Ollama and cloud

https://konxios.com
1•ifrosted•38m ago•0 comments

Eerie landscape of 100.000 monoliths made with fable 5(when it was available)

https://sand-morph.up.railway.app/atlas-of-quiet-monoliths
1•echohive42•40m ago•0 comments

The science behind Qantas' bet on 20-hour flights

https://www.reuters.com/business/aerospace-defense/sleep-light-science-behind-qantas-bet-20-hour-...
2•1659447091•41m ago•1 comments

Shellular: Run agents, terminals and browser DevTools from your phone

https://shellular.dev/
3•aquajet•44m ago•0 comments

GLM-5.2 vs. Claude Opus 4.8: Full Comparison

https://llm-stats.com/blog/research/glm-5-2-vs-claude-opus-4-8
3•gjvc•48m ago•0 comments

An offline earthquake monitor that detects P-waves before S-waves

https://play.google.com/store/apps/details?id=com.muhsin.mkdepremmonitor&hl=en_US
3•Muhsinkosoglu•51m ago•0 comments