<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Joseph Oyetunde on Medium]]></title>
        <description><![CDATA[Stories by Joseph Oyetunde on Medium]]></description>
        <link>https://medium.com/@dotun-oyetunde?source=rss-ab4a848a3eb4------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*J7Y9lvBN0zJCozZd5U2vPA.jpeg</url>
            <title>Stories by Joseph Oyetunde on Medium</title>
            <link>https://medium.com/@dotun-oyetunde?source=rss-ab4a848a3eb4------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 15:42:15 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@dotun-oyetunde/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Building for Impact: How I Led Build With AI OAU 2026’s Web Development Pre-Series]]></title>
            <link>https://dotun-oyetunde.medium.com/building-for-impact-how-i-led-build-with-ai-oau-2026s-web-development-pre-series-e7debb91269d?source=rss-ab4a848a3eb4------2</link>
            <guid isPermaLink="false">https://medium.com/p/e7debb91269d</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[leadership]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[community]]></category>
            <dc:creator><![CDATA[Joseph Oyetunde]]></dc:creator>
            <pubDate>Wed, 22 Apr 2026 19:27:21 GMT</pubDate>
            <atom:updated>2026-04-22T19:27:21.705Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H0OeZD3xihDG6yBUM5OEMA.jpeg" /></figure><h3>It started with one question…</h3><p><em>How do you organize an event people won’t forget?</em></p><p>Not just an event where people attend, take notes, and leave — but one where they actually build something, feel something, and leave transformed.</p><p>That question stayed with me all through the planning of the BWAI OAU 2026 Web Development Pre-Series. And in many ways, it shaped everything that followed.</p><h3>The Vision</h3><p>Leading a Google Developer community had always been a long-time dream of mine. When I filled out the application, I was very clear about what I wanted to do if given the opportunity.</p><p>My vision was built on two pillars:</p><ul><li><strong>To create a safe, collaborative environment</strong> where every member feels heard, valued, and celebrated</li><li><strong>To drive real-world execution</strong>, where developers don’t just learn concepts but actively build and ship</li></ul><p>These weren’t just ideas — they were commitments.</p><p>So from the moment I got the acceptance mail, I got to work.</p><p>I began by listening.</p><p>Engaging members, understanding their expectations, identifying beginners, and mapping out our strengths and gaps. We were already preparing to kick off weekly discussions and collaborative projects when we received the call to prepare for <strong>Build With AI OAU 2026</strong>.</p><p>That changed everything.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jYnh-VBdTZ6VRqOsASxGYg.jpeg" /></figure><h3>When Plans Changed</h3><p>Planning intensified almost immediately.</p><p>We held multiple meetings, strategy sessions, and alignment calls to ensure everyone was on the same page. In all of this, working alongside our Campus Lead, Blessing Agbor, was a major advantage. Her structure, patience, and leadership made collaboration seamless and effective.</p><p>As we got closer to the event, I met with our facilitators — not just to discuss their sessions, but to align on the bigger picture.</p><p>What kind of experience were we trying to create?</p><p>What should people walk away with?</p><p>Their input, preparation, and confidence reassured me — we had the right people for this.</p><h3>Designing for Impact</h3><p>The night before the event, I locked in completely.</p><p>This wasn’t just about finalizing a schedule — it was about bringing together every idea into something intentional and impactful.</p><p>I prepared my welcome address on <em>“The Future Stack: Web Development in the Age of AI”</em>, diving deep into current AI trends, trade-offs, and even rehearsing how to build an AI agent from idea to production.</p><p>But beyond all that preparation, one thing kept coming back:</p><ul><li><em>How do we make this event memorable?</em></li><li><em>How do we ensure people leave with something tangible?</em></li><li><em>How do we engage both beginners and experienced developers?</em></li></ul><p>And then it clicked.</p><p><strong>Everyone had to build something — and complete it.</strong></p><p>That decision changed everything.</p><p>To reinforce it, I introduced a <strong>showcase and demo session</strong>, where participants would present what they built and receive feedback from facilitators and peers.</p><p>The moment I added that, I knew we had something different.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*df6sl0Go1Ahx7XVpMVaiuA.jpeg" /></figure><h3>The Event Day</h3><p>On the day of the event, everything came alive.</p><p>Our volunteers were already on ground — coordinated, prepared, and fully committed to their roles. Their effort made execution smooth.</p><p>I kicked things off by setting the tone — why we were here and why <em>Build With AI</em> matters. I focused on reframing AI as a tool for creation and emphasized the power of communal, hands-on learning.</p><p>Then we got to work.</p><h3>Session 1: Building &amp; Deploying</h3><p>Led by Enoch Idowu, this session focused on building, vibecoding, and deploying applications using Google Cloud Run. His depth of knowledge stood out — not just in delivery, but in how he supported participants.</p><p>Even after the session, he stayed back for close to 30 minutes, engaging with attendees who wanted to go deeper.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*umFcDXI7fuMxLaIiMrXdBA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d7jdmGMoS1WAlWHxBT0JHQ.jpeg" /></figure><h3>Session 2: Agent Building</h3><p>Naheem Adisa led the second session on building AI agents using Google’s ADK and MCP.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-Q9ThXLznJCZrFuv0oGOhg.jpeg" /></figure><p>His delivery was exceptional — clear, structured, and practical. He broke down complex ideas using relatable examples, including real-world applications. At a point where fatigue could have set in, I looked around and saw participants still actively building.</p><p>That’s when I knew — it was working.</p><h3>Moments That Mattered</h3><p>After a short break, we moved into the <strong>showcase and demo session</strong>.</p><p>Because expectations had been set early, participants were already working towards completion. Five individuals stepped forward to present their projects:</p><ul><li><em>Dirt-X</em> — A platform to report dirty environments and connect with cleaners</li><li><em>CampusSwap</em> — A decluttering and exchange platform with a reward system</li><li><em>Ticketing App</em> — Event access system with QR code functionality</li><li><em>Aro</em> — A humorous, customized roasting platform based on campus culture</li><li><em>Hairstylist Website</em> — A booking and showcase platform</li></ul><p>But one story stood out.</p><p>Mercy, the one behind the hairstylist website didn’t even come with a laptop. She came just to observe.</p><p>Yet, inspired by the environment, she decided to participate — and by the end of the event, she had built a website for her hair business and confidently presented it.</p><p>As she shared her story, one of the facilitators was moved enough to offer her a laptop to support her tech journey.</p><p>That moment meant everything.</p><p>It was more than a presentation — it was impact in real time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*av8UO_WUWhnz3oainsEfLQ.jpeg" /></figure><h3>Beyond the Event</h3><p>Even after the event ended, the learning didn’t stop.</p><p>Some participants went home, completed their projects, and shared them with the facilitators. That level of continuation showed that we didn’t just host an event — we sparked something.</p><p>Of course, we had challenges — timing and refreshment logistics — but they were quickly resolved and didn’t take away from the overall experience.</p><h3>What I Learned</h3><p>After everything wrapped up, I took time to speak with attendees and volunteers — getting feedback, understanding their experiences, and reflecting on what stood out.</p><p>Seeing the smiles, hearing their thoughts, and feeling the energy from what they had learned brought a deep sense of fulfilment.</p><p>Personally, I learned a lot too.</p><p>From the facilitators, I gained exposure to new tools, techniques, and perspectives. From the experience itself, I learned adaptability.</p><p>We had planned to bring in an additional speaker but couldn’t finalize that in time. I had to step in and fill that gap.</p><p>Looking back, that challenge became one of the most defining parts of the experience. It stretched me, pushed me, and made the journey even more meaningful.</p><h3>Looking Ahead</h3><p>I look forward to creating more moments like this — where people don’t just attend events, but leave with something real.</p><p>Something built.<br>Something learned.<br>Something that moves them forward.</p><p>Because in the end, it’s not just about organizing events.</p><p>It’s about creating environments where people can grow — and sometimes, where lives can change.</p><h3>If you’re building communities…</h3><p>Build for impact.</p><p>Don’t just focus on what people will hear — focus on what they will <strong>do</strong>, <strong>feel</strong>, and <strong>leave with</strong>.</p><p>That’s where the real difference is.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1Pcd1fVNzYiD6liW9JRxQQ.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e7debb91269d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Beyond Competition: Why the AI Race Is About Dominance, Not Rivalry]]></title>
            <link>https://dotun-oyetunde.medium.com/beyond-competition-why-the-ai-race-is-about-dominance-not-rivalry-2be102f28dfd?source=rss-ab4a848a3eb4------2</link>
            <guid isPermaLink="false">https://medium.com/p/2be102f28dfd</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[ai-research]]></category>
            <category><![CDATA[innovation]]></category>
            <dc:creator><![CDATA[Joseph Oyetunde]]></dc:creator>
            <pubDate>Mon, 12 Jan 2026 01:03:50 GMT</pubDate>
            <atom:updated>2026-01-12T01:03:50.350Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9RXh6aji1OAbpgLuR8sbDA.png" /></figure><p>Hello world,</p><p>For some time now, I’ve been fascinated by the constant release of newer AI models by leading companies — each one seemingly outshining the last with faster execution, deeper reasoning, and increasingly impressive multimodal capabilities. I subscribed to newsletters, release notes, and research updates just to stay informed. Whenever a notification beeped, I found myself racing to check it out, comparing it with previous versions, and almost always walking away amazed — not just by the intelligence on display, but by the sheer amount of work being poured into building these systems.</p><p>As I began using these models more deeply in my own work, my curiosity shifted. I was no longer just impressed by what they could do, but increasingly drawn to the <em>intelligence behind the intelligence</em>. Yes, we often explain AI as machines making sense of data — and that’s not new. Variants of this idea have existed for decades. But what we are experiencing now feels fundamentally different.</p><p>This isn’t just about asking questions and receiving answers anymore. It’s no longer limited to summarizing text or paraphrasing paragraphs. We now have agents that can reason through tasks, execute multi-step workflows, and even recognize when a task goes beyond their capabilities — explicitly handing control back to a human when necessary. That depth of capability left me with more questions than answers.</p><p>And so I kept asking: <strong>what exactly has brought us to this point?</strong> 🤔<br> What fuels the production of faster, better models that make their predecessors feel obsolete within months?</p><p>Naturally, my thoughts went to recent history. It all seemed to accelerate when OpenAI released ChatGPT — a moment that took the internet by storm toward the end of 2023. From that point on, everything changed rapidly. Companies rushed to integrate AI into their products and workflows. Entire industries began to reorganize around it. Looking back, it may have been one of the fastest technological shifts we’ve ever witnessed — almost a compressed revolution.</p><p>Yet one question lingered: <strong>why so fast?</strong></p><p>For a while, competition felt like the obvious answer. The story was easy to tell. ChatGPT posed a major threat to Google, so Google responded. Gemini began showing rapid improvements, so OpenAI pushed harder. Claude, Gemini, and GPT emerged as the frontiers of this new wave, each showing remarkable progress in short timeframes. They were different research labs, different philosophies, different approaches — surely they were racing to outperform one another, to top benchmarks, to claim superiority.</p><p>And while parts of that explanation are not wrong, I eventually realized something important: <strong>it still wasn’t enough</strong>.</p><p>Because what we were seeing didn’t look like traditional competition. OpenAI, for instance, repeatedly released models that made its own previous versions feel outdated — sometimes within months. From GPT-3.5 to GPT-4 and onward, the company showed little hesitation in deprecating its own milestones. From a purely commercial standpoint, this is strange behavior. Most companies protect their best-selling products. Here, obsolescence seemed intentional.</p><p>That was my first real clue.</p><p>This wasn’t about protecting a product.<br> It was about becoming the <em>default reference point</em>.</p><h3>When Progress Feels Inevitable</h3><p>One of the strongest forces driving today’s AI acceleration is a shared belief — sometimes explicit, often implicit — that advanced AI is inevitable. The question has shifted from <em>if</em> it will exist to <em>who</em> will shape it.</p><p>This belief changes behavior.</p><p>Google’s trajectory is a good example. For years, Google led AI research quietly, publishing foundational papers and advancing theory while remaining cautious about mass deployment. Then ChatGPT arrived, and the tone shifted almost overnight. Gemini followed. Updates became frequent. AI moved from research papers into Search, Workspace, Android, and everyday user experiences.</p><p>Google didn’t suddenly learn how to build AI — it already knew. What changed was the realization that intelligence had become a <strong>user-facing interface</strong>, not just backend infrastructure. In an inevitable future, restraint becomes risk.</p><p>When progress feels unavoidable, moving fast stops being reckless — it starts to feel responsible.</p><h3>Primacy Over Victory</h3><p>This brings us to primacy.</p><p>Primacy isn’t about winning in the short term. It’s about being first to establish what becomes normal. The first assistant people trust. The first interface they default to. The first system that quietly integrates itself into daily thinking and work.</p><p>Once that happens, everything else becomes harder to displace — not because alternatives are worse, but because habits and ecosystems have already formed.</p><p>Anthropic’s Claude offers an interesting counterpoint here. Rather than racing purely on spectacle or speed, Claude has leaned heavily into long-context reasoning, alignment, and thoughtful interaction. Yet despite this measured approach, its capabilities have advanced rapidly. This isn’t a slower competitor trying to catch up — it’s a lab shaping a different definition of what “good AI” should feel like.</p><p>And that matters.</p><p>Because whoever defines <em>quality</em> ends up shaping the entire ecosystem.</p><h3>Relevance as an Existential Question</h3><p>At this point, it becomes clear that the real fear isn’t losing to a competitor.</p><p>It’s becoming irrelevant.</p><p>In a world where intelligence increasingly behaves like infrastructure, being forced to build on someone else’s assumptions can be limiting. Whoever establishes the dominant models doesn’t just offer tools — they influence how problems are framed, how solutions are evaluated, and what kinds of thinking are amplified.</p><p>This also explains the relentless release cycles. Models are often shipped before benchmarks fully stabilize, before long-term evaluations are complete. To outsiders, this can look irresponsible. But in fast-forming ecosystems, perception often precedes measurement. Once a system becomes widely used, it shapes workflows, tooling, and developer assumptions long before formal comparisons catch up.</p><p>In a sense, the goal isn’t to win benchmarks.</p><p>It’s to become what benchmarks measure against.</p><h3>Dominance Without Secrecy</h3><p>There’s another subtle signal worth noticing: openness.</p><p>Many of these labs publish research openly, share methodologies, and release findings into the public domain. At first glance, this seems counterintuitive in a race. But openness doesn’t eliminate advantage — it transforms it.</p><p>Publishing establishes authority. It attracts talent. It sets research agendas. Even when others replicate the work, the original authors often remain the reference point. Control, in this case, doesn’t come from hiding information, but from shaping the direction of inquiry itself.</p><h3>A Final Thought</h3><p>So yes, there is a race — but it’s not the kind we usually imagine.</p><p>This isn’t primarily about competition in the traditional sense. It’s about inevitability, primacy, and relevance. About who gets to define defaults in a future that’s arriving faster than anyone expected.</p><p>Perhaps the most important question isn’t <em>who wins the AI race</em>.</p><p>It’s <strong>who gets to decide what the race is really about</strong>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2be102f28dfd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Complete Guide to building AI Agents with Claude AI]]></title>
            <link>https://dotun-oyetunde.medium.com/a-complete-guide-to-building-ai-agents-with-claude-ai-c7bfd3c58023?source=rss-ab4a848a3eb4------2</link>
            <guid isPermaLink="false">https://medium.com/p/c7bfd3c58023</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[claude-ai]]></category>
            <category><![CDATA[nextjs]]></category>
            <category><![CDATA[chatbots]]></category>
            <dc:creator><![CDATA[Joseph Oyetunde]]></dc:creator>
            <pubDate>Sun, 25 May 2025 20:50:37 GMT</pubDate>
            <atom:updated>2025-05-25T20:50:37.044Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tEfNLWYdfs-II2VkEzorFQ.jpeg" /></figure><p>In today’s fast-paced world of innovation, AI has become an essential tool for both developers and business owners alike, and everyone is working to integrate AI in their applications in order to expand their product capabilities improve user experience.</p><p>This article will walk you through a step-by-step guide on how to create and configure your AI Agent using Anthropic Claude AI. Whether it’s for your business or personal use, Anthropic Claude offers one of the best services and behaviours you can expect from an AI agent, ranging from text generation, to reasoning, to analysis, to image generation, to document processing, to coding and lots more.</p><h4>Why Choose Claude AI?</h4><blockquote>Claude is an enterprise-grade AI system optimized for performance across reasoning, mathematics, programming, and multilingual tasks. It supports a wide range of capabilities designed for scalable, production-level applications.</blockquote><p>At a glance, below are the core capabilities of Claude, culled from their documentation:</p><h3>Core Capabilities</h3><p><strong>Text and Code Generation</strong></p><ul><li>Generates high-quality content aligned with brand voice</li><li>Writes, debugs, and queries complex codebases</li><li>Enables multilingual translation</li><li>Supports financial forecasting and legal document analysis with long-context processing</li></ul><p><strong>Vision</strong></p><ul><li>Analyzes visual input, including charts and diagrams</li><li>Converts images into code templates or descriptions</li><li>Assists accessibility by describing images for visually impaired users</li></ul><p><strong>Tool Use and API Integration</strong></p><ul><li>Interfaces with external tools and APIs</li><li>Supports reasoning and task execution via structured outputs and API calls</li></ul><h4>What Will Our Agent Do?</h4><p>We’ll build an advanced chatbot-style agent with the following features:</p><ol><li>Collect users’ basic information (preferably an email address) to follow up if chat ends unexpectedly.</li><li>Provide tailored responses about your products/services.</li><li>Transfer chats to humans for questions regarding human intervention especially in the health field or questions beyond the reach of the agent.</li><li>Embed useful links in messages (e.g get subscription, book appointments, etc.).</li></ol><p>Additionally, our agent will:</p><ol><li>Have a clear and precise identity, such that it knows the exact assistant role it would be playing.</li><li>Use a reference knowledge base serving as its primary source of information to support its responses.</li><li>Follow custom dos and don&#39;ts.</li><li>Intercept and enhance Claude responses to give a more personalized and intuitive response.</li><li>Set boundaries for when to transfer control to human rather than allow it to hallucinate thereby producing inaccurate results.</li></ol><h4>Step 1: Setup Claude SDK</h4><p>The first thing to do is head to <a href="https://console.anthropic.com/">Claude Console </a>and create an account or login to an existing account, then if you’re a developer, proceed to generate your API keys and jump to the next step, but if you’re a business owner, you can simply send the login credentials to your technical team and let them take it up from there.</p><blockquote>We will be using <strong>Nextjs</strong> and <strong>Typescript</strong> throughout this tutorial but the same implementation works across other frameworks or maybe with just a little tweak.</blockquote><p>The first thing you’d do is install the anthropic-ai SDK using your preferred package manager, npm in our case:</p><pre>npm install @anthropic-ai/sdk</pre><p>Then, you create an instance of the Anthropic Class and initialize it to a variable name of your choice, CoddyAI for example.</p><pre>import Anthropic from &#39;@anthropic-ai/sdk&#39;;<br><br>const CoddyAI = new Anthropic({<br>  apiKey: process.env.CLAUDE_API_KEY<br>});</pre><h4>Step 2: Send Your First Message</h4><p>We then proceed to configure our CoddyAI, below is the most basic format:</p><pre>const message = await CoddyAI.messages.create({<br>  model: &quot;claude-3-7-sonnet-20250219&quot;,<br>  max_tokens: 1024,<br>  messages: [{ role: &quot;user&quot;, content: &quot;Hello, Coddy&quot; }],<br>});</pre><p>Put simply, model specifies the exact Claude model you want to use. max_tokens defines the maximum number of tokens allowed in each response. And messages contains the conversation history that the model uses for context.</p><h4>Step 3: Add System Instructions</h4><p>Remember, we’re building a <strong>custom AI agent, </strong>and as such, we’ll need to tailor CoddyAI to behave more like a specialized assistant rather than the broad, general-purpose model Claude was originally designed to be.</p><p>To achieve this, we add the <strong>system</strong> parameter to our configuration options. This provides us with 3 key benefits: Enhanced accuracy, Tailored tone and Improved focus.</p><pre>const message = await CoddyAI.messages.create({<br>  model: &quot;claude-3-7-sonnet-20250219&quot;,<br>  max_tokens: 1024,<br>  system: [<br>    {<br>      type: &quot;text&quot;,<br>      text: &quot;You are a friendly support agent named COddy. You begin every conversation by introducing yourself and clearly explaining how you can assist—whether it&#39;s booking appointments, handling registrations, or helping with other tasks.&quot;,<br>      cache_control: { type: &quot;ephemeral&quot; }<br>    },<br>    {<br>      type: &quot;text&quot;,<br>      text: &quot;Be brief, concise and clear in your responses, respond with VERY FEW sentences and ONLY elaborate where necessary.&quot;,<br>    }<br>  ],<br>  ...<br>});</pre><p>This helps CoddyAI behave more predictably and professionally.</p><p>So here, you should add all the major instructions you expect from your agent, ranging from its behaviours, guiding principles, roles and other related information needed to get relevant and structured responses. You can also include your Dos and Don&#39;ts here, specifying which is mandatory and should be strictly followed.</p><h4>Step 4: Use Tools for Enhanced Capabilities</h4><p>Claude tools offer enhanced capabilities and would be the major parameter doing the magic for us.</p><p>Tools allow you to extend Claude’s capabilities to perform a wider variety of tasks.</p><p>For me, there are 2 major use of tools:</p><ol><li><strong>Function Calling</strong>: This in our case would mean that our agent is capable of performing certain actions for our users, like booking appointments, paying for subscriptions, registering for an event, etc.</li><li><strong>Return structured JSON responses</strong>.</li></ol><blockquote>During my initial experience with AI, particularly OpenAI, one of my major challenges back then was the fact that I could not directly force OpenAI to return a structured format for its response, something like a schema.</blockquote><blockquote><strong>Disclaimer</strong>: I don’t know how it works now though.</blockquote><p>But with Claude tool use, we can be sure that our responses will always be in the format specified during configuration.</p><p>In our case, we would be using Claude tools to achieve the following:</p><h4>1. Ensure A Consistent and Structured Response</h4><p>From the code below, we see a typical tool definition having the following parameters: name:- The name of the tool, this must match the regex ^[a-zA-Z0-9_-]{1,64}$, description:- A detailed plaintext description of what the tool does, when it should be used, and how it behaves and input_schema:- A <a href="https://json-schema.org/">JSON Schema</a> object defining the expected parameters for the tool. This schema defined here, ensures that our response remains consistent across each requests and each call to this tool.</p><p><strong>Example Tool: </strong>unanswered_query</p><pre>...<br>tools: [<br>  {<br>    name: &quot;unanswered_query&quot;,<br>    description: &quot;Trigger this when there are no references to answer user&#39;s question from the provided reference documents.&quot;,<br>    input_schema: {<br>      type: &quot;object&quot;,<br>      properties: {<br>          reason: { type: &quot;string&quot;, description: &quot;The reason why you cannot answer user&#39;s question.&quot; },<br>          chat_summary: { type: &quot;string&quot;, description: &quot;Summary of user&#39;s chat.&quot; }<br>      },<br>      required: [&quot;reason&quot;, &quot;chat_summary&quot;]<br>    }<br>  },<br>  ...<br>]</pre><h4>Sample Response:</h4><pre>{<br>  &quot;id&quot;: &quot;msg_01Aq9w938a90dw8q&quot;,<br>  &quot;model&quot;: &quot;claude-3-7-sonnet-20250219&quot;,<br>  &quot;stop_reason&quot;: &quot;tool_use&quot;,<br>  &quot;role&quot;: &quot;assistant&quot;,<br>  &quot;content&quot;: [<br>    {<br>      &quot;type&quot;: &quot;tool_use&quot;,<br>      &quot;id&quot;: &quot;toolu_01A09q90qw90lq917835lq9&quot;,<br>      &quot;name&quot;: &quot;unanswered_query&quot;,<br>      &quot;input&quot;: {&quot;reason&quot;: &quot;User is asking for an emergency help&quot;, &quot;chat_summary&quot;: &quot;...&quot;}<br>    }<br>  ]<br>}</pre><blockquote>Now, here is another thing, you just might be considering an AI assistant that acts like the regular APIs, in the sense that, you make a request, and you can tell what the exact response is like, then filter down, format to your needs and display the result, Claude tool use would be very helpful there.</blockquote><h4>2. Intercept Claude Responses</h4><p><strong>Intercept Claude responses</strong> at specific instances in order to perform certain actions. This would enable us to <strong>take control of chat</strong><em> and</em> <strong>rewrite the response</strong> in a more human-readable format. For example, we could define a tool called unanswered_query which would be triggered if Claude is unable to provide an answer to the question asked by the user from the provided references, so instead of trying to hallucinate (an experience common with AI models) and wanting to formulate an answer, we intercept that and print a more intuitive message like — “<em>I’m not authorised to answer that. Let me transfer you to a human agent.”</em></p><h4>3. Inject Useful Links</h4><p><strong>Inject useful links</strong> in responses where necessary to improve users’ experience across your app, you can use this to move users within your site or cite other sites. For example, we could define a tool called book_appointment which in our case would be used to know when Claude is trying to respond to a question requesting for appointment or something related, so Claude calls this tool, returns the correct response and on the client side, we catch this response, inject the correct link into the response and format it to our taste. A sample code is given below:</p><p><strong>Tool</strong>: book_appointment</p><pre>// book appointment tool definition<br>...<br>tools: [<br>  {<br>    name: &quot;book_appointment&quot;,<br>    description: &quot;Handles user requests related to booking appointments.&quot;,<br>    input_schema: {<br>      type: &quot;object&quot;,<br>      properties: {<br>        supportingInformation: {type: &quot;string&quot;, description: &quot;Supporting information to guide in booking appointment using information from reference content.&quot;},<br>      },<br>      required: [&quot;supportingInformation&quot;]<br>    }<br>  }<br>]</pre><h4>Sample Response:</h4><pre>{<br>  &quot;id&quot;: &quot;msg_01Aq9w938a90dw8q&quot;,<br>  &quot;model&quot;: &quot;claude-3-7-sonnet-20250219&quot;,<br>  &quot;stop_reason&quot;: &quot;tool_use&quot;,<br>  &quot;role&quot;: &quot;assistant&quot;,<br>  &quot;content&quot;: [<br>    {<br>      &quot;type&quot;: &quot;tool_use&quot;,<br>      &quot;id&quot;: &quot;toolu_01A09q90qw90lq917835lq9&quot;,<br>      &quot;name&quot;: &quot;book_appointment&quot;,<br>      &quot;input&quot;: {&quot;supportingInformation&quot;: &quot;We are only available for appointment on Mondays to Friday from 8am to 5pm.&quot;}<br>    }<br>  ]<br>}</pre><p>Then on the client side, we make our request and receive the response like this:</p><pre>import axios from &#39;axios&#39;;<br><br>const sendPrompt = async(prompt : string) : Promise&lt;void&gt; =&gt; {<br>  try{<br>    const { data } = await axios.post(&quot;/api/claude/ai&quot;, {<br>        prompt<br>    })<br>    const response = data.message; // this holds the information in the content block<br>  <br>    for(const m of response){<br>      if(m.type == &quot;tool_use&quot;){<br>        // we will be using switch here to catch different tool types and perform certain actions for each.<br>        switch(m.name){<br>          // an example of the tool we declared earlier<br>          case &quot;unanswered_query&quot; : <br>            text = &quot;That&#39;s a bit outside what I can assist with, so I&#39;m connecting you to someone better suited to help. If no one joins within a minute, don&#39;t worry-we&#39;ll follow up with you by email shortly.&quot;<br>            handOffContent = JSON.stringify(m.input);<br>            await handOff(text, handOffContent);<br>          break;<br>          case &quot;book_appointment&quot; : <br>            text = `${m.input.supportingInformation} \n\n Feel free to [[book appointment]] at your own convenience`<br>          break;<br>        }<br>      }<br>    }<br>  }catch(e:any){<br>    // You can write your error catch logic here<br>  }<br>}  </pre><p>In the book_appointment tool, you&#39;ll notice that I&#39;ve formatted the appointment reference using double square brackets. When preparing the response for the client, this placeholder should be replaced with a link, either to the specific booking interface or to an external page, depending on where the appointment is handled.</p><blockquote>You can also try out another tool for <strong>transferring chat to a human agent</strong> yourself following the way we did for unanswered query and keep your users engaged :)</blockquote><h4>4. Function Calling</h4><p>This is one of the major use of Claude tools, as it allows for retrieving of information, performing complex calculations, manipulating data, interacting with external systems and a host of others. One that stand out for me is performing complex calculations that may be beyond Claude’s built in capabilities, especially for application specific calculations. This is how tool use works with function calling:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1_O0K2tDYDu69SqKSu4l5w.png" /><figcaption>Downloaded from anthropic tool use course on github.</figcaption></figure><h4>Step 5: Provide Knowledge Base And Reference Documents</h4><p>Next, we supply our agent with a knowledge base or reference documents to help it generate responses very peculiar to our products and services, taking into consideration the interest of our users.</p><p>For this article, we will be leveraging Claude’s PDF support. Claude has given us the ability to process PDFs, extract text, analyze charts, and understand visual content from our documents. But in our case we are going to be uploading our knowledge base in form of a document or series of related documents and allow it refer to it when generating its responses.</p><p>Before we dive deep into the PDF processing, I noticed I haven’t said much about the messages parameter, so quickly, that’s where you pass in your conversation history and current prompt to Claude as well as your reference documents, and <em>to improve performance, ensure you place your PDFs before texts in your requests</em> and set the role as “user”.</p><blockquote>Always remember that Claude is <strong>stateless</strong> and does not keep track of your chats history nor understands the context in which you are replying with, so it’s <strong>imperative</strong> that you always send back all previous messages and conversation history along side each request.</blockquote><p>The messages parameter takes in an array of objects with only two properties: role (which can only be user <strong>and</strong> assistant) and content (which can be anything ranging from text, image, pdf etc).</p><p>Before we get started, here are a few things to consider when processing PDF documents with Claude:</p><ol><li>Maximum request size of 32MB</li><li>Maximum pages per request is 100</li><li>Standard PDF format (No passwords/encryption)</li></ol><p>Also, you can provide PDFs to Claude in three ways:</p><ol><li>As a URL reference to a PDF hosted online</li><li>As a base64-encoded PDF in document content blocks</li><li>By a file_id from the <a href="https://docs.anthropic.com/en/docs/build-with-claude/files">Files API</a> (beta)</li></ol><p>In our case, we will be processing our documents in the base64-encoded format. A sample code is given below:</p><pre>import { ContentBlockParam } from &quot;@anthropic-ai/sdk/resources/index.mjs&quot;;<br>import fetch from &quot;node-fetch&quot;;<br><br>// your file type can be something like<br>type File {<br>  uuid: string;<br>  src: string;<br>  created_at: Date;<br>}<br><br>const processKBDocuments = async(documents: File[]) : Promise&lt;ContentBlockParam[]&gt; =&gt; {<br>    const docsBase64 : ContentBlockParam[] = [];<br>    const processDoc = async(doc : File, index: number) =&gt; {<br>        const pdfResponse = await fetch(doc.src);<br>        const arrayBuffer = await pdfResponse.arrayBuffer();<br>        const pdfBase64 = Buffer.from(arrayBuffer).toString(&#39;base64&#39;);<br>        const content : ContentBlockParam = {<br>            type: &quot;document&quot;,<br>            source: {<br>                type: &quot;base64&quot;,<br>                media_type: &#39;application/pdf&#39;,<br>                data: pdfBase64,<br>            },<br>        }<br>        if(index == documents.length - 1){<br>            content.cache_control = { type: &#39;ephemeral&#39; };<br>        }<br>        docsBase64.push(content);<br>    }<br><br>    await Promise.all(documents.map(processDoc));<br><br>    docsBase64.push({<br>        type: &#39;text&#39;,<br>        text: &#39;Use this document as a reference to answer clients questions.&#39;,<br>    })<br>    return docsBase64;<br>}</pre><p>And after this, all you just need is to call this function and pass in your array of files, something like this:</p><pre>const pdfBase64Docs = await processKBDocuments(KBDocuments);</pre><p>And so, our CoddyAI agent config now looks like this:</p><pre>const message = await CoddyAI.messages.create({<br>  model: &quot;claude-3-7-sonnet-20250219&quot;,<br>  max_tokens: 1024,<br>  system: [<br>    ...<br>  ],<br>  tools: [<br>    ...<br>  ],<br>  messages: [<br>    {<br>      role: &quot;user&quot;,<br>      content: [ ...pdfBase64Docs ]<br>    },<br>    // ...conversation_history  <br>    // ...current prompt<br>  ]<br>});</pre><p>And as discussed earlier, for each requests, prefill the messages array with your conversation history, as well as the current prompt.</p><p>With this, our CoddyAI agent would now be able to reply to user’s questions, refer to our knowledge base for exact answers, transfer chats to a human agent for questions not found in the documents or ones needing human interaction and intervention especially for clinical agents and finally inject quick links in our responses.</p><p>I can’t wait to see what you’re going to build with this knowledge.</p><p>Thank you for coming this far. For more info and understanding, you can refer to their official documentation at <a href="https://docs.anthropic.com/">Claude Docs</a>.</p><h4>Watch out for my next article, I will be guiding you on how to train your agent and control it responses more closely.</h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c7bfd3c58023" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>