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 one where Codex brushes my teeth

https://iamwillwang.com/notes/the-one-where-codex-brushes-my-teeth/
1•wxw•3m ago•0 comments

Why no one is interested to become a Forward Deployed Engineer

https://www.wsj.com/cio-journal/the-hottest-job-in-tech-isnt-very-glamorous-dc29ab3e
1•USTECH_WORKER•4m ago•0 comments

The Norwegian Case for Mediocracy

https://www.ft.com/content/0fe0455d-8633-4e1a-ab8f-f8cd94d60035
1•bookofjoe•7m ago•1 comments

Show HN: Raytention Updated

https://github.com/NohWai-Software/RayTention
1•NohWai•8m ago•0 comments

Show HN: Storage Hunters Wiki – Ad-free database and tools for the Roblox game

1•ludydev•8m ago•0 comments

Universal Declaration of Human Rights (1948)

https://www.un.org/en/about-us/universal-declaration-of-human-rights
1•andsoitis•11m ago•0 comments

MLB restricts dugout iPad use to prevent AI help with strategy. Mets involved

https://apnews.com/article/mlb-ai-ipads-ac940e2490557438f440514977832a74
2•1vuio0pswjnm7•11m ago•1 comments

Show HN: Giving Claude Code and Codex its voice

https://github.com/softcane/aloud
2•pradeep1177•14m ago•0 comments

Oh no I've invented SVG badly

https://owl.billpg.com/on-no-ive-invented-svg-badly/
1•billpg•15m ago•0 comments

What Is the "Mffam" Policy?

https://www.nearlyfreespeech.net/help/faq#BecauseFuckNazisThatsWhy
1•Tomte•17m ago•0 comments

Make X API calls for Free from Grok Build's hidden tools

https://github.com/sergedoub/x-api-free-with-grok-build/
2•v01•17m ago•1 comments

ChatGPT Chat website having issues

2•tomalaci•17m ago•1 comments

Nema Nodes: They Turn Streetlights into a Surveillance Network

https://www.gadgetreview.com/you-know-about-flock-cameras-meet-nema-nodes-they-turn-streetlights-...
1•clumsysmurf•20m ago•0 comments

Notes on Naming (2014)

https://blog.janestreet.com/notes-on-naming/
1•mattrighetti•21m ago•0 comments

SpaceX aborts Starship test flight, sending stock lower

https://www.cnbc.com/2026/07/16/spacex-spcx-stock-starship-test-flight.html
2•1vuio0pswjnm7•22m ago•1 comments

Stop Losing Intent: Absent, Null, and Value in Rust

https://minikin.me/blog/presence-rs
1•arto•23m ago•0 comments

Open Fan Jet Engine Technology

https://www.cfmaeroengines.com/rise/engine-architecture
2•r2sk5t•25m ago•1 comments

Natural experiments prove phytoplankton carbon removal works

https://www.onepercentbrighter.com/p/natural-experiments-prove-feeding
1•getnormality•26m ago•0 comments

Why AI needs a data layer built on Postgres and ClickHouse

https://clickhouse.com/blog/ai-best-of-breed-data-stack
1•saisrirampur•27m ago•0 comments

Data center opponents stage 142 protests across 42 US states

https://www.reuters.com/business/retail-consumer/us-data-center-protests-go-national-backlash-gro...
3•1vuio0pswjnm7•28m ago•1 comments

Agents Are Invention Machines

https://cameronwestland.com/agents-are-invention-machines/
1•camwest•30m ago•0 comments

Show HN: Eremite, an offline-first data layer that can talk to any back end

https://github.com/MaxGfeller/eremite
2•MaxGfeller•31m ago•0 comments

EquivalentFlight – Thetruesize.com but for Flights

https://equivalentflight.com/
1•lxhrstn•33m ago•1 comments

Windows on Arm developer preview Nvidia driver works with regular GPUs

https://xcancel.com/mecoscorner/status/2078850578898137589?s=46
1•HeyMeco•34m ago•1 comments

A simple PHP/MySQL inventory system transformed a local factory

https://zlvox.com/
1•team_zlvox•34m ago•0 comments

Qalculate Time Hacks

https://www.chiark.greenend.org.uk/~cjwatson/blog/qalculate-time-hacks.html
1•fanf2•36m ago•0 comments

Show HN: I replaced a $120k bowling center system with $1,600 in ESP32s

3•section33•37m ago•1 comments

Visuali: An AI agent that creates and edits images on an infinite canvas

https://visuali.io
1•yooo00•37m ago•0 comments

AI didn't replace our security team – it multiplied it

https://webflow.com/blog/ai-didnt-replace-our-security-team
1•Brajeshwar•39m ago•0 comments

I'm losing sleep over Java (1996)

https://twitter.com/TechEmails/status/1478785899009875968
2•downbad_•45m ago•1 comments