<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Udoh Gary</title>
    <description>The latest articles on DEV Community by Udoh Gary (@udoh_gary_2a78fccb8028241).</description>
    <link>https://dev.to/udoh_gary_2a78fccb8028241</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3594146%2F194cb9f6-6d2b-42ca-b3cd-c424b803a204.jpg</url>
      <title>DEV Community: Udoh Gary</title>
      <link>https://dev.to/udoh_gary_2a78fccb8028241</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/udoh_gary_2a78fccb8028241"/>
    <language>en</language>
    <item>
      <title>🚀Building CryptoMate — An AI Agent for Real‑Time Crypto Insights on Telex.im</title>
      <dc:creator>Udoh Gary</dc:creator>
      <pubDate>Mon, 03 Nov 2025 17:02:05 +0000</pubDate>
      <link>https://dev.to/udoh_gary_2a78fccb8028241/building-cryptomate-an-ai-agent-for-real-time-crypto-insights-on-telexim-60i</link>
      <guid>https://dev.to/udoh_gary_2a78fccb8028241/building-cryptomate-an-ai-agent-for-real-time-crypto-insights-on-telexim-60i</guid>
      <description>&lt;h2&gt;
  
  
  &lt;strong&gt;The Challenge&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Keeping up with cryptocurrency prices, historical highs/lows, and significant events like halving is time‑consuming and error‑prone. I wanted to build an agent that could:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Fetch live pricing for any coin&lt;/li&gt;
&lt;li&gt;Answer questions like “When was the all‑time high for SHIB?” or “When is the next BTC halving?”&lt;/li&gt;
&lt;li&gt;Integrate seamlessly into Telex.im so users can chat in a familiar workspace&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is the story of how I built &lt;strong&gt;CryptoMate&lt;/strong&gt;, using the Mastra agent framework and integrated it via Telex’s A2A protocol.&lt;/p&gt;




&lt;h2&gt;
  
  
  🧪 &lt;strong&gt;Tech Stack&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Here’s what I used:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Mastra&lt;/strong&gt;: for defining the agent and workflows&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Telex.im&lt;/strong&gt;: for chat‑agent integration via JSON‑RPC A2A&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Node.js + Express&lt;/strong&gt;: backend server for the agent&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Axios&lt;/strong&gt;: to fetch data from the CoinGecko API&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Railway.app&lt;/strong&gt;: cloud hosting and deployment&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  ⚙️ &lt;strong&gt;Architecture Overview&lt;/strong&gt;
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;🧑‍💻 User message (via Telex)
        ↓
📡 JSON-RPC Request
        ↓
🧠 Express Server (Node.js)
        ↓
⚙️ Logic Layer 
      ├─ CoinGecko API (for live crypto data)
      └─ Mastra Agent (for natural-language handling)
        ↓
💬 JSON-RPC Response
        ↓
📱 Message displayed on Telex
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  🧠 &lt;strong&gt;Building CryptoMate with Mastra&lt;/strong&gt;
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Step 1. Install Mastra
&lt;/h3&gt;

&lt;p&gt;In the project folder, run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; @mastra/core
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This installed the core Mastra package which includes agent, tools, workflows and more. ([npmjs.com][1])&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Agent setup
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { Agent } from "@mastra/core/agent";
import dotenv from "dotenv";
dotenv.config();

export const cryptoTrackerBot = new Agent({
  name: "crypto-tracker-bot",
  instructions: `
    You are a helpful cryptocurrency assistant.
    You can answer general crypto-related questions,
    provide insights about Bitcoin, Ethereum, and other coins,
    and guide users about the crypto market.
    If the user asks for a price, the data will be fetched from an API,
    so just confirm it politely.
    Keep your responses short, clear, and friendly.
  `,
  model: "gpt-4o-mini",
  openaiApiKey: process.env.OPENAI_API_KEY
});

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 3:  I Used the agent in theserver/backend
&lt;/h3&gt;

&lt;p&gt;In &lt;code&gt;server.js&lt;/code&gt;, when you receive a message from Telex, call:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;aiResponse&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;cryptoTrackerBot&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This sends the user’s input to Mastra, gets a response, and you can then send that reply back to Telex in the correct JSON-RPC format.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4: I created the &lt;strong&gt;Mastra workflow.json&lt;/strong&gt; file
&lt;/h3&gt;

