{"data":{"slug":"superagent-ai-superagent","name":"superagent","tagline":"Superagent SDK","github_url":"https://github.com/superagent-ai/superagent","owner":"superagent-ai","repo":"superagent","owner_avatar_url":"https://avatars.githubusercontent.com/u/152537519?v=4","primary_language":"TypeScript","stars":6713,"forks":965,"topics":["ai","anthropic","guardrails","llm","openai","prompt-injection","security"],"archived":false,"github_pushed_at":"2026-08-13T20:23:19+00:00","maintenance_label":"Very active","stars_delta_30d":41,"url":"https://www.graphcanon.com/tools/superagent-ai-superagent","markdown_url":"https://www.graphcanon.com/tools/superagent-ai-superagent.md","api_url":"https://www.graphcanon.com/api/graphcanon/tools/superagent-ai-superagent","graph_url":"https://www.graphcanon.com/api/graphcanon/graph?tool=superagent-ai-superagent","description":"Superagent protects your AI applications against prompt injections, data leaks, and harmful outputs. Embed safety directly into your app and prove compliance to your customers.","homepage_url":"https://superagent.sh","license":"MIT","open_issues":12,"watchers":60,"ai_summary":"An open-source SDK for protecting AI applications against prompt injections, data leaks, and harmful outputs.","readme_excerpt":"<p align=\"center\">\n  <img src=\"logo.png\" width=\"80\" alt=\"Superagent\" />\n</p>\n\n<h1 align=\"center\">Superagent SDK</h1>\n\n<p align=\"center\">\n  <strong>Make your AI apps safe.</strong>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://superagent.sh\">Website</a> ·\n  <a href=\"https://docs.superagent.sh\">Docs</a> ·\n  <a href=\"https://discord.gg/spZ7MnqFT4\">Discord</a> ·\n  <a href=\"https://huggingface.co/superagent-ai\">HuggingFace</a>\n</p>\n\n<p align=\"center\">\n  <img src=\"https://img.shields.io/badge/Y%20Combinator-Backed-orange\" alt=\"Y Combinator\" />\n  <img src=\"https://img.shields.io/github/stars/superagent-ai/superagent?style=social\" alt=\"GitHub stars\" />\n  <img src=\"https://img.shields.io/badge/license-MIT-blue\" alt=\"MIT License\" />\n</p>\n\n---\n\nAn open-source SDK for AI agent safety. Block prompt injections, redact PII and secrets, scan repositories for threats, and run red team scenarios against your agent.\n\n## Features\n\n### Guard\n\nDetect and block prompt injections, malicious instructions, and unsafe tool calls at runtime.\n\n**TypeScript:**\n\n```typescript\nimport { createClient } from \"safety-agent\";\n\nconst client = createClient();\n\nconst result = await client.guard({\n  input: userMessage\n});\n\nif (result.classification === \"block\") {\n  console.log(\"Blocked:\", result.violation_types);\n}\n```\n\n**Python:**\n\n```python\nfrom safety_agent import create_client\n\nclient = create_client()\n\nresult = await client.guard(input=user_message)\n\nif result.classification == \"block\":\n    print(\"Blocked:\", result.violation_types)\n```\n\n### Redact\n\nRemove PII, PHI, and secrets from text automatically.\n\n**TypeScript:**\n\n```typescript\nconst result = await client.redact({\n  input: \"My email is john@example.com and SSN is 123-45-6789\",\n  model: \"openai/gpt-4o-mini\"\n});\n\nconsole.log(result.redacted);\n// \"My email is <EMAIL_REDACTED> and SSN is <SSN_REDACTED>\"\n```\n\n**Python:**\n\n```python\nresult = await client.redact(\n    input=\"My email is john@example.com and SSN is 123-45-6789\",\n    model=\"openai/gpt-4o-mini\"\n)\n\nprint(result.redacted)\n# \"My email is <EMAIL_REDACTED> and SSN is <SSN_REDACTED>\"\n```\n\n### Scan\n\nAnalyze repositories for AI agent-targeted attacks such as repo poisoning and malicious instructions.\n\n**TypeScript:**\n\n```typescript\nconst result = await client.scan({\n  repo: \"https://github.com/user/repo\"\n});\n\nconsole.log(result.result);  // Security report\nconsole.log(`Cost: $${result.usage.cost.toFixed(4)}`);\n```\n\n**Python:**\n\n```python\nresult = await client.scan(repo=\"https://github.com/user/repo\")\n\nprint(result.result)  # Security report\nprint(f\"Cost: ${result.usage.cost:.4f}\")\n```\n\n### Test\n\nRun red team scenarios against your production agent. *(Coming soon)*\n\n```typescript\nconst result = await client.test({\n  endpoint: \"https://your-agent.com/chat\",\n  scenarios: [\"prompt_injection\", \"data_exfiltration\"]\n});\n\nconsole.log(result.findings);  // Vulnerabilities discovered\n```\n\n## Get Started\n\nSign up at [superagent.sh](https://superagent.sh) to get your API key.\n\n**TypeScript:**\n\n```bash\nnpm install safety-agent\n```\n\n**Python:**\n\n```bash\nuv add safety-agent\n```\n\n**Set your API key:**\n\n```bash\nexport SUPERAGENT_API_KEY=your-key\n```\n\n## Integration Options\n\n| Option | Description | Link |\n|--------|-------------|------|\n| **TypeScript SDK** | Embed guard, redact, and scan directly in your app | [sdk/typescript](sdk/typescript/README.md) |\n| **Python SDK** | Embed guard, redact, and scan directly in Python apps | [sdk/python](sdk/python/README.md) |\n| **CLI** | Command-line tool for testing and automation | [cli](cli/README.md) |\n| **MCP Server** | Use with Claude Code and Claude Desktop | [mcp](mcp/README.md) |\n\n## Why Superagent SDK?\n\n- **Works with any model** — OpenAI, Anthropic, Google, Groq, Bedrock, and more\n- **Open-weight models** — Run Guard on your infrastructure with 50-100ms latency\n- **Low latency** — Optimized for runtime use\n- **Open source** — MIT license with full transparency\n\n## Open-Weight Models\n\nRun Guard on your own infrastructure. No API","github_created_at":"2023-05-10T18:50:39+00:00","created_at":"2026-07-11T10:46:42.068045+00:00","updated_at":"2026-08-14T18:01:05.677096+00:00","categories":[{"slug":"evaluation-observability","name":"Evaluation & Observability","url":"https://www.graphcanon.com/categories/evaluation-observability","markdown_url":"https://www.graphcanon.com/categories/evaluation-observability.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/evaluation-observability"}],"tags":[{"slug":"ai","name":"ai"},{"slug":"anthropic","name":"anthropic"},{"slug":"guardrails","name":"guardrails"},{"slug":"llm","name":"llm"},{"slug":"openai","name":"openai"},{"slug":"prompt-injection","name":"prompt-injection"},{"slug":"security","name":"security"}],"trust":{"provenance":{"is_fork":false,"github_id":639096757,"owner_type":"Organization","methodology":"github_public_v1","parent_repo":null,"near_duplicate_slugs":[]},"computed_at":"2026-08-14T18:01:04.789Z","maintenance":{"label":"Very active","score":96,"methodology":"github_public_v1","releases_90d":0,"days_since_push":0,"last_release_at":"2025-09-14T06:34:49Z","stars_delta_30d":41,"open_issues_delta_30d":0},"security_summary":{"status":"no_lockfile","scanner":null,"low_count":0,"high_count":0,"last_scan_at":"2026-07-11T10:46:46.234Z","medium_count":0,"scan_profile":"none","critical_count":0}},"capability_facts":{"scan":{"source":"repo_scan","observed_at":"2026-08-14T18:01:05.295Z"},"languages":{"value":["typescript"],"source":"github.language","observed_at":"2026-08-14T18:01:05.295Z"},"license_spdx":{"value":"MIT","source":"github.license","observed_at":"2026-08-14T18:01:05.295Z"}},"decision_facts":{"hosting":{"model":"managed","summary":"Superagent requires integrating their API via an SDK for TypeScript or Python applications. Users must obtain an API key for accessing these services."},"pricing":null,"requirements":null,"constraints":{"hosting_model":"managed"},"when_to_use":["Use Superagent when you need a proactive solution that can detect and block malicious activities such as prompt injections and redact personal information automatically.","Integrate it if your application handles sensitive data and requires automation for security checks like PII removal, which can be tailored to specific models (e.g., 'openai/gpt-4o-mini').","Choose Superagent if you need tools to analyze code repositories for potential AI-targeted attacks, giving you a detailed security analysis."],"when_not_to_use":["Avoid using Superagent when your project does not require the specific safety measures it offers, such as prompt injection prevention or scanning GitHub repositories for malicious activities.","If another tool in the same category provides better coverage or more advanced features that are critical to your application's security needs and aligns closer with your tech stack."],"source":"enrich:decision_facts","observed_at":"2026-07-12T11:13:03.825Z"},"constraint_facets":{"hosting_model":"managed"},"decision_summary":[{"label":"Hosting","value":"managed - Superagent requires integrating their API via an SDK for TypeScript or Python applications. Users must obtain an API key for accessing these services."},{"label":"Adopt for","value":"Superagent is an open-source SDK designed to protect AI applications from prompt injections, data leaks, and harmful outputs. It supports integration directly within TypeScript or Python applications."},{"label":"License detail","value":"MIT License permits use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the SDK, provided that copyright notices and license texts accompany any distributed parts."}]}}