BlockBeak: Building Your Own ‘Perplexity for Crypto’ Telegram Bot
TL;DR
BlockBeak is a prototype Telegram bot demonstrating how simple yet powerful AI applications can be when built with the formula: LLM + Prompt + Heurist Mesh tools. The entire project runs on just ~200 lines of Python code, leveraging OpenAI Agents SDK and Heurist Mesh MCP. Try it in the Heurist Ecosystem Builder group or build your own with our open-source code.
The Core Concept
BlockBeak demonstrates a refreshingly straightforward approach to building AI applications. At its core, the formula is remarkably simple:
LLM + Prompt + MCP Tools = Functional AI Agent
While many AI implementations involve complex architectures and extensive engineering, BlockBeak proves that with the right components, powerful AI applications can be built with minimal code. The project serves as a practical demonstration of Heurist Mesh’s compatibility with the OpenAI Agents SDK, showcasing how these technologies can work seamlessly together.
How BlockBeak Works
The technical implementation of BlockBeak isminimal. The entire core logic fits in about 200 lines of Python code, handling the essential operations of the agent:
- Establishing an MCP Connection: The bot connects to Heurist Mesh’s Model Context Protocol server
- Instantiating the OpenAI Agent: It creates an agent with specific instructions
- Message Processing: When users interact with the bot, it processes messages through the agent
Here’s what this looks like in practice:
First, establishing the MCP connection:
self.mcp_server = MCPServerSse(
name="MCP SSE Server",
params={"url": self.mcp_sse_url},
client_session_timeout_seconds=60
)
Next, instantiating the OpenAI agent:
agent = OpenAIAgent(
name="BlockBeak Agent",
instructions=self.instructions,
mcp_servers=[self.mcp_server],
model=self.model,
model_settings=model_settings
)
Finally, invoking the agent to handle messages:
async with self.mcp_server:
result = await self._execute_with_retry(
Runner.run,
starting_agent=agent,
input=message,
context=self.context,
)
While the production code includes retry mechanisms and object-oriented patterns for robustness, the fundamental approach remains this straightforward.
The Power of System Prompts
The behavior of BlockBeak is defined by system prompts (found here). It establishes:
- The agent’s capabilities and limitations
- How it should handle different types of queries
- When and how to use various tools
- Appropriate response formats
By modifying the system prompt, you can dramatically change how the agent behaves without altering its code. This approach offers tremendous flexibility for customization.
Heurist Mesh Agents in Action
BlockBeak taps into a diverse ecosystem of specialized agents through Heurist Mesh, including:
Bitquery Solana Token Info Agent
: For Solana token dataCoinGecko Token Info Agent
: For cryptocurrency market informationCookie Project Info Agent
: For project analytics with a focus on mindshareDexScreener Token Info Agent
: For DEX trading dataExa Search Agent
: For web search capabilitiesFirecrawl Search Agent
: For crawling websitesFunding Rate Agent
: For crypto funding rate analysisMindAI KOL Agent
: For KOL trackingMoni Twitter Insight Agent
: For Twitter analytics with a focus on smart money trackingPumpFun Token Agent
: For getting token data on Pump.funSolana Wallet Agent
: For Solana wallet analysisTruth Social Agent
: For Truth Social dataTwitter Info Agent
: For Twitter profile and postsZerion Wallet Analysis Agent
: For EVM wallet portfolio analysis
This array of agents allows BlockBeak to handle a wide range of crypto and web3-related queries, from token analytics to social media insights, all through a unified interface.
Why This Matters
BlockBeak represents more than just another Telegram bot. It demonstrates:
- Development Simplicity: AI applications don’t need to be complex to be powerful
- Cross-Platform Compatibility: Heurist Mesh works seamlessly with OpenAI Agents SDK
- Tool Composability: Different specialized agents can be combined to create comprehensive solutions
- Customization Through Prompting: Behavior can be adjusted through prompts rather than code changes
Try It Yourself
You can experience BlockBeak in the Heurist Ecosystem Builder Telegram group. Better yet, you can fork our open-source repository and deploy your own customized version.
To create your own implementation:
- Clone the repository
- Configure your MCP server connection at mcp.heurist.ai
- Customize the system prompt to align with your specific use case
- Deploy to your Telegram group
BlockBeak in Action
Let’s look at some examples of what BlockBeak can do when tapping into the Heurist Mesh agent ecosystem:
Example 1: Deep Research on Ethereum Improvement Proposals
When a user asks BlockBeak to “do a deep research of EIPs related to intent,” the bot responds with comprehensive, structured information:
The bot identifies EIP-7521 (General Intents for Smart Contract Wallets) and provides detailed information, related proposals like ERC-4337, and links to GitHub, blog posts, and discussion forums to support the claim.
Example 2: Token Analysis
When asked about “Analyze HEU token,” BlockBeak provides a comprehensive market analysis:
The response aggregates real-time data cross-validated by multiple sources and combined with rich information about social media activities, liquidity pools, token categorization and official links.
Why This Matters for Crypto
These examples highlight why specialized AI assistants are particularly valuable in the crypto space:
- Superior Data Access: BlockBeak leverages high-quality data sources through Heurist Mesh agents, providing the most up-to-date information and insights, outperforming general-purpose AI applications like ChatGPT or Perplexity.
- Domain Optimization: The system prompt is specifically tailored for crypto research rather than general queries, resulting in more relevant responses while reducing hallucination.
- Customization Potential: Everyone in the crypto world has unique needs, which generic AI chatbots cannot fully address. BlockBeak demonstrates how customizable, personalized AI assistants can be built to serve specific niches.
Moving Forward
While BlockBeak is currently a prototype, it points to a future where AI applications can be built and deployed rapidly with minimal engineering overhead. By combining the right LLM, well-crafted prompts, and appropriate tools through Heurist Mesh, developers can create sophisticated agents without complex codebases.
We invite you to try BlockBeak, explore its capabilities, and consider how this approach might be applied to your own projects. The code is open-source and available for you to experiment with, adapt, and extend.
For more information about Heurist Mesh and the Model Context Protocol, visit mcp.heurist.ai.