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.

Stop Patching the Dammed IoT Kernel – Native Immunity Is the Only Way Out

https://twitter.com/i/status/2073850360771612865
1•xxBoson•5m ago•0 comments

Fable 5 Used to Port Command and Conquer: Generals Zero Hour to iOS

https://twitter.com/ammaar/status/2073501877753323772
1•beatthatflight•8m ago•0 comments

Oatmeal Spice: Interesting Procedurally Generated Output

https://www.boristhebrave.com/2026/07/05/oatmeal-spice/
1•lispybanana•10m ago•0 comments

Hideo Kojima on PlayStation killing discs, 'frightened' for future of ownership

https://www.videogameschronicle.com/news/hideo-kojima-really-sad-about-playstation-killing-discs-...
2•thunderbong•13m ago•0 comments

Bad to worse at NSF? (June 2026 edition)

http://nanoscale.blogspot.com/2026/06/bad-to-worse-at-nsf-june-2026-edition.html
1•osnium123•18m ago•0 comments

Apple sells me a MacBook to deliver $1700; cancels 5 days later quoting $2000?

1•aerodog•18m ago•0 comments

US Car Payments Hit a Record $777 a Month as Down Payments Drop

https://www.bloomberg.com/news/articles/2026-07-01/us-car-payments-hit-a-record-777-a-month-as-do...
2•mattas•20m ago•1 comments

Mondegreen

https://en.wikipedia.org/wiki/Mondegreen
2•JKCalhoun•22m ago•0 comments

YouTube urges creators to fight proposed UK algorithm changes

https://www.dexerto.com/entertainment/youtube-urges-creators-to-fight-proposed-uk-algorithm-chang...
1•thesmtsolver2•28m ago•0 comments

What should a personal website be?

https://ratfactor.com/cards/personal-website
1•vinhnx•31m ago•0 comments

A Novel Look at Error Handling in Rust

https://jtjlehi.github.io/2026/06/25/novel-rust-error-handling.html
2•vinhnx•37m ago•0 comments

Whyline – company memory engine (SQLite, BM25, MCP for Cursor)

https://github.com/Sunradiance/whyline
1•sunradiance•37m ago•0 comments

ABI vs. API (2004)

https://lists.debian.org/debian-user/2004/02/msg00648.html
1•vinhnx•37m ago•0 comments

The White House Campaign to Overturn a World Cup Red Card

https://www.wsj.com/sports/soccer/white-house-fifa-balogun-red-card-world-cup-46276fc8
16•JumpCrisscross•39m ago•1 comments

Designing GPU-Accelerated Query Engines with NVIDIA GQE

https://developer.nvidia.com/blog/designing-gpu-accelerated-query-engines-with-nvidia-gqe/
1•c_lutz•39m ago•0 comments

TaskLoco Is the Sticky Note To-Do App for Visual Thinkers

https://www.taskloco.com/
1•taskloco_nyc•39m ago•0 comments

Nobel Laureate in Chemistry Omar M. Yaghi joins Tsinghua University full-time

https://www.tsinghua.edu.cn/en/info/1244/14984.htm?trk=feed_main-feed-card_feed-article-content
3•osnium123•42m ago•1 comments

Americans of all ages are spending less time socializing

https://www.axios.com/2026/07/05/americans-socializing-decline
1•toomuchtodo•43m ago•0 comments

A Point Of View: How China sees a multicultural world (2012)

https://www.bbc.com/news/magazine-20083309
1•keepamovin•45m ago•1 comments

Android's Earthquake Alerts Saved My Life in Venezuela

https://www.howtogeek.com/androids-earthquake-alerts-saved-my-life-in-venezuela/
3•olgs•50m ago•1 comments

Technical Report on the Pangram AI-Generated Text Classifier (2024)

https://arxiv.org/abs/2402.14873
1•imustachyou•52m ago•0 comments

Can you run every line of code in Super Mario Bros.? [video]

https://www.youtube.com/watch?v=o0gOALTvkcc
2•medbar•53m ago•0 comments

Shrimple – A Simpler, Nicer Markdown

https://qount25.dev/Shrimple/
1•usrbinenv•56m ago•0 comments

McKinsey: Catalyzing competitiveness – Where investment happens and why

https://www.mckinsey.com/mgi/our-research/catalyzing-competitiveness-where-investment-happens-and...
1•TMWNN•1h ago•0 comments

Lord of the Roths

https://www.propublica.org/article/lord-of-the-roths-how-tech-mogul-peter-thiel-turned-a-retireme...
7•Anon84•1h ago•0 comments

Rules for Building SaaS in 2026

https://old.reddit.com/r/SaaS/comments/1unw3aj/the_18_rules_for_building_saas_in_2026/
2•nomilk•1h ago•0 comments

Show HN: Openleetcode – Run LeetCode solutions locally against open tests

https://github.com/therepanic/openleetcode/releases/tag/v1.0.1
1•therepanic•1h ago•0 comments

People Who Will Thrive in the AI Age

https://www.theatlantic.com/ideas/2026/06/ai-open-ai-anthropic/687689/
3•longhaul•1h ago•0 comments

What is Bending Spoons? The little-known AOL and Vimeo owner that's now public

https://techcrunch.com/2026/07/05/what-is-bending-spoons-everything-to-know-about-aols-acquirer/
1•jack1689•1h ago•2 comments

Understanding Postgres 19 Property Graphs

https://neovintage.org/posts/postgres-property-graphs/
3•craigkerstiens•1h ago•0 comments