feat: Add intelligent auto-router and enhanced integrations
- Add intelligent-router.sh hook for automatic agent routing - Add AUTO-TRIGGER-SUMMARY.md documentation - Add FINAL-INTEGRATION-SUMMARY.md documentation - Complete Prometheus integration (6 commands + 4 tools) - Complete Dexto integration (12 commands + 5 tools) - Enhanced Ralph with access to all agents - Fix /clawd command (removed disable-model-invocation) - Update hooks.json to v5 with intelligent routing - 291 total skills now available - All 21 commands with automatic routing 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
13
dexto/examples/agent-manager-example/agents/coding-agent.yml
Normal file
13
dexto/examples/agent-manager-example/agents/coding-agent.yml
Normal file
@@ -0,0 +1,13 @@
|
||||
systemPrompt: |
|
||||
You are an expert coding assistant. You help developers write clean,
|
||||
efficient code and explain programming concepts clearly.
|
||||
|
||||
When providing code examples:
|
||||
- Use clear variable names
|
||||
- Add brief comments for complex logic
|
||||
- Follow best practices for the language
|
||||
|
||||
llm:
|
||||
provider: openai
|
||||
model: gpt-4o-mini
|
||||
apiKey: $OPENAI_API_KEY
|
||||
20
dexto/examples/agent-manager-example/agents/registry.json
Normal file
20
dexto/examples/agent-manager-example/agents/registry.json
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"agents": [
|
||||
{
|
||||
"id": "coding-agent",
|
||||
"name": "Coding Assistant",
|
||||
"description": "Expert coding assistant for development tasks",
|
||||
"configPath": "./coding-agent.yml",
|
||||
"author": "Dexto Team",
|
||||
"tags": ["coding", "development"]
|
||||
},
|
||||
{
|
||||
"id": "support-agent",
|
||||
"name": "Support Assistant",
|
||||
"description": "Friendly customer support agent",
|
||||
"configPath": "./support-agent.yml",
|
||||
"author": "Dexto Team",
|
||||
"tags": ["support", "customer-service"]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
systemPrompt: |
|
||||
You are a friendly and helpful customer support agent. Your goal is to
|
||||
help users resolve their issues quickly and leave them satisfied.
|
||||
|
||||
Guidelines:
|
||||
- Be warm and empathetic
|
||||
- Ask clarifying questions when needed
|
||||
- Provide clear, step-by-step solutions
|
||||
- Always thank users for their patience
|
||||
|
||||
llm:
|
||||
provider: openai
|
||||
model: gpt-4o-mini
|
||||
apiKey: $OPENAI_API_KEY
|
||||
82
dexto/examples/agent-manager-example/main.ts
Normal file
82
dexto/examples/agent-manager-example/main.ts
Normal file
@@ -0,0 +1,82 @@
|
||||
/**
|
||||
* AgentManager Example
|
||||
*
|
||||
* This example demonstrates how to use AgentManager to:
|
||||
* - Load agents from a registry file
|
||||
* - List available agents with metadata
|
||||
* - Create and use agents by ID
|
||||
*
|
||||
* Run with: npx tsx examples/agent-manager-example/main.ts
|
||||
*/
|
||||
import 'dotenv/config';
|
||||
import path from 'path';
|
||||
import { AgentManager } from '@dexto/agent-management';
|
||||
|
||||
const registryPath = path.join(import.meta.dirname, 'agents/registry.json');
|
||||
|
||||
async function main() {
|
||||
console.log('=== AgentManager Example ===\n');
|
||||
|
||||
// Initialize the manager with a registry file
|
||||
const manager = new AgentManager(registryPath);
|
||||
await manager.loadRegistry();
|
||||
|
||||
// List all available agents
|
||||
console.log('Available agents:');
|
||||
const agents = manager.listAgents();
|
||||
for (const agent of agents) {
|
||||
console.log(` - ${agent.name} (${agent.id})`);
|
||||
console.log(` ${agent.description}`);
|
||||
if (agent.tags?.length) {
|
||||
console.log(` Tags: ${agent.tags.join(', ')}`);
|
||||
}
|
||||
console.log();
|
||||
}
|
||||
|
||||
// Check if a specific agent exists
|
||||
const agentId = 'coding-agent';
|
||||
if (!manager.hasAgent(agentId)) {
|
||||
console.error(`Agent '${agentId}' not found in registry`);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
// Load and use the coding agent
|
||||
console.log(`Loading '${agentId}'...`);
|
||||
const codingAgent = await manager.loadAgent(agentId);
|
||||
await codingAgent.start();
|
||||
|
||||
const session = await codingAgent.createSession();
|
||||
|
||||
console.log('\nAsking the coding agent a question...\n');
|
||||
const response = await codingAgent.generate(
|
||||
'Write a TypeScript function that checks if a string is a palindrome.',
|
||||
session.id
|
||||
);
|
||||
|
||||
console.log('Response:');
|
||||
console.log(response.content);
|
||||
console.log(`\n(Used ${response.usage.totalTokens} tokens)`);
|
||||
|
||||
await codingAgent.stop();
|
||||
|
||||
// Demonstrate switching to a different agent
|
||||
console.log('\n--- Switching to support agent ---\n');
|
||||
|
||||
const supportAgent = await manager.loadAgent('support-agent');
|
||||
await supportAgent.start();
|
||||
|
||||
const supportSession = await supportAgent.createSession();
|
||||
const supportResponse = await supportAgent.generate(
|
||||
"Hi, I'm having trouble logging into my account. Can you help?",
|
||||
supportSession.id
|
||||
);
|
||||
|
||||
console.log('Response:');
|
||||
console.log(supportResponse.content);
|
||||
|
||||
await supportAgent.stop();
|
||||
|
||||
console.log('\n✅ Done!');
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
||||
Reference in New Issue
Block a user