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.

AI companies destroy physical books – let's scan rare books before it's too late

https://annas-archive.gl/blog/physical-destruction.html
1•Cider9986•1m ago•0 comments

From Markup to Markdown: The Evolution of Technical Writing, Typesetting Tools

https://link.springer.com/book/10.1007/979-8-8688-2931-4
1•sohkamyung•4m ago•0 comments

NYC sanitation workers fed up with being pricked by weight-loss drug needles

https://gothamist.com/news/nyc-sanitation-workers-fed-up-with-being-pricked-by-weight-loss-drug-n...
1•paulpauper•5m ago•0 comments

Big Food's Biggest Challenge: People Who Don't Want to Eat Anymore

https://www.wsj.com/business/packaged-food-weight-loss-drugs-0d0cf851
1•paulpauper•6m ago•0 comments

Excalidraw but ATProto

https://lexidraw.app
1•jcbhmr•6m ago•0 comments

The Trump administration Turns a Blind Eye to White-Collar Crime

https://www.bloomberg.com/news/features/2026-03-23/trump-administration-fails-to-punish-white-col...
1•paulpauper•7m ago•0 comments

ATProto Documents-of-Record

https://requested.fyi/
1•jcbhmr•9m ago•0 comments

Beatport Bans AI-Produced Tracks from Platform

https://thequietus.com/news/beatport-bans-ai-produced-tracks-from-platform/
1•cdrnsf•10m ago•0 comments

From balloons to pans: in praise of useful tech

https://www.ft.com/content/49c3c96c-cda1-466a-a0a6-8275e889ecc4
1•petethomas•10m ago•0 comments

Show HN: Fsel –. a Rust TUI launcher, fuzzy picker and clipboard browser

https://github.com/Mjoyufull/fsel
1•Rikona_Kurasaki•10m ago•0 comments

Academic who accused Jason Arday of plagiarism suspended by university

https://www.bbc.com/news/articles/cevmrjd9lj1o
3•donsupreme•19m ago•0 comments

Show HN: XListman – one-binary, self-hosted mailing list manager

https://github.com/barats/xlistman
1•baratsemet•20m ago•0 comments

Show HN: Steppewm stacking Wayland window manager

https://keygen.sbs/steppewm/
1•uncognic•26m ago•0 comments

Trying to launch a Spotify app? In this economy?

https://bf.lol/blog/careless-spotify
1•jamiewright•31m ago•0 comments

Show HN: ImageSage – Photo manager using Local AI on Windows

https://apps.microsoft.com/detail/9mt89hd9s6sm?hl=en-US&gl=US
1•ringlochid•32m ago•1 comments

NSF set to issue lowest number of new grants in four decades

https://www.nature.com/articles/d41586-026-02574-6
1•pratchett•33m ago•1 comments

Become the Top Newsletter

https://www.topnewsletters.lol/
1•mattmerrick•34m ago•0 comments

Bun 1.4: Zig vs. Rust Compile Times

https://twitter.com/jarredsumner/status/2090619419059974620
2•mustache_kimono•34m ago•0 comments

Orbital Construction Pioneers

https://orbitalconstructionpioneers.com/
1•pmcjones•35m ago•0 comments

Embedded Swift improvements coming in Swift 6.4

https://www.swift.org/blog/embedded-swift-improvements-coming-in-swift-6.4/
1•timsneath•38m ago•0 comments

Bringing Primary Constructors to Dart

https://dart.dev/blog/bringing-primary-constructors-to-dart
1•danbolt•41m ago•0 comments

Bug test: I think I cannot delete this post in the allowed window

https://www.youtube.com/watch?v=qCljI3cIObU
1•consumer451•44m ago•2 comments

Show HN: GatiNow – branded booking pages with built-in payments

https://www.gatinow.com/features
1•chowkodali•44m ago•0 comments

SpacetimeDB and BitCraft (2023)

https://bitcraftonline.com/news/spacetimedb-and-bitcraft
1•peter_d_sherman•45m ago•0 comments

Trump's brazen crypto bank scheme may be his sleaziest yet

https://www.msn.com/en-us/money/general/trump-s-brazen-crypto-bank-scheme-may-be-his-sleaziest-ye...
2•petethomas•47m ago•0 comments

59 Days left "Nobody is Clean"

1•gladiator291288•47m ago•0 comments

Claude driving an autonomous RC car [video]

https://www.youtube.com/watch?v=jBpQiv-ZlVM
1•nreece•50m ago•0 comments

Fair Witness

https://gtraviswhite.substack.com/p/fair-witness
1•jmward01•54m ago•0 comments

HTTP Server API: A Draft Specification

http://www.jasnell.me/posts/http-server-api-draft
1•jcbhmr•55m ago•0 comments

.NET Foundation Statement on Open Source Maintenance Fees

https://pro.dnf.cloud.sitefinity.com/news-events/detail/.net-foundation-statement-on-open-source-...
1•nreece•55m ago•0 comments