# Install the package
npm install @intue/core
# Create project directory (optional)
mkdir my-intue-project
cd my-intue-project
import { Runtime, Agent } from '@intue/core';
async function main() {
// Initialize the runtime
const runtime = await Runtime.init({
agentName: 'my-first-agent',
options: {
logger: {
level: 'debug'
}
}
});
// Start the runtime
await runtime.start();
// Get the agent instance
const agent = runtime.getAgent();
// Analyze some market data
const result = agent.analyzeMarketData({
price: 45000,
volume: 1250000
});
console.log('Analysis result:', result);
// Stop the runtime
await runtime.stop();
}
// Run the example
main().catch(console.error);
import { SentimentAnalyzer, LunarCrushProvider } from '@intue/core';
// Initialize the LunarCrush provider
const provider = new LunarCrushProvider({
apiKey: process.env.LUNARCRUSH_API_KEY
});
// Create a sentiment analyzer
const analyzer = new SentimentAnalyzer();
analyzer.addProvider(provider);
// Analyze sentiment for Bitcoin
const sentiment = await analyzer.analyzeSocialSentiment('BTC');
console.log('BTC Sentiment:', sentiment);
import { EcosystemCorrelator } from '@intue/core';
// Create an ecosystem correlator
const correlator = new EcosystemCorrelator({
timeframe: '1d',
lookbackPeriod: 30
});
// Find correlations between assets
const correlation = await correlator.analyzeCorrelation(['BTC', 'ETH', 'SOL', 'AVAX']);
console.log('Correlations:', correlation);