Core Concepts
The fundamental building blocks of the Departments neural operating system — agents, routers, consensus protocols, and the nexus architecture.
Agents
An agent is an autonomous reasoning unit powered by a large language model. Each agent has a defined role, memory scope, tool access, and communication channels. Agents operate asynchronously and coordinate through the neural router.
Agent definition schema:
# agents/my-agent.yml
name: cogniscan-Ω
role: market-intelligence
model:
provider: openai
name: gpt-4o
temperature: 0.2
memory:
type: hybrid
short_term: 1000 # context window
long_term: vector # pgvector-backed
tools:
- web-search
- data-analysis
- slack-notify
channels:
- type: graphql
endpoint: /v1/agents/cogniscan
- type: event-bus
topics: [market-deltas, competitor-alerts]Neural Router
The neural router is the central coordination layer. It receives tasks, determines which agent(s) should handle them, and routes the workload with optimal latency. Routing decisions use a combination of semantic matching, agent load, and historical performance.
# config/routing.yml
routing:
strategy: semantic-hybrid
matchers:
- type: embedding
model: text-embedding-3-large
threshold: 0.92
- type: rule
patterns:
- "refund" -> agent: support-triage
- "deploy" -> agent: devops-core
- "forecast" -> agent: cogniscan-Ω
fallback:
strategy: round-robin
pool: general-purpose-agentsConsensus Protocol
For critical decisions, Departments uses a multi-agent consensus protocol. When a decision threshold is crossed, the router spawns a consensus round where multiple agents independently evaluate the same input and vote.
| Mode | Min Votes | Latency | Use Case |
|---|---|---|---|
| Simple Majority | 3 | ~400ms | Low-risk classification |
| Super Majority | 5 | ~900ms | Financial decisions |
| Unanimous | all | ~1.4s | Security / access control |
| Weighted Expert | varies | ~600ms | Medical / legal |
# Trigger a consensus round via the API
curl -X POST https://api.departments.cyrus365.com/v1/consensus \
-H "Authorization: Bearer $DEP_TOKEN" \
-d '{
"task": "evaluate-acquisition-target",
"mode": "super-majority",
"context": { "company": "Nexigen AI", "valuation": 420000000 },
"agents": ["cogniscan-Ω", "aethra", "synthmind"],
"timeout_ms": 5000
}'Nexus Architecture
A Nexus is a deployed instance of the Departments system. It comprises one or more clusters, each containing agents, routers, and storage nodes. The architecture is horizontally scalable and supports multi-region deployment.
# nexus.json
{
"version": "4.2.7",
"name": "production-nexus",
"clusters": [
{
"id": "us-neural-1",
"region": "us-east-1",
"agents": ["cogniscan-Ω", "nexusflow", "aethra"],
"replicas": 3,
"storage": {
"type": "pgvector",
"connection_pool": 20
}
},
{
"id": "eu-cortex-1",
"region": "eu-west-1",
"agents": ["nexusflow", "synthmind"],
"replicas": 2,
"storage": { "type": "pgvector" }
}
],
"global_routing": {
"type": "geo-proximity",
"fallback_region": "us-neural-1"
}
}Memory System
Departments uses a tiered memory architecture to give agents both immediate context and persistent recall. Short-term memory resides in the agent context window, while long-term memory is stored in vector databases and retrieved via semantic search.
Ephemeral
In-context
TTL: Session
Conversation history
Working
Redis
TTL: 24h
Active task state
Archival
pgvector
TTL: Permanent
Learned patterns
Architecture Diagram
Below is a simplified representation of data flow through a Departments nexus:
┌─────────────────────────────────────────────────────────┐
│ API Gateway │
│ GraphQL ←→ REST ←→ WebSocket ←→ Event Bus │
└──────────────┬──────────────────────────────────────────┘
│
┌──────────────▼──────────────────────────────────────────┐
│ Neural Router │
│ [ semantic matcher ] [ load balancer ] [ fallback ] │
└──┬────────────┬────────────┬──────────────────┬─────────┘
│ │ │ │
┌──▼───┐ ┌────▼────┐ ┌───▼────┐ ┌─────▼──────┐
│Agent │ │ Agent │ │ Agent │ │ Consensus │
│Pool 1│ │ Pool 2 │ │ Pool 3 │ │ Engine │
└──┬───┘ └────┬────┘ └───┬────┘ └─────┬──────┘
│ │ │ │
┌──▼────────────▼────────────▼──────────────────▼───────┐
│ Memory Layer (pgvector + Redis) │
└───────────────────────────────────────────────────────┘