{"id":13494722,"url":"https://github.com/superagent-ai/superagent","last_synced_at":"2026-10-07T03:05:34.181Z","repository":{"id":163663469,"uuid":"639096757","full_name":"superagent-ai/superagent","owner":"superagent-ai","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.","archived":false,"fork":false,"pushed_at":"2026-08-25T09:45:01.000Z","size":92552,"stargazers_count":6765,"open_issues_count":18,"forks_count":964,"subscribers_count":60,"default_branch":"main","last_synced_at":"2026-10-04T05:14:06.371Z","etag":null,"topics":["ai","anthropic","guardrails","llm","openai","prompt-injection","security"],"latest_commit_sha":null,"homepage":"https://superagent.sh","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/superagent-ai.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"claude":null,"gemini":null,"cursor":null,"copilot":null,"dco":null,"cla":null,"disclosure":null}},"created_at":"2023-05-10T18:50:39.000Z","updated_at":"2026-10-04T00:16:13.000Z","dependencies_parsed_at":"2026-09-17T13:54:22.376Z","dependency_job_id":null,"html_url":"https://github.com/superagent-ai/superagent","commit_stats":null,"previous_names":["superagent-ai/superagent","homanp/superagent"],"tags_count":197,"template":false,"template_full_name":null,"purl":"pkg:github/superagent-ai/superagent","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superagent-ai%2Fsuperagent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superagent-ai%2Fsuperagent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superagent-ai%2Fsuperagent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superagent-ai%2Fsuperagent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/superagent-ai","download_url":"https://codeload.github.com/superagent-ai/superagent/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superagent-ai%2Fsuperagent/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":343170754,"owners_count":38106216,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-10-03T21:59:58.778Z","status":"online","status_checked_at":"2026-10-07T02:00:06.311Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","anthropic","guardrails","llm","openai","prompt-injection","security"],"created_at":"2024-07-31T19:01:27.535Z","updated_at":"2026-10-07T03:05:32.361Z","avatar_url":"https://github.com/superagent-ai.png","language":"TypeScript","funding_links":[],"categories":["LLMOps","TypeScript","Rust","🚀 AI Tools for Vim, Neovim, and Terminal","Learning","ai","Observability / evals","NLP","Table of Open-Source AI Agents Projects","Agents 开发平台","Agent Integration \u0026 Deployment Tools","Security","Tools","10. AI Safety, Alignment \u0026 Interpretability","Chatbots \u0026 Virtual Companions","LLM and Agent Observability","AI Agents","Defense \u0026 Security Controls","Conversational / General Agents","*Ops for AI"],"sub_categories":["AI Safety \u0026 Guardrails","Repositories","AI Agent Gateway","Security Tools","Agents","Input/Output Guardrails","LLMOps"],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"logo.png\" width=\"80\" alt=\"Superagent\" /\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eSuperagent SDK\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eMake your AI apps safe.\u003c/strong\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://superagent.sh\"\u003eWebsite\u003c/a\u003e ·\n  \u003ca href=\"https://docs.superagent.sh\"\u003eDocs\u003c/a\u003e ·\n  \u003ca href=\"https://discord.gg/spZ7MnqFT4\"\u003eDiscord\u003c/a\u003e ·\n  \u003ca href=\"https://huggingface.co/superagent-ai\"\u003eHuggingFace\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Y%20Combinator-Backed-orange\" alt=\"Y Combinator\" /\u003e\n  \u003cimg src=\"https://img.shields.io/github/stars/superagent-ai/superagent?style=social\" alt=\"GitHub stars\" /\u003e\n  \u003cimg src=\"https://img.shields.io/badge/license-MIT-blue\" alt=\"MIT License\" /\u003e\n  \u003ca href=\"https://www.superagent.sh/\"\u003e\n  \u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://www.superagent.sh/api/badge/superagent-ai/superagent/shield.svg?theme=dark\u0026accent=teal\u0026variant=streak\"\u003e\n    \u003cimg alt=\"Security posture verified by Superagent\" src=\"https://www.superagent.sh/api/badge/superagent-ai/superagent/shield.svg?theme=light\u0026accent=teal\u0026variant=streak\"\u003e\n  \u003c/picture\u003e\n\u003c/a\u003e\n\u003c/p\u003e\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 \u003cEMAIL_REDACTED\u003e and SSN is \u003cSSN_REDACTED\u003e\"\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 \u003cEMAIL_REDACTED\u003e and SSN is \u003cSSN_REDACTED\u003e\"\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## Security\n\nRead [SECURITY.md](SECURITY.md)\n\n\u003ca href=\"https://www.superagent.sh\"\u003e\n  \u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://www.superagent.sh/api/badge/superagent-ai/superagent/card.svg?theme=dark\u0026accent=teal\"\u003e\n    \u003cimg alt=\"Security posture verified by Superagent\" src=\"https://www.superagent.sh/api/badge/superagent-ai/superagent/card.svg?theme=light\u0026accent=teal\"\u003e\n  \u003c/picture\u003e\n\u003c/a\u003e\n\n## Resources\n\n- [Documentation](https://docs.superagent.sh)\n- [Discord Community](https://discord.gg/spZ7MnqFT4)\n- [HuggingFace Models](https://huggingface.co/superagent-ai)\n- [Twitter/X](https://x.com/superagent_ai)\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuperagent-ai%2Fsuperagent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsuperagent-ai%2Fsuperagent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuperagent-ai%2Fsuperagent/lists"}