{"id":43907894,"url":"https://github.com/nirdiamant/moltbook-agent-guard","last_synced_at":"2026-02-11T00:01:08.321Z","repository":{"id":336471700,"uuid":"1149819520","full_name":"NirDiamant/moltbook-agent-guard","owner":"NirDiamant","description":"Real-time security for AI agents on Moltbook","archived":false,"fork":false,"pushed_at":"2026-02-04T15:05:48.000Z","size":11172,"stargazers_count":42,"open_issues_count":0,"forks_count":3,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-10T00:37:24.101Z","etag":null,"topics":["ai-agents","llm","moltbook","prompt-injection","security"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NirDiamant.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"docs/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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,"dco":null,"cla":null}},"created_at":"2026-02-04T15:02:13.000Z","updated_at":"2026-02-09T04:40:58.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/NirDiamant/moltbook-agent-guard","commit_stats":null,"previous_names":["nirdiamant/moltbook-agent-guard"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/NirDiamant/moltbook-agent-guard","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NirDiamant%2Fmoltbook-agent-guard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NirDiamant%2Fmoltbook-agent-guard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NirDiamant%2Fmoltbook-agent-guard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NirDiamant%2Fmoltbook-agent-guard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NirDiamant","download_url":"https://codeload.github.com/NirDiamant/moltbook-agent-guard/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NirDiamant%2Fmoltbook-agent-guard/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29322733,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-10T20:44:44.282Z","status":"ssl_error","status_checked_at":"2026-02-10T20:44:43.393Z","response_time":65,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-agents","llm","moltbook","prompt-injection","security"],"created_at":"2026-02-06T20:06:37.227Z","updated_at":"2026-02-11T00:01:08.279Z","avatar_url":"https://github.com/NirDiamant.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/logo.svg\" alt=\"Moltbook Agent Guard\" width=\"400\"\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eMoltbook Agent Guard\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eReal-time security for AI agents on Moltbook\u003c/strong\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://moltbook.com\"\u003e\u003cimg src=\"https://img.shields.io/badge/Moltbook-770K+_Agents-purple\" alt=\"Moltbook\"\u003e\u003c/a\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Security-First-green\" alt=\"Security First\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/License-Apache_2.0-blue\" alt=\"License\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.linkedin.com/in/nir-diamant-759323134/\"\u003e\u003cimg src=\"https://img.shields.io/badge/LinkedIn-Connect-blue\" alt=\"LinkedIn\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://twitter.com/NirDiamantAI\"\u003e\u003cimg src=\"https://img.shields.io/twitter/follow/NirDiamantAI?label=Follow\u0026style=social\" alt=\"Twitter\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://discord.gg/cA6Aa4uyDX\"\u003e\u003cimg src=\"https://img.shields.io/badge/Discord-Join-7289da\" alt=\"Discord\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n## 📫 Stay Updated\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://diamantai.substack.com/?r=336pe4\u0026utm_campaign=pub-share-checklist\"\u003e\n    \u003cimg src=\"images/subscribe-button.svg\" alt=\"Subscribe to Newsletter\"\u003e\n  \u003c/a\u003e\n  \u003cbr\u003e\n  \u003cem\u003eJoin 50,000+ AI enthusiasts for cutting-edge insights and tutorials\u003c/em\u003e\n\u003c/p\u003e\n\n[![DiamantAI Newsletter](images/substack_image.png)](https://diamantai.substack.com/?r=336pe4\u0026utm_campaign=pub-share-checklist)\n\n---\n\n## Why This Toolkit?\n\n[Moltbook](https://moltbook.com) is the world's largest social network for AI agents (770K+ agents). Research shows **2.6% of posts contain prompt injection attacks** targeting vulnerable agents.\n\nThis toolkit protects your agent from hijacking, credential theft, and manipulation.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/security_dashboard.png\" alt=\"Security Dashboard\" width=\"800\"\u003e\n  \u003cbr\u003e\n  \u003cem\u003eReal threats detected and blocked on Moltbook\u003c/em\u003e\n\u003c/p\u003e\n\n### Attacks Blocked\n\n| Attack Type | Risk |\n|-------------|------|\n| Jailbreak attempts | 🔴 High |\n| Credential extraction | 🔴 High |\n| Data exfiltration | 🔴 High |\n| System prompt extraction | 🔴 High |\n| Role hijacking | 🟡 Medium |\n| Encoded payloads | 🟡 Medium |\n\n### How It Works\n\nWhen your agent runs, the security scanner protects it **in real-time**:\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/how-it-works.svg\" alt=\"How It Works\" width=\"700\"\u003e\n\u003c/p\u003e\n\n```python\n# Inside the agent runtime (tools/agent/runtime.py)\ndef _process_post(self, post):\n    is_safe, scan_result = self._scan_content(post.content)  # Every post is scanned\n    if not is_safe:\n        return None  # Malicious content never reaches your LLM\n    # ... process safe content\n```\n\n**Without this toolkit:** Your agent processes malicious posts and risks leaking API keys or getting hijacked.\n\n**With this toolkit:** Threats are detected and blocked before they ever reach your LLM.\n\n---\n\n## Quick Start\n\n```bash\ngit clone https://github.com/NirDiamant/moltbook-agent-toolkit.git\ncd moltbook-agent-toolkit\npip install -r requirements.txt\n\n# Setup (interactive wizard)\nexport MOLTBOOK_API_KEY=\"your_key\"\nexport ANTHROPIC_API_KEY=\"your_key\"\n./moltbook init\n\n# Deploy\n./moltbook deploy --direct\n```\n\n---\n\n## Security Dashboard\n\nDeploy your own dashboard to track threats in real-time.\n\n**Streamlit Cloud (Free, 2 min):**\n1. Fork this repo\n2. Go to [share.streamlit.io](https://share.streamlit.io)\n3. Set app path: `dashboard/streamlit_app.py`\n4. Add secret: `MOLTBOOK_API_KEY = \"your_key\"`\n5. Deploy\n\n**Local:**\n```bash\nMOLTBOOK_API_KEY=\"your_key\" streamlit run dashboard/streamlit_app.py\n```\n\n---\n\n## CLI Commands\n\n```bash\n./moltbook init                    # Setup wizard\n./moltbook deploy                  # Deploy agent\n./moltbook security                # View security incidents\n./moltbook security --scan         # Scan for threats\n./moltbook security --html report.html  # Export report\n```\n\n---\n\n## Security Modules\n\n24 modules across 6 protection layers:\n\n- **Critical**: Output scanner, error sanitizer, log redactor\n- **AI Firewall**: Llama Guard + LLM Guard + pattern matching\n- **Platform**: Memory sanitizer, egress firewall, credential monitor\n- **Social**: Social engineering detection, reputation protection\n- **Data**: Exfiltration prevention, financial safety\n- **Infrastructure**: Docker isolation (cap_drop ALL, read-only fs)\n\n```python\nfrom tools.security import SecurityManager\n\nsecurity = SecurityManager(level=\"standard\")\nresult = security.scan_input(user_content)\nif result.blocked:\n    print(f\"Blocked: {result.reason}\")\n```\n\n---\n\n## Related Projects\n\n- **[Agents Towards Production](https://github.com/NirDiamant/agents-towards-production)** — Production-grade GenAI agent tutorials\n- **[GenAI Agents](https://github.com/NirDiamant/GenAI_Agents)** — AI agent implementations from simple to complex\n- **[RAG Techniques](https://github.com/NirDiamant/RAG_Techniques)** — Comprehensive RAG guide\n- **[Prompt Engineering](https://github.com/NirDiamant/Prompt_Engineering)** — Prompting strategies collection\n\n---\n\n## License\n\nApache 2.0 — see [LICENSE](LICENSE)\n\n---\n\n## Disclaimer\n\nThis toolkit is built in good faith with a genuine desire to help developers secure their AI agents. However, security is an ongoing battle — every lock has someone trying to pick it.\n\n**We cannot guarantee this will stop all attacks.** Attackers evolve, new techniques emerge, and no security solution is bulletproof. This toolkit raises the bar significantly, but determined adversaries may still find ways through.\n\nUse this as one layer in your security strategy, not your only defense. Stay vigilant, keep your dependencies updated, and monitor your agents in production.\n\nBy using this software, you accept that the authors are not liable for any security incidents, damages, or losses that may occur.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnirdiamant%2Fmoltbook-agent-guard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnirdiamant%2Fmoltbook-agent-guard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnirdiamant%2Fmoltbook-agent-guard/lists"}