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.

Three way Git merging with meld

https://lukas.zapletalovi.com/posts/2012/three-way-git-merging-with-meld/
1•zahrevsky•1m ago•0 comments

Introduction to Mechanics for Engineers

http://ruina.tam.cornell.edu/Book/
1•pillars•2m ago•0 comments

Moving a Go CMS to encoding/JSON/v2

https://hatamoto.dev/post/moving-hatamoto-to-encoding-json-v2
1•zenincognito•3m ago•0 comments

Reachmap

https://reachmap.app/
1•wwaymonsam•5m ago•0 comments

EA re-releases 25 classic games, restores Wing Commander and Road Rash FMVs

https://www.ea.com/news/ea-classics-launch
1•bpierre•6m ago•0 comments

Ancient warriors got high on cannabis, burial mound reveals

https://www.thetimes.com/uk/history/article/scythians-cannabis-siberia-tunnug-herodotus-pm6vs6rlk
2•bookofjoe•7m ago•0 comments

Scarce Positions of Economic Power Gain from Increasingly Capable AI

https://commanding-heights.com/
1•benwen•10m ago•0 comments

Regulators approve generic HIV-prevention drug for low-income countries

https://apnews.com/article/generic-lenacapavir-gilead-who-prep-hiv-c3537796e84c54d60179eba3c56561e6
3•gmays•13m ago•0 comments

FrontierPhysics: Evaluating Agents for End-to-End Physics Research

https://arxiv.org/abs/2611.06910
1•bingran_you•14m ago•0 comments

Habla – I built a free Spanish-learning app for iOS

https://apps.apple.com/fr/app/habla-learn-spanish-fast/id6783860670
1•brmmuhoil•15m ago•0 comments

Proled XDR Display Technology Overview [pdf]

https://www.apple.com/macbook-pro/proled-xdr-display/pdf/PROLED_XDR_Display_Technical_Paper.pdf
1•interpol_p•21m ago•0 comments

How to Set Up Web Page Minification with VitePress

https://meiert.com/blog/web-page-minification-with-vitepress/
1•ykgoon•23m ago•0 comments

Supermicro Super AI Station Review: The AI Server That Doubles as a Workstation

https://www.servethehome.com/supermicro-super-ai-station-review-the-ai-server-that-doubles-as-a-w...
2•teleforce•24m ago•0 comments

Qualcomm Dragonwing Nabs Big SpaceX Starlink Mobile Nationwide US 5G Network Win

https://www.servethehome.com/qualcomm-dragonwing-nabs-a-big-spacex-starlink-mobile-nationwide-us-...
1•teleforce•25m ago•0 comments

World-Model MCP for Finance

https://ergen.ai/
2•alpbahadur•27m ago•0 comments

Mosaic – a tool to understand and simulate random architectures

https://github.com/xleelz/mosaic
1•xleelz•29m ago•1 comments

Unlimited-OCR-2 rejoins tables split across PDF pages

https://openteams.com/engineering-blog/unlimited-ocr-2-long-pdf-tables/
1•khuyentran1401•30m ago•0 comments

Skill to teach your agents how to use Jujutsu VCS

https://github.com/danverbraganza/jujutsu-skill
2•nvader•40m ago•0 comments

Investors wipe $2.5T off Nasdaq as blue tsunami prompts AI fears

https://www.reuters.com/legal/transactional/ai-data-center-stocks-slip-democratic-sweep-clouds-ex...
13•lilerjee•40m ago•1 comments

Understanding Nix Flakes

https://lwn.net/Articles/1094226/
2•signa11•42m ago•0 comments

Axiom – blocks AI agents from inventing limits your code never defined

https://github.com/axiom-csc/axiom-skill
1•nsara11•51m ago•0 comments

Now this is how you pelican on a bike [video]

https://www.youtube.com/watch?v=l7oERDXGxxo
2•cheevly•53m ago•1 comments

More people should build browsers

https://seg6.space/posts/electron-browser/
1•seg6•53m ago•0 comments

An Android app with no code or permissions can trap phones in a boot loop

https://www.bitdefender.com/en-us/blog/labs/ghostmap-android
2•khalidkhair•53m ago•1 comments

ProTracker 4.1

https://aminet.net/package/mus/edit/ProTracker-4.1
1•doener•54m ago•0 comments

Samenland Village SIM – Plant a Seed. Watch It Grow

https://samenland.app/
1•doener•55m ago•0 comments

MoofTCP – A modern replacement for MacTCP on 68k Macs

https://github.com/matthewmrichter/mooftcp
3•marcusbasant•57m ago•0 comments

Sotot: A small daemon&readonly dashboard for the things that need your attention

https://github.com/bradfitz/sotot
1•flyingsky•58m ago•0 comments

Software Line Specialist

https://lovro-bikic.github.io/software-line-specialist/
1•travisgriggs•59m ago•2 comments

Someone is drawing the GTA VI logo in the sky

https://www.flightradar24.com/N1810R/42723777
2•tacodestroyer•59m ago•0 comments