nerq-crewai
Trust verification and agent discovery for CrewAI crews. Gate tool calls with preflight trust checks. Discover trusted agents from 204K indexed.
Install
pip install nerq-crewai
Trust Gate — Protect Your Crew
Wrap your crew's tools with preflight trust checks. Before each tool executes, nerq-crewai verifies the tool's trust score against Nerq's database.
from crewai import Agent, Crew, Task from nerq_crewai import trust_gate_crew # Build your crew as normal researcher = Agent(role="Researcher", goal="Find data", ...) writer = Agent(role="Writer", goal="Write report", ...) crew = Crew(agents=[researcher, writer], tasks=[...]) # Add trust verification — all tool calls are now gated trust_gate_crew(crew, min_trust=60) # Tools with trust < 60 will raise TrustError result = crew.kickoff()
Discover Trusted Agents
Search Nerq's index to find trusted agents for your crew.
from nerq_crewai import NerqCrewBuilder builder = NerqCrewBuilder() # Discover agents for specific capabilities agents = builder.discover_agents( capabilities=["code review", "security analysis"], min_trust_score=75 ) # Or build a full crew automatically crew = builder.build_crew( task_description="Analyze codebase for security vulnerabilities", roles=["analyst", "developer", "reviewer"], min_trust_score=80 ) # Find top agents by category top_tools = builder.discover_trusted_tools("security", min_trust=70)
How Trust Gating Works
PROCEED (trust ≥ 70) — Tool executes silently.
CAUTION (trust 40–69) — Warning logged, tool executes.
DENY (trust < 40) — TrustError raised, tool blocked.
UNKNOWN (not found) — Warning logged, tool executes.
API Reference
trust_gate_crew(crew, min_trust=60, caller=None)
Wraps all tools in the crew with preflight trust checks. Returns the modified crew.
NerqCrewBuilder(base_url="https://nerq.ai/v1")
Builder for discovering and assembling trusted crews.
.discover_agents(capabilities, min_trust_score=75)— Search by capability.build_crew(task, roles, min_trust_score=80)— Auto-build a crew.discover_trusted_tools(category, min_trust=70)— Top agents in category.get_recommended_crew_composition(project_type, complexity)— Role suggestions
TrustError
Raised when a tool call is denied. Has .tool_name,
.trust_score, and .recommendation attributes.