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.

Explaining Functional Programming to Non-Programmers (It's Just Excel)

https://cekrem.github.io/posts/explaining-functional-programming-to-non-programmers/
1•ckardaris•1m ago•0 comments

Musk to sue German broadcaster ZDF over 'hunt for migrants'

https://www.dw.com/en/elon-musk-sues-zdf-hunt-for-migrants-belfast/a-77571443
1•vrganj•2m ago•1 comments

Show HN: VibeSH – Hallucinated Terminal Shell

https://codeberg.org/beleon/vibeSH
2•rowbin•3m ago•0 comments

Building the Live Context Graph for Agents, 28 Weekly Releases Later

https://materialize.com/blog/building-the-live-context-graph-for-agents/
1•pranshum•3m ago•0 comments

SpaceX has acquired Cursor

https://twitter.com/spacex/status/2066873915717136548
2•napolux•3m ago•1 comments

Ask HN: Why aren't hardware passkeys used for access token creation?

1•zackify•3m ago•0 comments

10 Years In, and Claude Just Made Me a Better Engineer

https://medium.com/beyond-bits/10-years-in-and-claude-just-made-me-a-better-engineer-58b5d3c630f6
1•laxmansharma•5m ago•0 comments

Show HN: git-lrc – Free, Micro AI Code Reviews That Run on Git Commit

https://github.com/HexmosTech/git-lrc
2•atomicnature•6m ago•0 comments

The Doctor Who Treats Patients with a Gaming Mouse

https://textexpander.com/blog/doctor-gaming-mouse
1•jcenters•6m ago•0 comments

I gave ChatGPT a body [video]

https://www.youtube.com/watch?v=S67z2aekBrI
1•Malfunction92•7m ago•0 comments

Vibe coding can build your pipeline. It can't explain it six months later

https://venturebeat.com/orchestration/vibe-coding-can-build-your-pipeline-it-cant-explain-it-six-...
1•speckx•7m ago•0 comments

Net CO2 release from permafrost soil carbon thaw predicted earlier this century

https://www.science.org/doi/10.1126/sciadv.adz8478
1•littlexsparkee•8m ago•0 comments

What Is Minimalism Worth?

https://carlbarenbrug.com/minimalism-worth
1•surprisetalk•10m ago•0 comments

The Verifier Tax: Safety–Success Tradeoffs in Tool-Using LLM Agents

https://dl.acm.org/doi/10.1145/3786335.3813160
1•tanmaysah•11m ago•0 comments

Show HN: AgentPace – Forecast when your coding agent usage will run out

https://festudio.net/agentpace/
2•jrflo•11m ago•0 comments

Social media is awful but the UK under-16 ban won't solve anything

https://www.pcgamer.com/software/platforms/social-media-is-awful-but-the-uk-under-16-ban-wont-sol...
1•evo_9•12m ago•0 comments

Facing reality, Apple or EU, is a core requirement for good management (2024)

https://www.baldurbjarnason.com/2024/facing-reality-in-the-eu-and-tech/
1•davidgerard•12m ago•0 comments

Show HN: WhatsApp Clone, but Decentralized with P2P Messaging

https://enkrypted.chat
2•Screen8774•13m ago•0 comments

Show HN: The Dictionary Game (Fictionary/Balderdash) as a Daily Puzzle

https://dictionarypuzzle.com/
2•woutervd•14m ago•0 comments

A Tale of Two Browsers

https://adactio.com/journal/22609
2•robin_reala•14m ago•0 comments

PR Preview – Generate before/after videos for front end pull requests

https://www.pr-preview.com
1•VladNiculescu•14m ago•0 comments

Bandcamp explorer: RSS feed for every Bandcamp genre/tag and every artist

https://bandcamp.k47.cz/
1•ggrelet•14m ago•0 comments

Onhand: An AI tutor that lives on the page you're reading

https://useonhand.com/
1•phineas1500•15m ago•1 comments

Statistics of a Distribution on Unitary Matrices

https://mathoverflow.net/questions/512341/statistics-of-a-distribution-on-unitary-matrices
1•jjgreen•15m ago•0 comments

Cursor to Join SpaceX

https://xcancel.com/cursor_ai/status/2066875698346954891
2•SpyCoder77•15m ago•1 comments

Show HN: MockNest Serverless – Bedrock-Assisted API Mocks on AWS Lambda

https://github.com/elenavanengelenmaslova/mocknest-serverless
1•elenavanengelen•15m ago•1 comments

French domestic spy agency ditches Palantir for local rival, PM says

https://www.rappler.com/technology/french-dgsi-spy-agency-ditches-palantir-rival-chapsvision/
2•vidalee•17m ago•0 comments

SpaceX to Acquire Cursor

https://xcancel.com/SpaceX/status/2066873915717136548
1•SpyCoder77•17m ago•1 comments

Full 3D Mars optimization in 26 pages of Fortran

https://temporalmechanics.org/
1•BTUBill•17m ago•0 comments

Show HN: Cron-naturally – plain English to cron and back, in the browser

https://github.com/rillsai/cron-naturally
1•Stezu•19m ago•1 comments