
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
A TypeScript framework for building sophisticated multi-agent systems with LLM integration, specializing in crypto market analysis and research.
🤖 Multi-agent Collaboration System
🧠 Advanced Memory Management
🛠️ Modular Tool Architecture
🔄 Real-time Market Analysis
💾 Persistent Storage
npm install agentis
Create a .env file in your project root:
OPENROUTER_API_KEY=your_openrouter_key
SUPABASE_URL=your_supabase_url
SUPABASE_ANON_KEY=your_supabase_anon_key
-- Enable vector extension
create extension if not exists vector;
-- Create memory entries table
create table memory_entries (
id bigint primary key generated always as identity,
agent_id text not null,
content text not null,
type text not null,
metadata jsonb,
embedding vector(1536),
created_at timestamp with time zone default timezone('utc'::text, now())
);
-- Create messages table
create table messages (
id text primary key,
sender_id text not null,
recipient_id text not null,
content text not null,
timestamp timestamp with time zone default timezone('utc'::text, now())
);
import { Agent, AgentRuntime, WebSearchTool, OpenRouterTool } from 'agentis';
// Create an agent
const agent = new Agent(
'market-analyst-1',
'MarketAnalyst',
'I am a crypto market analyst specialized in trend analysis',
'Market Analyst',
['Analyze market trends', 'Provide trading insights'],
[new WebSearchTool(), new OpenRouterTool()]
);
// Initialize runtime
const runtime = new AgentRuntime();
runtime.registerAgent(agent);
await runtime.start();
// Send a message to the agent
const response = await agent.receiveMessage({
id: `msg-${Date.now()}`,
sender_id: 'user',
recipient_id: agent.id,
content: 'Analyze the current BTC market trends',
timestamp: Date.now()
});
console.log(response.content);
import { Agent, AgentRuntime, WebSearchTool, OpenRouterTool } from 'agentis';
// Create specialized agents
const researchAgent = new Agent(
'research-1',
'MarketResearcher',
'I gather and analyze market data',
'Researcher',
['Gather market information'],
[new WebSearchTool()]
);
const strategyAgent = new Agent(
'strategy-1',
'StrategyMaster',
'I create trading strategies',
'Strategist',
['Create trading strategies'],
[new OpenRouterTool()]
);
// Initialize runtime with multiple agents
const runtime = new AgentRuntime();
runtime.registerAgent(researchAgent);
runtime.registerAgent(strategyAgent);
await runtime.start();
WebSearchTool: Real-time web search capabilitiesOpenRouterTool: LLM integration via OpenRouterFor more detailed documentation, visit our documentation site
Contributions are welcome! Please read our contributing guidelines.
MIT License - see the LICENSE file for details
Users can fully customize their agents' personalities, roles, and capabilities:
import { Agent, WebSearchTool, OpenRouterTool } from 'agentis';
// Crypto Trading Specialist
const tradingAgent = new Agent(
'trader-1',
'CryptoTrader',
'I am an experienced crypto trader specializing in technical analysis. I focus on identifying trading opportunities using multiple timeframe analysis.',
'Trading Specialist',
[
'Analyze trading patterns',
'Identify entry and exit points',
'Monitor market sentiment'
],
[new WebSearchTool(), new OpenRouterTool()]
);
// Market Research Analyst
const researchAgent = new Agent(
'research-1',
'MarketResearcher',
'I specialize in fundamental analysis and market research. I analyze project fundamentals, team backgrounds, and market dynamics.',
'Research Analyst',
[
'Research project fundamentals',
'Analyze team credentials',
'Track market developments'
],
[new WebSearchTool()]
);
// News Sentiment Analyzer
const sentimentAgent = new Agent(
'sentiment-1',
'SentimentAnalyst',
'I track and analyze market sentiment across social media, news, and trading platforms. I identify shifts in market psychology.',
'Sentiment Analyst',
[
'Monitor social media sentiment',
'Track news impact',
'Analyze market psychology'
],
[new WebSearchTool(), new OpenRouterTool()]
);
Each agent can be customized with:
// Optional model configuration
const agent = new Agent(
'custom-agent',
'CustomAgent',
'My custom agent lore',
'Custom Role',
['Goal 1', 'Goal 2'],
[new WebSearchTool()],
{
provider: 'anthropic',
name: 'anthropic/claude-3-sonnet-20240229',
temperature: 0.7,
maxTokens: 4096
}
);
Agents can be enhanced with custom tools. Here's how to create your own:
import { ITool, ToolOutput } from 'agentis';
export class CustomTool implements ITool {
name = 'CustomTool';
description = 'Description of what your tool does';
async execute(input: string): Promise<ToolOutput> {
// Your tool's logic here
return {
result: `Processed: ${input}`
};
}
}
Agentis provides a sophisticated tool orchestration system for complex tool execution flows:
import { EnhancedToolOrchestrator, GraphBuilder, ExecutionMode } from 'agentis/tools';
// Create tool orchestrator
const orchestrator = new EnhancedToolOrchestrator({
defaultTools: [myTool1, myTool2, myTool3]
});
// Build a parallel execution graph
const graph = new GraphBuilder()
.addTool('search-1', 'WebSearchTool', 'bitcoin price', 0)
.addTool('search-2', 'WebSearchTool', 'ethereum price', 0)
// Process results of both searches
.addDependentTool(
'analysis',
'AnthropicTool',
(context) => {
const btcData = context.getPreviousResult('search-1')?.result || '';
const ethData = context.getPreviousResult('search-2')?.result || '';
return `Compare these prices: BTC: ${btcData}, ETH: ${ethData}`;
},
['search-1', 'search-2'], // dependencies
1 // priority
)
.parallel(2) // max 2 concurrent requests
.build();
// Execute the graph
const results = await orchestrator.executeGraph(graph, 'my-agent-id');
console.log(results.get('analysis')?.result);
### 2. Example: Creating a Price Feed Tool
```typescript
import { ITool, ToolOutput } from 'agentis';
export class PriceFeedTool implements ITool {
name = 'PriceFeedTool';
description = 'Fetches real-time crypto prices';
async execute(input: string): Promise<ToolOutput> {
const symbol = input.toUpperCase();
const response = await fetch(`https://api.example.com/price/${symbol}`);
const data = await response.json();
return {
result: data.price,
metadata: {
timestamp: Date.now(),
symbol: symbol,
source: 'ExampleAPI'
}
};
}
}
import { Agent, PriceFeedTool } from 'agentis';
const agent = new Agent(
'price-tracker-1',
'PriceTracker',
'I track and analyze crypto prices',
'Price Analyst',
['Monitor price movements'],
[new PriceFeedTool()]
);
Tools can implement additional optional methods:
import { ITool, ToolOutput } from 'agentis';
export class AdvancedTool implements ITool {
name = 'AdvancedTool';
description = 'An advanced tool example';
// Optional initialization
async initialize(): Promise<void> {
// Setup code
}
// Main execution method
async execute(input: string): Promise<ToolOutput> {
return { result: 'processed data' };
}
// Optional cleanup
async cleanup(): Promise<void> {
// Cleanup code
}
// Optional validation
validateInput(input: string): boolean {
return input.length > 0;
}
}
import { ToolRegistry } from 'agentis';
// Register tool for all agents to use
ToolRegistry.registerTool('CustomTool', new CustomTool());
// Create agent with access to all registered tools
const agent = new Agent(
'agent-1',
'Agent',
'Agent description',
'Role',
['Goals'],
ToolRegistry.getTools()
);
Agentis is designed for multi-agent collaboration. Agents can work together in specialized teams:
import { Agent, AgentRuntime, WebSearchTool, OpenRouterTool } from 'agentis';
// Create a crypto research team
const researchTeam = {
// Research Specialist
researcher: new Agent(
'researcher-1',
'ResearchSpecialist',
'I conduct deep research into crypto projects, analyzing fundamentals, tokenomics, and team backgrounds',
'Research Analyst',
['Research project fundamentals', 'Analyze tokenomics'],
[new WebSearchTool()]
),
// Technical Analyst
analyst: new Agent(
'analyst-1',
'TechnicalAnalyst',
'I analyze market structures, price action, and technical indicators',
'Technical Analyst',
['Analyze price trends', 'Identify technical patterns'],
[new WebSearchTool(), new OpenRouterTool()]
),
// Strategy Coordinator
coordinator: new Agent(
'coordinator-1',
'StrategyMaster',
'I coordinate research efforts and synthesize findings into actionable strategies',
'Strategy Coordinator',
['Coordinate research', 'Synthesize findings'],
[new OpenRouterTool()]
)
};
// Initialize runtime with the team
const runtime = new AgentRuntime();
Object.values(researchTeam).forEach(agent => runtime.registerAgent(agent));
await runtime.start();
// Team can now collaborate on tasks
const response = await researchTeam.coordinator.receiveMessage({
id: `msg-${Date.now()}`,
sender_id: 'user',
recipient_id: researchTeam.coordinator.id,
content: 'Analyze Bitcoin\'s current market position',
timestamp: Date.now()
});
Agents in a team can:
FAQs
A TypeScript framework for building sophisticated multi-agent systems
We found that agentis demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.