Skip to content
Merged

V2 #2

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules
/test
217 changes: 137 additions & 80 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,129 +1,186 @@
# @elizaos/plugin-messari-ai-toolkit
# @elizaos-plugins/plugin-messari-ai-toolkit

A powerful Eliza OS plugin that integrates Messari's AI Toolkit to provide advanced crypto market research capabilities to your Eliza agent.
**Enterprise Messari AI Toolkit Integration for Eliza OS v1.0.9**

## Overview
This plugin integrates Messari's enterprise AI Toolkit with Eliza OS, enabling your agents to provide comprehensive crypto market research capabilities through advanced AI-powered insights.

This plugin connects your Eliza agent to Messari's comprehensive AI-powered APIs, enabling sophisticated crypto research and market analysis capabilities. It intelligently detects and processes research questions from conversations, leveraging Messari's proprietary data and expertise.
## 🚀 Features

## Demo
- **🔍 Intelligent Research Detection**: Automatically identifies crypto market research questions
- **📊 Market Analysis**: Access to comprehensive cryptocurrency data and metrics
- **🤖 AI-Powered Responses**: Leverages Messari's enterprise AI models for accurate insights
- **⚡ Seamless Integration**: Works with any Eliza OS v1.0.9+ agent
- **🔒 Enterprise-Grade**: Built for professional use with API key authentication

https://github.com/messari/plugin-messari-ai-toolkit/blob/master/.github/assets/eliza-tutorial.mp4
## 📋 Requirements

## Features
- **Eliza OS**: v1.0.9 or higher
- **Node.js**: v18+
- **Messari API Key**: Enterprise access required

- Seamless integration with Messari's AI-Toolkit `/chat/completions` API
- Intelligent detection of crypto-related research questions
- Real-time market data and asset metrics analysis
- Access to consolidated news summarizations
- Asset due diligence insights
- Fundraising and investment data visualization capabilities
## 📦 Installation

## Usage Guide
### Using Eliza CLI (Recommended)

### Setup
```bash
# Add to your Eliza project
elizaos plugins add @elizaos-plugins/plugin-messari-ai-toolkit
```

