Data Connectors
Providers are essential components within the CYNE AI framework, enabling agents to access real-time blockchain data, contextual information, and other external data sources.
Overview
In CYNE AI, Providers are designed to:
Supply real-time data and contextual insights.
Integrate seamlessly with the AgentRuntime framework.
Format information for conversational templates, actions, and evaluations.
Ensure consistent access to Solana blockchain and other decentralized data.
Core Structure
A Provider in CYNE AI adheres to the following interface structure:
interface Provider {
get: (
runtime: IAgentRuntime,
message: Memory,
state?: State
) => Promise<string>;
}Providers interact with the agent runtime, message memory, and optional agent state to fetch and process relevant data for users.
Built-in Providers in CYNE AI
1. Time Provider
The Time Provider adds temporal context to interactions, ensuring time-sensitive blockchain operations and market trends are accurately conveyed.
2. Market Data Provider
The Market Data Provider retrieves real-time token prices, trading volumes, and liquidity statistics from decentralized exchanges.
3. Wallet Insights Provider
The Wallet Insights Provider allows users to monitor their wallet balances and transaction histories.
4. Risk Analysis Provider
The Risk Analysis Provider evaluates potential risks in smart contracts, liquidity pools, or token investments.
5. Whale Tracking Provider
The Whale Tracking Provider monitors large transactions or whale activities on the Solana blockchain, alerting users to significant market movements.
Accessing Providers in Runtime
Providers can be utilized during state composition:
Comprehensive Provider Example
This example demonstrates integrating multiple data sources into a single provider for a holistic response:
Troubleshooting
Stale Data
Implement cache invalidation for outdated data:
Rate Limiting
Use exponential backoff for retries:
API Failures
Fallback to secondary data sources when primary APIs fail.
Further Reading
Agent Runtime Documentation
Memory System Documentation
Custom Actions Documentation
With CYNE AI, providers bring the power of real-time data and blockchain insights to intelligent, autonomous agents. Start creating your own providers today!
Last updated