&lt;p&gt;This file communicates with Telex the location and function of the Ai agent&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;active&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;category&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;utilities&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;description&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;A crypto tracker bot that provides real-time prices for cryptocurrencies.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;id&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;cryptoTrackerBot123&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;long_description&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;You are a helpful crypto tracker bot that fetches live cryptocurrency prices and market information using the CoinGecko API. Users can ask for the price of any coin by name or symbol.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;name&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;crypto-tracker-bot&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;nodes&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;id&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;crypto_tracker_bot_node&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;name&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;crypto-tracker-bot&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;parameters&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{},&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;position&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;type&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;a2a/mastra-a2a-node&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;typeVersion&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;url&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;cryptomate-production.up.railway.app&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;pinData&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{},&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;settings&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;executionOrder&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;v1&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;short_description&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Tracks live crypto prices using CoinGecko&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  🔗 Deploying &amp;amp; Telex Integration
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Deployed to Railway.app and updated the &lt;code&gt;workflow.json&lt;/code&gt; with the live URL&lt;/li&gt;
&lt;li&gt;Added the agent on Telex.im and published it
🔗 &lt;strong&gt;Link to my agent:&lt;/strong&gt; [&lt;a href="https://telex.im/telex-ai-intergration/colleagues/019a4767-aadf-7e17-99e9-954eaa1d3545/019a4767-1277-7d2d-8e9e-714192aff16e" rel="noopener noreferrer"&gt;https://telex.im/telex-ai-intergration/colleagues/019a4767-aadf-7e17-99e9-954eaa1d3545/019a4767-1277-7d2d-8e9e-714192aff16e&lt;/a&gt;]
&lt;em&gt;(What the agent does: provides live crypto pricing and insights, handles coin history and concept questions.)&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And of course: &lt;a href="https://telex.im/" rel="noopener noreferrer"&gt;&lt;strong&gt;https://telex.im/&lt;/strong&gt;&lt;/a&gt; — an AI agent platform like Make, a Slack alternative for bootcamps and communities.&lt;/p&gt;




&lt;h2&gt;
  
  
  🧠 What Worked &amp;amp; What Didn’t
&lt;/h2&gt;

&lt;h3&gt;
  
  
  ✅ Worked
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Mastra made creating the agent straightforward&lt;/li&gt;
&lt;li&gt;Telex A2A protocol integration was smooth once the JSON format was correct&lt;/li&gt;
&lt;li&gt;CoinGecko provided reliable price data&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  ❌ Challenges
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Initial Mastra install issue: had to install via GitHub because &lt;code&gt;npm install mastra&lt;/code&gt; failed&lt;/li&gt;
&lt;li&gt;Workflow trigger sometimes showed &lt;strong&gt;“Will the workflow run: False”&lt;/strong&gt; — resolved by re‑uploading the updated &lt;code&gt;workflow.json&lt;/code&gt; and ensuring the URL matched deployment&lt;/li&gt;
&lt;li&gt;Handling non‑price questions gracefully required adding the timeout logic so Mastra fallback didn’t hang&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  📌 Tips for Your Own Agent
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Start simple: price queries first, fallback logic later&lt;/li&gt;
&lt;li&gt;Test locally with Postman or curl before Telex&lt;/li&gt;
&lt;li&gt;Use environment variables — never hardcode API keys&lt;/li&gt;
&lt;li&gt;Monitor logs: what Telex sends vs what your endpoint receives&lt;/li&gt;
&lt;li&gt;Re‑upload your workflow every time you change the URL&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  💡 &lt;strong&gt;The project is open to the community!&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Feel free to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Check out the source code&lt;/li&gt;
&lt;li&gt;Open issues or share feedback&lt;/li&gt;
&lt;li&gt;Contribute enhancements&lt;/li&gt;
&lt;li&gt;Fork it and build your own version&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;👉 &lt;a href="https://github.com/GodlyPatrick/CryptoMate.git" rel="noopener noreferrer"&gt;https://github.com/GodlyPatrick/CryptoMate.git&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  🎉 Conclusion
&lt;/h2&gt;

&lt;p&gt;Building CryptoMate showed me just how powerful the combination of Mastra + Telex can be for agents. Whether you’re tracking prices, building a dev‑assistant, or automating community workflows, this stack gives you a fast path from idea → live chatbot.&lt;br&gt;
Go ahead and build something cool!&lt;/p&gt;




</description>
      <category>cryptocurrency</category>
      <category>agents</category>
      <category>node</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
