<?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: Ayomikun Adeosun</title>
    <description>The latest articles on DEV Community by Ayomikun Adeosun (@ayomikun_adeosun_5855a5de).</description>
    <link>https://dev.to/ayomikun_adeosun_5855a5de</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%2F3594712%2Faa7ecd04-735e-4356-93f5-0aeb689c7461.png</url>
      <title>DEV Community: Ayomikun Adeosun</title>
      <link>https://dev.to/ayomikun_adeosun_5855a5de</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ayomikun_adeosun_5855a5de"/>
    <language>en</language>
    <item>
      <title>Building BookCompass with Mastra: From AI Agent to Telex Integration</title>
      <dc:creator>Ayomikun Adeosun</dc:creator>
      <pubDate>Mon, 03 Nov 2025 21:24:20 +0000</pubDate>
      <link>https://dev.to/ayomikun_adeosun_5855a5de/building-bookcompass-with-mastra-from-ai-agent-to-telex-integration-22mm</link>
      <guid>https://dev.to/ayomikun_adeosun_5855a5de/building-bookcompass-with-mastra-from-ai-agent-to-telex-integration-22mm</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;AI agents are evolving from gimmicks into practical knowledge tools — and what used to require custom infrastructures, caching, state machines, and hand-wired API logic… can now be built in days, not weeks.&lt;/p&gt;

&lt;p&gt;That’s exactly what happened with BookCompass — a Mastra powered Book Knowledge Assistant that uses Google Books to help readers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;discover books&lt;/li&gt;
&lt;li&gt;retrieve authors &amp;amp; their titles&lt;/li&gt;
&lt;li&gt;get recommendations and related titles&lt;/li&gt;
&lt;li&gt;and interact conversationally&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In this post, I’ll walk through how I built BookCompass using Mastra agents + tools, and then deployed it into Telex.im — a platform like Make/Zapier but optimized for AI agents &amp;amp; workflows.&lt;/p&gt;

&lt;p&gt;The result?&lt;/p&gt;

&lt;p&gt;A knowledge assistant that can sit inside a community, classroom, or reading club… and answer contextual book queries instantly.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Telex?
&lt;/h2&gt;

&lt;p&gt;Telex.im is a new category of platform: AI co-workers.&lt;/p&gt;

&lt;p&gt;Not chatbots.&lt;br&gt;
Not LLM demos.&lt;br&gt;
Not Slack integrations that only respond with boilerplate messages.&lt;/p&gt;

&lt;p&gt;Telex lets you deploy agents that can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;respond in channels&lt;/li&gt;
&lt;li&gt;call tools&lt;/li&gt;
&lt;li&gt;fetch external data&lt;/li&gt;
&lt;li&gt;chain workflows&lt;/li&gt;
&lt;li&gt;talk to other agents (A2A)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And all of this is standardized with the A2A Protocol.&lt;/p&gt;

&lt;p&gt;Because Mastra already speaks A2A out of the box — the connection was basically plug-and-play.&lt;/p&gt;
&lt;h2&gt;
  
  
  Project Overview
&lt;/h2&gt;

&lt;p&gt;BookCompass combines:&lt;/p&gt;

&lt;p&gt;Google Books Data + Mastra Tools + Telex Integration&lt;/p&gt;

&lt;p&gt;The assistant currently supports:&lt;/p&gt;
&lt;h2&gt;
  
  
  Feature
&lt;/h2&gt;

&lt;p&gt;Book Search: Search books by keywords or title&lt;/p&gt;

&lt;p&gt;Author Books: Retrieve top N books from a specific author&lt;/p&gt;

&lt;p&gt;Recommended Titles: Suggest similar titles based on a query&lt;/p&gt;

&lt;p&gt;Mastra Features Used&lt;/p&gt;

&lt;p&gt;1) Agents&lt;/p&gt;

&lt;p&gt;Mastra’s Agent class handled the “brain” of BookCompass — instructions, tools, model config, and memory.&lt;/p&gt;

&lt;p&gt;Model used: Google Gemini 2.5 Pro&lt;/p&gt;

&lt;p&gt;2) Tools&lt;/p&gt;

