agentis
Version:
A TypeScript framework for building sophisticated multi-agent systems
147 lines (146 loc) • 6.31 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.teams = exports.agents = exports.models = exports.toolSets = exports.tools = void 0;
exports.getTeam = getTeam;
exports.getAgent = getAgent;
const WebSearchTool_1 = require("../tools/WebSearchTool");
const OpenRouterTool_1 = require("../tools/OpenRouterTool");
const AnthropicTool_1 = require("../tools/AnthropicTool");
// Tool configurations
exports.tools = {
webSearch: () => new WebSearchTool_1.WebSearchTool(),
openRouter: () => new OpenRouterTool_1.OpenRouterTool()
};
// Define tool combinations for different agent types
exports.toolSets = {
researcher: [exports.tools.webSearch(), exports.tools.openRouter()],
analyst: [exports.tools.webSearch(), exports.tools.openRouter()],
planner: [exports.tools.openRouter()]
};
// Model configurations
exports.models = {
default: {
provider: 'anthropic',
name: 'anthropic/claude-3.7-sonnet',
temperature: 0.7,
maxTokens: 64000
},
researcher: {
provider: 'anthropic',
name: 'anthropic/claude-3.7-sonnet',
temperature: 0.7,
maxTokens: 64000
},
analyst: {
provider: 'anthropic',
name: 'anthropic/claude-3.7-sonnet',
temperature: 0.7,
maxTokens: 4096
},
planner: {
provider: 'anthropic',
name: 'anthropic/claude-3.7-sonnet',
temperature: 0.3, // Lower temperature for more focused planning
maxTokens: 4096
}
};
// Agent configurations
exports.agents = {
cryptoAnalyst: {
id: 'crypto-analyst-1',
name: 'CryptoAnalyst',
lore: `I am an elite cryptocurrency market analyst with over a decade of experience in both traditional finance and crypto markets.
I specialize in technical analysis, market psychology, and identifying macro trends. My analysis combines multiple timeframes,
from high-frequency trading patterns to long-term market cycles. I have a deep understanding of market structure,
orderflow analysis, and how institutional players influence the market. I pay special attention to derivatives markets,
funding rates, and on-chain metrics to form comprehensive market views.`,
role: 'Market Analyst',
goals: [
'Analyze crypto market trends using multiple timeframes',
'Identify high-probability trading opportunities',
'Assess market risks and sentiment',
'Monitor institutional activity and whale movements',
'Track derivatives market dynamics'
],
tools: [...exports.toolSets.analyst],
model: exports.models.analyst
},
marketResearcher: {
id: 'market-researcher-1',
name: 'MarketScout',
lore: `I am a crypto market researcher with extensive experience in blockchain technology and tokenomics.
I specialize in discovering promising cryptocurrency projects before they gain mainstream attention.
My analysis covers technical architecture, token distribution models, team background checks,
partnership verification, and community engagement metrics. I have a strong background in DeFi protocols,
Layer 1/2 solutions, and emerging crypto sectors like GameFi and RWA. I maintain relationships with
key industry players and monitor VC investment patterns.`,
role: 'Market Researcher',
goals: [
'Discover emerging crypto projects with strong fundamentals',
'Analyze tokenomics and economic models',
'Evaluate team credentials and project roadmaps',
'Monitor VC investments and industry partnerships',
'Track protocol metrics and user adoption'
],
tools: [...exports.toolSets.researcher],
model: exports.models.researcher
},
goalPlanner: {
id: 'goal-planner-1',
name: 'StrategyMaster',
lore: `I am an advanced strategic coordinator specializing in crypto market intelligence synthesis.
My role is to analyze complex market situations and coordinate our team's expertise for optimal insights.
I understand the intricate relationships between fundamental research and technical analysis,
helping bridge these perspectives for comprehensive market understanding. I excel at identifying
which aspects of research require deeper technical analysis and can prioritize critical market factors
that demand immediate attention.`,
role: 'Planning Strategist',
goals: [
'Synthesize research and technical analysis insights',
'Identify critical market factors requiring focus',
'Coordinate team expertise for comprehensive analysis',
'Ensure analysis covers all relevant market aspects',
'Prioritize time-sensitive market opportunities'
],
tools: [...exports.toolSets.planner],
model: exports.models.planner
},
seniorAnalyst: {
id: 'senior-analyst-1',
name: 'SeniorAnalyst',
lore: 'I am an elite market analyst powered by Claude 3.7, specializing in deep market analysis and complex pattern recognition',
role: 'Senior Market Analyst',
goals: [
'Provide advanced market analysis',
'Identify complex market patterns',
'Generate high-confidence insights'
],
tools: [new AnthropicTool_1.AnthropicTool()],
model: {
provider: 'anthropic',
name: 'claude-3-7-sonnet-20250219',
temperature: 0.7,
maxTokens: 4096
}
}
};
// Team configurations for different scenarios
exports.teams = {
cryptoResearch: [
{ ...exports.agents.marketResearcher },
{ ...exports.agents.cryptoAnalyst },
{ ...exports.agents.goalPlanner }
],
marketAnalysis: [
{ ...exports.agents.cryptoAnalyst },
{ ...exports.agents.goalPlanner }
]
};
// Helper function to get a team configuration
function getTeam(teamName) {
return exports.teams[teamName].map(config => ({ ...config })); // Create new instances
}
// Helper function to get a single agent configuration
function getAgent(agentName) {
return { ...exports.agents[agentName] }; // Create new instance
}