| Crates.io | spec-ai-collective |
| lib.rs | spec-ai-collective |
| version | 0.6.0-prerelease.12 |
| created_at | 2025-12-08 12:40:52.454675+00 |
| updated_at | 2026-01-04 05:03:13.195955+00 |
| description | Emergent collective intelligence for spec-ai agents |
| homepage | |
| repository | https://github.com/geoffsee/spec-ai |
| max_upload_size | |
| id | 1973448 |
| size | 142,914 |
Emergent collective intelligence for multi-agent coordination in spec-ai.
This crate provides the building blocks for agents to coordinate, learn from each other, and develop specialized expertise over time. Unlike knowledge graph sync (which shares data), collective intelligence enables agents to share experience and coordinate behavior.
capabilityTrack agent proficiency across domains using EMA-based updates.
use spec_ai_collective::capability::{Capability, CapabilityTracker, TaskOutcome};
let mut capability = Capability::new("code_review");
capability.update(TaskOutcome::Success, Duration::from_secs(30));
// Proficiency updates via exponential moving average
delegationRoute tasks to capable peers in the mesh.
use spec_ai_collective::delegation::{DelegatedTask, DelegationManager, TaskPriority};
let task = DelegatedTask::new(
"refactor_module",
TaskPriority::Normal,
vec!["rust".into(), "refactoring".into()],
);
learningShare and discover successful strategies.
use spec_ai_collective::learning::{Strategy, LearningFabric};
let strategy = Strategy::new(
"api_design",
vec!["Define endpoints", "Add validation", "Document"],
None, // optional embedding
);
consensusExpertise-weighted collective decision-making.
use spec_ai_collective::consensus::{Proposal, ProposalType, ConsensusCoordinator};
let proposal = Proposal::new(
proposer_id,
ProposalType::StrategyAdoption,
"Adopt caching strategy",
"Use LRU for API responses",
0.6, // quorum
deadline,
);
orchestrationMulti-agent workflow coordination.
use spec_ai_collective::orchestration::{Workflow, WorkflowStage, StageType};
let workflow = Workflow::new("pipeline", vec![
WorkflowStage::new("fetch", StageType::Parallel, vec![]),
WorkflowStage::new("process", StageType::MapReduce {
map_capability: "parsing".into(),
reduce_capability: "aggregation".into(),
}, vec!["fetch"]),
]);
specializationDetect emergent expertise and capability gaps.
use spec_ai_collective::specialization::{SpecializationEngine, SpecializationStatus};
let engine = SpecializationEngine::new();
// Returns specialists sorted by proficiency
let experts = engine.get_specialists("security_review");
| Concept | Description |
|---|---|
| Capability | Proficiency + experience in a domain |
| Strategy | Proven approach steps for a task type |
| Proposal | Request for collective decision |
| Workflow | Multi-stage, multi-agent task plan |
| Specialist | Agent with high proficiency in a domain |
This crate is used by:
spec-ai-core for collective intelligence toolsspec-ai-config for persistence of capabilities, strategies, etc.spec-ai-api for mesh message handlingMIT License - see repository root for details.