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.

Ask HN: Thoughts on Siri AI?

1•akashwadhwani35•49s ago•0 comments

Cleaning up after AI rockstar developers

https://www.codingwithjesse.com/blog/rockstar-developers/
1•BrunoBernardino•1m ago•0 comments

Building a Smarter Crypto Market Maker with Avellaneda–Stoikov

https://medium.com/@DolphinDB_Inc/taming-inventory-risk-building-a-smarter-crypto-market-maker-wi...
1•dbaa4real•2m ago•1 comments

Understand your Team code generated by AI

https://archtocode.com/
1•grzelazny•4m ago•0 comments

The Simplest Learning Machine

https://medium.com/@VictorBanev/the-simplest-learning-machine-pt-2-e735367f546
1•xaedes•5m ago•0 comments

'They were laughing': Israel's use of rape and sexual abuse in prisons

https://www.aljazeera.com/news/2026/6/9/they-were-laughing-israels-use-of-rape-and-sexual-abuse-i...
2•abdusco•5m ago•0 comments

PingWatch uptime monitoring no server needed (alternativeto UptimeKuma)

https://pingwatch.org
1•pipka•7m ago•0 comments

React Compiler Rust Port

https://github.com/facebook/react/pull/36173
1•maelito•8m ago•0 comments

Safe Terraform auto-apply with conftest

https://www.bejarano.io/terraform-autoapply/
1•ricardbejarano•9m ago•0 comments

Data from 66,000+ musician practice sessions

https://old.reddit.com/r/piano/comments/1u0lyhe/data_from_66000_practice_sessions_how_much_does/
1•sebg•11m ago•0 comments

Show HN: SuperTree – interactive decision tree plot for sklearn,xgboost,lightgbm

https://github.com/mljar/supertree
1•pplonski86•17m ago•0 comments

How to Ditch Codecov for Python Projects

https://hynek.me/articles/ditch-codecov-python/
1•lumpa•20m ago•0 comments

Can a Lego Man Survive a Crash Test? – Invidious

https://inv.nadeko.net/watch?v=JTthuDn638U
1•frans•26m ago•0 comments

What if the GRAVITY suddenly switched off?

https://www.youtube.com/watch?v=dNWwIfjJXZY
2•Asheed•27m ago•0 comments

Htmx Is So Cool I Rolled My Own (2024)

https://dbushell.com/2024/04/16/htmx-and-modern-javascript/
2•birdculture•27m ago•0 comments

Real-Time Capital Flow Analysis Using Window Aggregation

https://medium.com/@DolphinDB_Inc/real-time-capital-flow-analysis-using-window-aggregation-57ba10...
2•Polly_Liu•29m ago•0 comments

Building and Backtesting a Dynamic Grid Trading Strategy for Crypto

https://medium.com/@DolphinDB_Inc/beyond-basic-grid-trading-building-and-backtesting-a-dynamic-st...
2•CrazyTomato•31m ago•0 comments

Palantir is turning the NHS into a tool for mass surveillance

https://www.opendemocracy.net/palantir-is-turning-the-nhs-into-a-tool-for-mass-surveillance/
2•robtherobber•32m ago•0 comments

Do you find yourself aimlessly scrolling? You're not alone

https://www.bbc.com/news/articles/czd2mq505dpo
1•01-_-•39m ago•0 comments

Apple updates child safety inspired by Australia's under-16 ban

https://www.abc.net.au/news/2026-06-09/apple-child-safety-features-revamped/106777228
1•01-_-•39m ago•0 comments

An open-source aircraft identification library in Python

https://github.com/xuhao1/pyAircraftIden
1•marklit•41m ago•0 comments

What if Germany had invested in nuclear power? (2024)

https://doi.org/10.1080/14786451.2024.2355642
2•leonidasrup•43m ago•1 comments

Forever Young: how one molecule can lock plants in a youthful state.(2025)

https://omnia.sas.upenn.edu/story/biologist-scott-poethig-plants-never-age
5•bryanrasmussen•45m ago•0 comments

Broken speaker? Anticonsumerist Repair Cafes urge you to fix it instead of pitch

https://apnews.com/article/repair-cafes-economy-anticonsumerism-affordability-buy-nothing-d3acac3...
2•Physkal•49m ago•0 comments

Uncle Sam considers buying a seat on the Titanic

https://www.theregister.com/ai-and-ml/2026/06/09/uncle-sam-considers-buying-a-seat-on-the-titanic...
5•rbanffy•50m ago•0 comments

How Inclusive Is RTO for Neurodivergent Developers?

https://medium.com/@csal_19296/what-returning-to-the-office-taught-me-about-diversity-in-tech-207...
2•plr_cl•53m ago•0 comments

Apple rebuilt its on-device AI stack at WWDC 2026

https://ziraph.com/blog/apple-on-device-ai-wwdc-2026
2•ABS•55m ago•1 comments

Now what?

https://blog.danieljanus.pl/now-what/
1•nathell•56m ago•0 comments

Random Lives

https://random-lives.github.io/random-lives/
2•dukeyukey•1h ago•0 comments

Due to DMA, Siri AI delayed in EU for iOS 27 and iPadOS 27

https://www.apple.com/newsroom/2026/06/due-to-dma-siri-ai-delayed-in-eu-for-ios-27-and-ipados-27/
1•jllyhill•1h ago•0 comments