&lt;p&gt;I created multiple tools using createTool():&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;searchBooksTool&lt;/li&gt;
&lt;li&gt;getAuthorBooksTool&lt;/li&gt;
&lt;li&gt;getRecommendationsTool&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All API calls hit Google Books — which conveniently requires no auth, no token.&lt;br&gt;
Huge advantage for prototyping.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwn93pxpln9zlgofry4mt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwn93pxpln9zlgofry4mt.png" alt="Mastra agent interaction" width="800" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;3) Workflows&lt;/p&gt;

&lt;p&gt;While not required, I built a small one for recommendations (lookup book → then lookup similar authors).&lt;/p&gt;

&lt;p&gt;4) Memory&lt;/p&gt;

&lt;p&gt;Using LibSQL store — BookCompass can keep conversation context (so if a user says “show me more like that one”, it resolves the last book reference).&lt;/p&gt;

&lt;p&gt;5) Observability + Logging&lt;/p&gt;

&lt;p&gt;Mastra captures agent execution traces, tool calls, performance stats — which made debugging API responses easier.&lt;/p&gt;

&lt;p&gt;6) Telex Integration&lt;/p&gt;

&lt;p&gt;This part was shockingly easy.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;POST /a2a/agent/bookCompass
GET  /a2a/agent/bookCompass/card
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Telex reads the agent card → understands:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;tools&lt;/li&gt;
&lt;li&gt;capabilities&lt;/li&gt;
&lt;li&gt;instructions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And now BookCompass can live inside any Telex workspace.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr18880erz59lwouvmajc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr18880erz59lwouvmajc.png" alt="agent on telex interaction" width="800" height="699"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;API Integration Surprises&lt;/p&gt;

&lt;p&gt;Even though Google Books is open/no auth, there were still small quirks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;authors are stored as arrays&lt;/li&gt;
&lt;li&gt;some results return only partial metadata&lt;/li&gt;
&lt;li&gt;some books have no ISBN&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So I wrote a simple normalization utility that always returns:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
{
  title,
  authors,
  categories,
  description,
  previewLink
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Small detail, big impact.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Learnings
&lt;/h2&gt;

&lt;h2&gt;
  
  
  Takeaway
&lt;/h2&gt;

&lt;p&gt;Type Safety helps: Zod schemas caught malformed Google Books responses&lt;/p&gt;

&lt;p&gt;A2A is powerful: Telex didn’t require ANY custom integration special casing&lt;/p&gt;

&lt;p&gt;Memory improves UX: “show me more from that author” now works naturally&lt;/p&gt;

&lt;p&gt;Simplicity wins: Google Books is perfect for rapid prototype agents&lt;/p&gt;

&lt;h2&gt;
  
  
  Future Enhancements
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;caching + local embeddings for book similarity&lt;/li&gt;
&lt;li&gt;store user preferences (“favorite author”, etc)&lt;/li&gt;
&lt;li&gt;integrate Goodreads style rating metadata from alternate free sources&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;Mastra + Google Books + Telex = effortless production-grade agent building.&lt;/p&gt;

&lt;p&gt;BookCompass only uses one API — yet the depth of capability feels like more than a demo.&lt;/p&gt;

&lt;p&gt;This is the kind of agent you can plug into:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;reading clubs&lt;/li&gt;
&lt;li&gt;online book communities&lt;/li&gt;
&lt;li&gt;education projects&lt;/li&gt;
&lt;li&gt;book recommendation systems&lt;/li&gt;
&lt;li&gt;and immediately deliver utility, not gimmicks.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Resources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://mastra.ai/docs/" rel="noopener noreferrer"&gt;Mastra Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://mastra.ai/docs/agents/overview" rel="noopener noreferrer"&gt;Mastra Agents Guide&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://mastra.ai/docs/agents/using-tools" rel="noopener noreferrer"&gt;Mastra Tools Guide&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://a2a-protocol.org/" rel="noopener noreferrer"&gt;A2A Protocol Spec&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://telex.im" rel="noopener noreferrer"&gt;Telex Platform&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developers.google.com/books/docs/overview" rel="noopener noreferrer"&gt;Google Books API&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
  </channel>
</rss>
