Integrations
CrewAI
Trust-based task delegation between crew members.
Trust-based task delegation for CrewAI crews. When multiple agents are available, QovaTrustDelegation assigns tasks based on each agent's on-chain credit score. High-value tasks go to high-scored agents. Low-value tasks can be handled by newer agents still building reputation.
Install
bun add @qova/crewai @brnmwai/qova-coreHow It Works
- For each agent in
availableAgents, reads their score from ReputationRegistry on-chain - Classifies the task by value tier (highValue / standard / lowValue)
- Filters agents whose score meets the tier threshold
- Among qualifying agents, picks the highest-scored one
- After task completion, records the outcome via TransactionValidator
Usage
import { QovaTrustDelegation } from "@qova/crewai";
const delegation = new QovaTrustDelegation({
chain: "base-sepolia",
scoreThresholds: {
highValue: 800, // Only AAA/AA/A agents handle these
standard: 650, // BB+ agents for routine tasks
lowValue: 450, // CCC+ agents for low-risk work
},
});
// Delegation reads each agent's score and picks the best fit
const assignedAgent = await delegation.assignTask(task, availableAgents);Delegation Flow
Task arrives with value tier
|
v
[Read scores for all available agents] --> ReputationRegistry on Base
|
v
[Filter by tier threshold]
|-- highValue task (e.g. $10,000 swap) --> Only agents scoring 800+
|-- standard task (e.g. $500 payment) --> Only agents scoring 650+
|-- lowValue task (e.g. $10 transfer) --> Only agents scoring 450+
|
v
[Pick highest-scored qualifying agent]
|
v
[Execute task] --> [Record outcome to TransactionValidator]Threshold Mapping
| Tier | Score Threshold | Credit Grade | Example Tasks |
|---|---|---|---|
| High Value | 800+ | A or above | Large swaps, bridge operations, contract deployments |
| Standard | 650+ | BB or above | Routine payments, transfers, API calls |
| Low Value | 450+ | CCC or above | Data queries, read operations, logging |
Features
- Score-based task assignment - highest-trust agent gets the task
- Tiered delegation thresholds - different minimums for different task values
- Score updates after completion - successful tasks improve the agent's reputation
- Crew-level aggregation - view the overall trust level of an entire crew
- Fallback handling - configurable behavior when no agent meets the threshold