Flexible and powerful framework for managing multiple AI agents and handling complex conversations.
- π§ Intelligent intent classification β Dynamically route queries to the most suitable agent based on context and content.
- π Flexible agent responses β Support for both streaming and non-streaming responses from different agents.
- π Context management β Maintain and utilize conversation context across multiple agents for coherent interactions.
- π§ Extensible architecture β Easily integrate new agents or customize existing ones to fit your specific needs.
- π Universal deployment β Run anywhere - from AWS Lambda to your local environment or any cloud platform.
- π¦ Pre-built agents and classifiers β A variety of ready-to-use agents and multiple classifier implementations available.
The Multi-Agent Orchestrator is a flexible framework for managing multiple AI agents and handling complex conversations. It intelligently routes queries and maintains context across interactions.
The system offers pre-built components for quick deployment, while also allowing easy integration of custom agents and conversation messages storage solutions.
This adaptability makes it suitable for a wide range of applications, from simple chatbots to sophisticated AI systems, accommodating diverse requirements and scaling efficiently.

- The process begins with user input, which is analyzed by a Classifier.
- The Classifier leverages both Agents' Characteristics and Agents' Conversation history to select the most appropriate agent for the task.
- Once an agent is selected, it processes the user input.
- The orchestrator then saves the conversation, updating the Agents' Conversation history, before delivering the response back to the user.
We are building a robust ecosystem centered on resource-based Agents (rAgents) with advanced verifiability, complemented by powerful multi-agent orchestration. This enables both the seamless development of new rAgents and the efficient coordination of large-scale agent swarms in production environments.
We provide four core resource agent types:
- Data Resources (RD): For managing datasets, files, and streams
- Social Resources (RX): For social media account interactions
- Compute Resources (RC): For CPU, GPU, and RAM management
- Execution Resources (RE): For Docker and runtime environments
// Create a swarm of agents
const swarm = new Swarm({
agents: [socialAgent, computeAgent, dataAgent],
orchestration: {
type: 'collaborative',
strategy: 'round-robin'
}
});
// Define interaction patterns
swarm.defineInteraction({
between: ['socialAgent', 'dataAgent'],
protocol: 'request-response',
sharing: ['data', 'results']
});
import { Agent, AgentConfig } from '@rome-sdk/agents';
import { Swarm, SwarmConfig } from '@rome-sdk/swarm';
const config: AgentConfig = {
id: 'agent-001',
capabilities: ['compute', 'storage'],
resources: {
maxMemory: '1GB',
maxCPU: 2
}
};
const agent = new Agent(config);
await agent.initialize();
// ...existing state management code...
// ...existing graceful shutdown and recovery code...
// ...existing health monitoring and auto-healing code...
const swarmConfig: SwarmConfig = {
name: 'processing-swarm',
minAgents: 3,
maxAgents: 10,
consensusStrategy: 'raft'
};
const swarm = new Swarm(swarmConfig);
await swarm.addAgent(agent);
// ...existing role-based agent organization code...
const task = new Task({
id: 'task-001',
type: 'DATA_PROCESSING',
priority: 'HIGH',
timeout: '5m'
});
await swarm.distributeTask(task, {
strategy: 'round-robin',
retries: 3
});
// ...existing consensus mechanisms code...
// Subscribe to events
agent.on('message', async (message) => {
console.log('Received:', message);
});
// Send message to another agent
await agent.sendMessage('agent-002', {
type: 'TASK_ASSIGNMENT',
payload: { taskId: 'task-001' }
});
// ...existing pub/sub event system code...
// ...existing broadcast communications code...
// ...existing message queuing and persistence code...
// Share resources
await agent.shareResource({
type: 'COMPUTE',
amount: '500MB',
target: 'agent-003',
duration: '30m'
});
// Monitor usage
agent.on('resource-usage', (metrics) => {
console.log('Current usage:', metrics);
});
// ...existing storage allocation code...
// ...existing memory management code...
// ...existing resource discovery code...
import { SecurityManager } from '@rome-sdk/core';
const security = new SecurityManager({
encryption: 'AES-256',
tokenValidity: '24h'
});
const token = await security.generateToken(agent.id);
// Grant capability
await agent.grantCapability('storage-access', {
target: 'agent-002',
duration: '1h',
permissions: ['read', 'write']
});
// Use capability
await agent.useCapability('storage-access', {
operation: 'write',
data: buffer
});
// ...existing encryption for data in transit code...
// ...existing access token management code...
npm install @rome-sdk/core @rome-sdk/agents @rome-sdk/swarm
import { Agent, AgentConfig } from '@rome-sdk/agents';
import { Swarm, SwarmConfig } from '@rome-sdk/swarm';
const config: AgentConfig = {
id: 'agent-001',
capabilities: ['compute', 'storage'],
resources: {
maxMemory: '1GB',
maxCPU: 2
}
};
const agent = new Agent(config);
await agent.initialize();
const swarmConfig: SwarmConfig = {
name: 'processing-swarm',
minAgents: 3,
maxAgents: 10,
consensusStrategy: 'raft'
};
const swarm = new Swarm(swarmConfig);
await swarm.addAgent(agent);
// Subscribe to events
agent.on('message', async (message) => {
console.log('Received:', message);
});
// Send message to another agent
await agent.sendMessage('agent-002', {
type: 'TASK_ASSIGNMENT',
payload: { taskId: 'task-001' }
});
class CustomAgent extends Agent {
async onMessageReceived(message: Message) {
// Custom message handling
}
async onResourceRequest(request: ResourceRequest) {
// Custom resource handling
}
}
const policy = new SwarmPolicy({
scaling: {
minAgents: 5,
maxAgents: 20,
scalingFactor: 1.5
},
resourceLimits: {
maxMemoryPerAgent: '2GB',
maxCPUPerAgent: 4
},
security: {
requireEncryption: true,
tokenRefreshInterval: '6h'
}
});
await swarm.applyPolicy(policy);
- Clone framework repository
- Implement new agent type
- Configure resource access
- Submit pull request with:
- β Agent implementation
- β Resource configuration
- β Documentation
- β Tests
- Fork SDK repository
- Add new orchestration patterns
- Create example use cases
- Submit merge request with:
- β Implementation
- β Documentation
- β Usage examples
- β Performance benchmarks