1. First, clone either:
- The main Eliza repository: [github.com/elizaOS/eliza](https://github.com/elizaOS/eliza)
- OR the Eliza starter repository: [github.com/elizaOS/eliza-starter](https://github.com/elizaOS/eliza-starter)
### Manual Installation

2. Install dependencies and build the project:
```bash
pnpm install
pnpm build
```
```bash
pnpm add github:messari/plugin-messari-ai-toolkit
```

## ⚙️ Configuration

### Installing the Messari Plugin
### 1. Environment Variables

Depending on which repository you cloned, use one of the following commands:
Add the following environment variables to your `.env` file:

**For Main Eliza Repository:**
```bash
pnpm --filter agent add github:messari/plugin-messari-ai-toolkit
# REQUIRED: Messari API Configuration
MESSARI_API_KEY=your_messari_enterprise_api_key_here

# OPTIONAL: Core Eliza Configuration
LOG_LEVEL=info
ELIZAOS_LOG_LEVEL=info

# OPTIONAL: Advanced Logging (for debugging)
DEBUG=eliza:*
ELIZA_DEBUG=true
```

**For Eliza Starter:**
```bash
pnpm add github:messari/plugin-messari-ai-toolkit
### 2. Project Agent Configuration

Add the plugin to your project agent configuration:

```typescript
import { messariPlugin } from "@elizaos-plugins/plugin-messari-ai-toolkit";
import { ProjectAgent, IAgentRuntime } from "@elizaos/core";

export const projectAgent: ProjectAgent = {
character,
init: async (runtime: IAgentRuntime) => await initCharacter({ runtime }),
plugins: [messariPlugin],
};
```

> Note: For the latest plugin mappings and compatibility information, refer to the [eliza-plugins registry](https://github.com/elizaos-plugins/registry/blob/645ba61508a7404c5b890f47e43c005448592510/index.json#L60).
## 🔧 Usage

to use, import into `agent/index.ts` and add as a plugin
Once configured, your agent will automatically detect crypto research questions and provide intelligent responses using Messari's AI Toolkit.

### Example Queries

## Configuration
```
User: "What are the top 10 L2s by fees?"
Agent: [Provides detailed Layer 2 analysis with current fee data]

To use this plugin, you'll need a Messari API key. The Messari AI Toolkit is an enterprise product that requires:
User: "Show me ETH price trends"
Agent: [Returns comprehensive Ethereum price analysis]

1. An Enterprise (ENT) subscription
2. Purchase of the AI Toolkit service package + credits
3. API key generation
User: "What's the TVL of Arbitrum?"
Agent: [Gives current Total Value Locked data for Arbitrum]
```

### Enterprise Access
## 🏗️ Development

The AI Toolkit subscription includes access to Messari's base package:
- Asset API
- News API
- Marketdata API
### Building the Plugin

### Getting an API Key
```bash
# Install dependencies
pnpm install

1. Subscribe to Messari Enterprise
2. Purchase the AI Toolkit package
3. Visit [Messari Account Settings](https://messari.io/account/api) to generate your API key
4. Use the API key in your configuration
# Build the plugin
pnpm build

### API Endpoints
# Development mode with auto-rebuild
pnpm dev
```

### Testing

```bash
# Run tests
pnpm test

# Run with coverage
pnpm test:coverage
```

## 🔍 Troubleshooting

### Common Issues

The Toolkit endpoints are accessible at `api.messari.io/ai`. For detailed API documentation, visit the [Messari Developer Docs](https://docs.messari.io/reference/chat-completion).
1. **API Key Not Found**
```
Error: Messari API key not found in runtime settings
```
**Solution**: Ensure `MESSARI_API_KEY` is set in your `.env` file

2. **Plugin Not Loading**
```
Error: Plugin messariAiToolkit failed to load
```
**Solution**: Verify the plugin is listed in your character's `plugins` array

3. **No Research Questions Detected**
- Ensure your questions are crypto/market related
- Check that the copilot provider is properly initialized
- Enable debug logging to see question processing

## Usage
### Debug Mode

1. Import and register the plugin with your Eliza agent
2. Configure your API key
3. Start asking crypto-related questions!
Enable detailed logging for troubleshooting:

The plugin will automatically detect relevant research questions and query Messari's AI Toolkit for comprehensive answers.
```bash
# In your .env file
LOG_LEVEL=debug
DEBUG=eliza:plugin-messari:*
ELIZA_DEBUG=true

## About Messari AI Toolkit
# Or set when running
LOG_LEVEL=debug elizaos start --character your-character.json
```

Messari's AI Toolkit is an enterprise-grade suite of AI-powered APIs designed specifically for the crypto ecosystem. It provides:
## 📈 Supported Query Types

- Crypto-aware completions endpoint (OpenAI-compatible)
- Asset extraction on arbitrary documents
- Direct access to underlying agents
- News recaps and summarizations
- Deep understanding of crypto-specific terminology and context
- Real-time market data analysis
The plugin automatically detects and processes:

## Use Cases
- **Market Data Requests**: Price, volume, market cap queries
- **Protocol Analytics**: TVL, fees, user metrics
- **Comparative Analysis**: Rankings, comparisons between protocols
- **Historical Data**: Trends, historical performance
- **Token Information**: Specific cryptocurrency details

- Market trend analysis with real-time data
- Automated crypto research and report generation
- News summarization across multiple sources
- Asset due diligence with Enterprise Diligence Reports
- Fundraising and investment data visualization
- Asset extraction and classification for document contextualization
## 🔐 Security & Privacy

## Security
- **API Key Protection**: Credentials are securely stored in environment variables
- **Request Validation**: All API requests are validated before processing
- **Error Handling**: Sensitive information is never exposed in error logs
- **Rate Limiting**: Respects Messari API rate limits

This plugin requires secure handling of Messari API keys. Never expose your API key in your code or version control system.
## 🤝 Contributing

## Performance Considerations
We welcome contributions! Please see our [Contributing Guidelines](CONTRIBUTING.md) for details.

The plugin may introduce additional latency due to API calls. Consider implementing appropriate caching and error handling strategies in production environments.
## 📄 License

## Contributing
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

Contributions are welcome! Please feel free to submit a Pull Request.
## 🔗 Links

## License
- **Messari**: [https://messari.io](https://messari.io)
- **Eliza OS**: [https://github.com/elizaOS/eliza](https://github.com/elizaOS/eliza)
- **Plugin Registry**: [Eliza Plugins](https://github.com/elizaOS/plugins)

MIT
## 💬 Support

## Support
- **Issues**: [GitHub Issues](https://github.com/your-username/plugin-messari-ai-toolkit/issues)
- **Discord**: [Eliza Community](https://discord.gg/eliza)
- **Documentation**: [Eliza Plugin Docs](https://elizaos.github.io/eliza/docs/plugins)

For questions about API access and testing, contact [email protected].
---

For technical support with the plugin, please open an issue in the repository.
**Made with ❤️ for the Eliza OS ecosystem**
12 changes: 3 additions & 9 deletions dist/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import * as _elizaos_core from '@elizaos/core';
import { Provider } from '@elizaos/core';
import { Provider, Plugin } from '@elizaos/core';

declare const copilotProvider: Provider;

Expand All @@ -8,11 +7,6 @@ declare namespace index {
export { index_copilotProvider as copilotProvider };
}

declare const messariPlugin: {
name: string;
description: string;
actions: any[];
providers: _elizaos_core.Provider[];
};
declare const messariPlugin: Plugin;

export { messariPlugin, index as providers };
export { messariPlugin as default, messariPlugin, index as providers };
40 changes: 26 additions & 14 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading