A runtime guard for AI coding agents that gates every tool call and returns PASS, AUTH or BLOCK before the action executes.
superagent-ai/superagent
An open-source SDK that guards AI apps against prompt injections, redacts PII and secrets, and scans repositories for agent-targeted attacks.
- Stars
- 6,851
- Forks
- 967
- Open issues
- 21
- Last commit
- 2 months ago
What is it?
Superagent SDK is a toolkit for adding safety checks to applications built on large language models. Its guard method inspects user input at runtime to detect and block prompt injections, malicious instructions, and unsafe tool calls. Its redact method removes PII, PHI, and secrets from text, replacing them with placeholders such as <EMAIL_REDACTED>.
The SDK also includes a scan method that analyzes repositories for attacks aimed at AI agents, such as repo poisoning and embedded malicious instructions. A test feature for running red team scenarios against a production agent is listed as coming soon.
The project provides TypeScript and Python SDKs, a CLI, and an MCP server for use with Claude Code and Claude Desktop. It states support for models from OpenAI, Anthropic, Google, Groq, and Bedrock, and offers open-weight models that can run Guard on your own infrastructure.
Key features
- 01Runtime detection and blocking of prompt injections and unsafe tool calls
- 02PII, PHI, and secret redaction from text
- 03Repository scanning for repo poisoning and malicious agent instructions
- 04TypeScript and Python SDKs plus a CLI
- 05MCP server for Claude Code and Claude Desktop
Use cases
- Adding input filtering to a chatbot before it reaches the model
- Redacting sensitive customer data from prompts or logs
- Checking third-party repositories an AI coding agent will read
- Running Guard on self-hosted infrastructure with open-weight models
Quick start
- 1
Sign up at superagent.sh to get your API key
- 2
Install the TypeScript SDK
npm install safety-agent - 3
Set your API key
export SUPERAGENT_API_KEY=your-key
Things to know
- Guard, redact, and scan rely on a Superagent API key, so they need an account and network access unless you self-host the open-weight models.
- The Test feature is marked as coming soon and is not yet available.
In collections
Topics
FAQ
- What is superagent?
- An open-source SDK that guards AI apps against prompt injections, redacts PII and secrets, and scans repositories for agent-targeted attacks. Superagent SDK is a toolkit for adding safety checks to applications built on large language models. Its guard method inspects user input at runtime to detect and block prompt injections, malicious instructions, and unsafe tool calls. Its redact method removes PII, PHI, and secrets from text, replacing them with placeholders such as <EMAIL_REDACTED>.
- Is superagent free to use? What license does it have?
- superagent is open source under the MIT license. Check the license terms before using it in commercial products.
- Is superagent still maintained?
- Updated within 6 months. The last commit to superagent was on Aug 25, 2026.
- What can I use superagent for?
- Adding input filtering to a chatbot before it reaches the model Redacting sensitive customer data from prompts or logs Checking third-party repositories an AI coding agent will read Running Guard on self-hosted infrastructure with open-weight models
- How do I install superagent?
- Sign up at superagent.sh to get your API key Install the TypeScript SDK: npm install safety-agent Set your API key: export SUPERAGENT_API_KEY=your-key
- Where can I get superagent?
- The source code and installation instructions are on GitHub: https://github.com/superagent-ai/superagent
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
An open-source Python framework for red teaming LLM systems and AI agents, simulating attacks to find vulnerabilities and offering production guardrails.
An open-source Python toolkit for adding programmable guardrails to LLM-based conversational applications, controlling topics, dialog paths and outputs.
Python library for running agent evals and guardrails on hosted or local Jev-style decision models, with all checks for a trace sent in one request.
A pre-execution guard that blocks destructive Git and file system commands and secret-file access for AI coding agents like Claude Code and Codex.
Host-agnostic safety middleware that sits between tool-using AI agents and their tools to block risky calls and redact sensitive results.