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.

How we built a DuckDB transpiler

https://www.cocoalemana.com/blog/building-a-duckdb-transpiler/
1•ryanmelehan•49s ago•1 comments

Deep Breaths

https://100-deep-breaths.com
1•structuredPizza•3m ago•1 comments

GFQL: Run Cypher on Polars, CPU and GPU, no database required

https://www.graphistry.com/blog/cypher-on-polars-cpu-gpu-graph-engine
1•lmeyerov•3m ago•0 comments

Logic Puzzle from the MIT Mystery Hunt

https://wondrousnet.blogspot.com/2026/05/solution-to-build-your-own-sudoku-puzzle.html
1•Nothing33•4m ago•0 comments

Privacy Is Not a Soundbite

https://code.mendhak.com/privacy-is-not-a-soundbite/
1•speckx•4m ago•0 comments

Bal-tec: custom-made balls of any material, any size, quality, quantity

https://hightechballs.com/index.html
1•nickswalker•4m ago•0 comments

Doctordle: Test your medical knowledge with daily clinical scenarios

https://doctordle.org/
1•ohjeez•5m ago•0 comments

Altitude adaptation in Tibetans due to introgression of Denisovan-like DNA [pdf]

https://www.nature.com/articles/nature13408
1•thunderbong•8m ago•0 comments

Aurora DSQL: Scalable, Multi-Region OLTP

http://muratbuffalo.blogspot.com/2026/07/aurora-dsql-scalable-multi-region-oltp.html
1•zdw•8m ago•0 comments

We (Agents) Build Software for Humans

https://raft.build/resources/blog/how-a-feature-ships-for-raft-on-raft/
1•tygg•9m ago•0 comments

Meta faces higher borrowing costs in latest $12B data centre financing

https://www.ft.com/content/822628c5-4f9c-47db-bd27-f3ad7f841700
3•mfiguiere•9m ago•1 comments

I learned two pointers after confusing them for months

https://leetcopilot.dev/blog/two-pointers-intuition-for-leetcode-beginners-step-by-step
1•alexwang24•11m ago•0 comments

One Reference for 3000 APIs

https://github.com/mindcloud-inc/universal-api-reference
1•frabjoused•11m ago•0 comments

Tanks Mayhem is back: 16 years later, in the browser

https://www.atomic14.com/2026/07/24/tanks-mayhem-is-back
1•iamflimflam1•16m ago•0 comments

Show HN: Twigg – open-source big-tech-like version control and software forge

https://github.com/twigg-vc/monorepo
6•andrebianchessi•18m ago•4 comments

Accountability

https://addisoncrump.info/research/on-accountability/
1•birdculture•20m ago•0 comments

Download Everything

https://blog.dasrecht.net/2026/07/20/download-literally-everything/
1•speckx•21m ago•0 comments

Is Kimi K3 Better Than Opus? It Was Until Opus 5

https://playcode.io/blog/macbook-svg-benchmark
2•ianberdin•21m ago•2 comments

Oracle VM VirtualBox Bug Discovered by AI: CVE-2026-60161

https://octane.beehiiv.com/
2•runeks•21m ago•1 comments

Postgres LISTEN/NOTIFY actually scales

https://www.dbos.dev/blog/postgres-listen-notify-scalability
21•KraftyOne•23m ago•1 comments

I wanted a clock that never needed setting. Things escalated

https://arstechnica.com/gadgets/2026/07/i-wanted-a-clock-that-never-needed-setting-things-escalated/
2•Jtsummers•24m ago•0 comments

How Spotify Studio Works

https://labs.spotify.com/studio/how-it-works
1•jlaneve•24m ago•0 comments

Watch Fable 5 play Zork and read it's mind

https://zork.arobase.co/
1•posabsolute•26m ago•0 comments

Australia's huntsman fastest spider recorded in new study

https://www.abc.net.au/news/science/2026-07-10/huntsman-speed-study-science-fastest/106900894
1•speckx•27m ago•0 comments

The Century of the Self (2002) [playlist] [video]

https://www.youtube.com/playlist?list=PLktPdpPFKHfoXRfTPOwyR8SG8EHLWOSj6
1•gurjeet•28m ago•0 comments

Embedding HTML+JS in an Imgur Image

https://github.com/Kaj2T/SmartGif
2•ktwee•30m ago•0 comments

3D world with collision detection in CSS

https://garethheyes.co.uk/
1•hackvertor•32m ago•0 comments

The pope's prayer app has been leaking its users' info for months

https://san.com/cc/the-popes-prayer-app-has-been-leaking-its-users-info-for-months/
1•harambae•32m ago•0 comments

Walmart and Target are watching you. I saw the "lab" for myself

https://slate.com/life/2026/07/shoplifting-walmart-target-amazon-retail-florida.html
2•pavel_lishin•33m ago•1 comments

Accessibility Rant: Reader Mode

https://unattributed.cc/accessibility-rant-reader-mode
1•speckx•35m ago•0 comments