Metadata-Version: 2.4
Name: agentsentinel-crewai
Version: 0.1.0
Summary: Security scanner for CrewAI multi-agent workflows — powered by AgentSentinel on SingularityNET
Author-email: Mohamed Hasni <medhasni760@gmail.com>
License: MIT
Project-URL: Homepage, https://huggingface.co/spaces/Ha1235/NeuralSentinel-landing
Project-URL: Repository, https://github.com/neuralsentinel/agentsentinel-crewai
Project-URL: Documentation, https://marketplace.singularitynet.io/servicedetails/org/neuralsentinel/service/agentsentinel-scanner/tab/0
Project-URL: Bug Tracker, https://github.com/neuralsentinel/agentsentinel-crewai/issues
Keywords: crewai,llm-security,ai-security,multi-agent,prompt-injection,red-team,owasp,agentsentinel,singularitynet,eu-ai-act
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Security
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: grpcio>=1.50.0
Provides-Extra: grpc
Requires-Dist: grpcio>=1.50.0; extra == "grpc"
Requires-Dist: grpcio-tools>=1.50.0; extra == "grpc"
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: crewai>=0.1.0; extra == "dev"

# agentsentinel-crewai

**Security scanner for CrewAI multi-agent workflows.**  
Powered by [AgentSentinel](https://marketplace.singularitynet.io/servicedetails/org/neuralsentinel/service/agentsentinel-scanner/tab/0) on SingularityNET mainnet.

Detects **8 attack categories** before your agents run:
- Agent Impersonation & Identity Spoofing
- Tool Call Hijacking (shell, exec, eval tools)
- Memory Poisoning
- Orchestrator Manipulation
- Privilege Escalation via Agent Chaining
- Goal Hijacking / Objective Corruption
- Inter-Agent Communication Injection
- Infinite Loop / Resource Exhaustion

---

## Install

```bash
pip install agentsentinel-crewai
```

---

## Quick Start

```python
from crewai import Agent, Task, Crew
from agentsentinel_crewai import scan_crew, SecurityAudit, secure_crew

# Build your crew as normal
researcher = Agent(
    role="Researcher",
    goal="Research topics",
    backstory="Expert researcher",
    allow_delegation=True,
    tools=["web_search", "read_file"]
)

crew = Crew(agents=[researcher], tasks=[...])

# Option 1 — scan and print report
report = scan_crew(crew)
report.print()

# Option 2 — raise SecurityError on CRITICAL findings
SecurityAudit(crew, block_on="CRITICAL").scan()

# Option 3 — decorator on your crew factory
@secure_crew(block_on="CRITICAL")
def build_research_crew():
    return Crew(agents=[...], tasks=[...])

crew = build_research_crew()  # raises SecurityError if CRITICAL issues found
```

---

## Configuration

```python
# Custom AgentSentinel endpoint (default: localhost:7009)
report = scan_crew(crew, endpoint="your-server:7009")

# Or via environment variable
import os
os.environ["AGENTSENTINEL_ENDPOINT"] = "your-server:7009"
```

**Using the SingularityNET hosted service:**  
Pay per scan in ASI tokens at `0.005 ASI/scan` via the marketplace.  
→ [AgentSentinel on SingularityNET](https://marketplace.singularitynet.io/servicedetails/org/neuralsentinel/service/agentsentinel-scanner/tab/0)

---

## Report Output

```
AgentSentinel Security Report — CrewAI
============================================================
  Risk Level : CRITICAL
  Risk Score : 75/100
  Findings   : 4
  Duration   : 12ms
  Framework  : crewai

  Findings:
  [CRITICAL] AGT02 — Shell execution tool detected
             Agent: AdminAgent
             Fix: Whitelist allowed tool calls. Never allow shell/exec tools without human approval.
  [HIGH    ] AGT05 — Unrestricted delegation enabled
             Fix: Implement least-privilege per agent role.
  [HIGH    ] AGT08 — No iteration limit — infinite loop risk
             Fix: Set explicit timeouts and iteration limits.
  [MEDIUM  ] AGT01 — Verbose mode exposes agent internals
             Fix: Disable verbose in production.
============================================================
```

---

## CI/CD Integration

```yaml
# GitHub Actions example
- name: Security scan CrewAI workflow
  run: |
    pip install agentsentinel-crewai
    python -c "
    from agentsentinel_crewai import scan_crew
    from your_module import build_crew
    report = scan_crew(build_crew())
    if report.risk_level == 'CRITICAL':
        exit(1)
    "
```

---

## Links

- [NeuralSentinel Platform](https://huggingface.co/spaces/Ha1235/NeuralSentinel-landing)
- [AgentSentinel on SingularityNET](https://marketplace.singularitynet.io/servicedetails/org/neuralsentinel/service/agentsentinel-scanner/tab/0)
- [EU AI Act Compliance](mailto:medhasni760@gmail.com)
- Contact: medhasni760@gmail.com

---

MIT License — © 2026 NeuralSentinel
