<?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>Forem: IQ AI</title>
    <description>The latest articles on Forem by IQ AI (@iqaicom).</description>
    <link>https://forem.com/iqaicom</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%2Forganization%2Fprofile_image%2F11321%2F0773dbc9-3ef7-4c0f-ae78-5b24e27d9f39.png</url>
      <title>Forem: IQ AI</title>
      <link>https://forem.com/iqaicom</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/iqaicom"/>
    <language>en</language>
    <item>
      <title>How to Build Your First AI Agent in TypeScript with ADK-TS</title>
      <dc:creator>Timonwa Akintokun</dc:creator>
      <pubDate>Wed, 19 Nov 2025 08:00:00 +0000</pubDate>
      <link>https://forem.com/iqaicom/how-to-build-your-first-ai-agent-in-typescript-with-adk-ts-2jk7</link>
      <guid>https://forem.com/iqaicom/how-to-build-your-first-ai-agent-in-typescript-with-adk-ts-2jk7</guid>
      <description>&lt;p&gt;As TypeScript developers, we're always looking for ways to make our applications smarter and more interactive. While integrating AI into our apps has traditionally meant writing complex Python code or managing large language models, that's changing. Thanks to frameworks like &lt;a href="https://blog.iqai.com/introducing-the-agent-development-kit-adk-for-typescript/" rel="noopener noreferrer"&gt;ADK-TS&lt;/a&gt;, we can now build intelligent AI agents right in our TypeScript projects.&lt;/p&gt;

&lt;p&gt;In this tutorial, we'll build a simple multi-agent system that can handle weather queries and tell jokes. You'll learn how to create AI agents that can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Understand and respond to natural language requests
&lt;/li&gt;
&lt;li&gt;Use external APIs and tools to fetch real data
&lt;/li&gt;
&lt;li&gt;Work together as a coordinated system
&lt;/li&gt;
&lt;li&gt;Handle different types of user queries intelligently&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By the end of this tutorial, you'll have a working AI agent system and understand how to extend it for your own projects. Let's get started.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;What are AI Agents?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;When we talk about AI agents, we're talking about making our applications smarter in how they handle user requests. Instead of just responding to specific commands, an AI agent can understand what a user wants and figure out how to help them.&lt;/p&gt;

&lt;p&gt;Think about a weather application. A traditional app might require users to click specific buttons or type exact city names. An AI agent, on the other hand, can understand natural questions like "Do I need an umbrella today?" or "What's the weather like in London?" and know how to get that information.&lt;/p&gt;

&lt;p&gt;What makes AI agents different from regular AI integrations? It's their ability to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Understand the context of conversations
&lt;/li&gt;
&lt;li&gt;Use different tools and APIs when needed
&lt;/li&gt;
&lt;li&gt;Make decisions about how to handle requests
&lt;/li&gt;
&lt;li&gt;Work together with other agents to solve problems&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Why Build AI Agents in TypeScript?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;As TypeScript developers, we're used to building well-structured, type-safe applications. While Python has been the go-to language for AI development, TypeScript offers some real advantages:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;We can use our existing TypeScript skills and tools
&lt;/li&gt;
&lt;li&gt;We get great IDE support and type checking
&lt;/li&gt;
&lt;li&gt;Our agents can easily integrate with our TypeScript/JavaScript backends
&lt;/li&gt;
&lt;li&gt;We can seamlessly add AI agents to existing web applications
&lt;/li&gt;
&lt;li&gt;We can deploy our agents alongside our existing services&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Plus, with frameworks like ADK-TS, we don't need to learn complex AI concepts or deal with model training. The framework handles the heavy lifting for you—model integrations, built-in session and memory management, tool handling, observability, and more. We can just focus on building useful features using familiar TypeScript patterns.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;What Makes ADK-TS Different&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://adk.iqai.com/" rel="noopener noreferrer"&gt;ADK-TS&lt;/a&gt; is a TypeScript-first framework that simplifies building AI agents and multi-agent systems. It provides type-safe APIs using TypeScript and Zod, supports multiple LLM providers (OpenAI, Anthropic, Gemini, and more), enables streaming responses for real-time interactions, and includes built-in memory management for stateful conversations.&lt;/p&gt;

&lt;p&gt;You can also orchestrate multiple agents to work together, create reusable tools for external integrations, and deploy agents as HTTP servers or integrate them into existing applications. The framework uses familiar patterns, such as fluent builders and factory functions, that fit naturally into your TypeScript workflow.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Building Our First AI Agent System&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;We'll build a multi-agent system that has one root agent and coordinates two specialized sub-agents:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Root agent (router): accepts user requests and delegates work to the appropriate sub-agent
&lt;/li&gt;
&lt;li&gt;Weather agent: fetches current weather using a &lt;code&gt;weatherTool&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Joke agent: returns random jokes using a &lt;code&gt;jokeTool&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each sub-agent has its own tools and logic, while the root agent focuses on routing requests. This structure gives us separation of concerns (changes to weather logic won't affect jokes), easier testing (test tools and agents can run in isolation), and the ability to add new agents without disrupting existing ones.&lt;/p&gt;

&lt;p&gt;Let's set up our project.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Project Folder Structure&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Here's a recommended structure for organizing your project:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;my-first-ai-agent/
├── src/
│   ├── agents/
│   │   ├── weather-agent/
│   │   │   ├── tools.ts
│   │   │   └── agent.ts
│   │   ├── joke-agent/
│   │   │   ├── tools.ts
│   │   │   └── agent.ts
│   │   └── agent.ts          # Root agent
│   ├── env.ts
│   └── index.ts
├── .env
├── tsconfig.json
└── package.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  This structure helps keep your code organized by separating each agent into its own folder with its tools. You can adapt this layout to fit your preferences, but this approach makes it easier to maintain and scale as you add more agents.
&lt;/h3&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Setting Up the Project&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Next, open your terminal and run the following commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;mkdir &lt;/span&gt;my-first-ai-agent
&lt;span class="nb"&gt;cd &lt;/span&gt;my-first-ai-agent
pnpm init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Install the necessary dependencies:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pnpm add @iqai/adk dotenv zod
pnpm add &lt;span class="nt"&gt;-D&lt;/span&gt; typescript @types/node tsx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Create a basic TypeScript configuration in &lt;code&gt;tsconfig.json&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;tsconfig.json&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"compilerOptions"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"target"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"ES2020"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"module"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"CommonJS"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"outDir"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"./dist"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"rootDir"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"./src"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"strict"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"esModuleInterop"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Create a &lt;code&gt;.env&lt;/code&gt; file to store your environment variables:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# .env&lt;/span&gt;
&lt;span class="nv"&gt;GOOGLE_API_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;your_google_api_key_here
&lt;span class="nv"&gt;LLM_MODEL&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;gemini-2.5-flash &lt;span class="c"&gt;# Default model&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can get a Google API key from the &lt;a href="https://aistudio.google.com/api-keys" rel="noopener noreferrer"&gt;Google AI Studio&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;ADK-TS supports multiple LLM providers, but we will be using Gemini, which is the default provider. To learn more about configuring different LLM providers, check out the &lt;a href="https://adk.iqai.com/docs/framework/agents/models" rel="noopener noreferrer"&gt;ADK-TS documentation&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Lastly, create a &lt;code&gt;.env.ts&lt;/code&gt; file to load the environment variables:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// src/env.ts&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;config&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;dotenv&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;zod&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nf"&gt;config&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;envSchema&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;object&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
 &lt;span class="na"&gt;GOOGLE_API_KEY&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
 &lt;span class="na"&gt;LLM_MODEL&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="k"&gt;default&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;gemini-2.5-flash&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="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;env&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;envSchema&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This sets up our project structure and configuration. Next, we'll start building our tools and agents.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Agent Interaction Flow&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Before we dive into the code, let's visualize how our multi-agent system works:&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%2Fytpxc444czz5ebs5n8cu.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%2Fytpxc444czz5ebs5n8cu.png" alt="A comprehensive diagram showing how the root agent coordinates with specialized sub-agents to handle user requests through external APIs." width="800" height="900"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The diagram shows the complete flow of a user request through our system:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;User makes a request&lt;/strong&gt; - The user asks a natural-language question, such as "What's the weather in London?"
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Root agent analyzes&lt;/strong&gt; - The root agent receives the request and determines which specialized agent should handle it
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Root agent delegates&lt;/strong&gt; - Based on the analysis, the root agent routes the task to the appropriate sub-agent (Weather Agent in this example)
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Selected sub-agent executes&lt;/strong&gt; - Only the chosen sub-agent activates and uses its tools to fetch data from external APIs
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Response delivered&lt;/strong&gt; - The sub-agent returns data through the root agent back to the user&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If the user had asked for a joke instead, the Joke Agent would be selected, while the Weather Agent would remain inactive. This selective activation ensures efficiency and clarity in handling requests.&lt;/p&gt;

&lt;p&gt;Now, let’s start building our tools and agents.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Creating Tools for Our Agents&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Before we build the agents, we need to create the tools they will use. Tools are reusable components that encapsulate specific functionality, making it easier for agents to perform tasks. They extend the agent's capabilities by enabling it to interact with external APIs or services in a structured way.&lt;/p&gt;

&lt;p&gt;We will create two tools: one for fetching weather information and another for fetching jokes. These tools will wrap external APIs and provide a clean interface for our agents to use.&lt;/p&gt;

&lt;p&gt;Create a new file &lt;code&gt;src/agents/weather-agent/tools.ts&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// src/agents/weather-agent/tools.ts&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;createTool&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@iqai/adk&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;zod&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;weatherTool&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;createTool&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;get_weather&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Get current weather for a city&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;schema&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;object&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;city&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;describe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;City name&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="na"&gt;fn&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;city&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="s2"&gt;`https://wttr.in/&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nf"&gt;encodeURIComponent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;city&lt;/span&gt;&lt;span class="p"&gt;)}&lt;/span&gt;&lt;span class="s2"&gt;?format=3`&lt;/span&gt;
      &lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;text&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s2"&gt;`Weather unavailable for &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;city&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&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="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, create &lt;code&gt;src/agents/joke-agent/tools.ts&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// src/agents/joke-agent/tools.ts&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;createTool&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@iqai/adk&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;jokeTool&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;createTool&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
 &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;get_joke&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
 &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Fetches a random joke&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
 &lt;span class="na"&gt;fn&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;&amp;lt;https://official-joke-api.appspot.com/random_joke&amp;gt;&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="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;text&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Joke unavailable right now.&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="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These tools provide the basic capabilities our agents will need. The weather tool can fetch weather information for any city, while the joke tool retrieves random jokes from an API.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Creating Our Specialized Agents&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Now that we have our tools ready, let's create the agents that will use them. Each agent will focus on one specific task - either providing weather information or telling jokes.&lt;/p&gt;

&lt;p&gt;In &lt;code&gt;src/agents/weather-agent/agent.ts&lt;/code&gt;, create the weather agent:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// src/agents/weather-agent/agent.ts&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;LlmAgent&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@iqai/adk&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;env&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../../env&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;weatherTool&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./tools&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;getWeatherAgent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;weatherAgent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;LlmAgent&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;weather_agent&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;provides weather for a given city&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;LLM_MODEL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;tools&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;weatherTool&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;weatherAgent&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Similarly, in &lt;code&gt;src/agents/joke-agent/agent.ts&lt;/code&gt;, create the joke agent:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// src/agents/joke-agent/agent.ts&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;LlmAgent&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@iqai/adk&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;env&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../../env&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;jokeTool&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./tools&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;getJokeAgent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;jokeAgent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;LlmAgent&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;joke_agent&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;provides a random joke&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;LLM_MODEL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;tools&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;jokeTool&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;jokeAgent&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each agent is configured with a specific purpose and the tools it needs to do its job. The weather agent knows about weather-related queries, while the joke agent handles requests for humor.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Creating the Root Agent&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The root agent acts as a coordinator, directing user requests to the appropriate specialized agent. When a user asks a question like "What's the weather in Paris?" or "Tell me a joke," the root agent determines which sub-agent should handle the request. If the user asks a question that doesn't fit either category, the root agent can respond with a default message or handle it gracefully.&lt;/p&gt;

&lt;p&gt;Here's how we set it up in &lt;code&gt;src/agents/agent.ts&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// src/agents/agent.ts&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;AgentBuilder&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@iqai/adk&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;env&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../env&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;getJokeAgent&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./joke-agent/agent&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;getWeatherAgent&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./weather-agent/agent&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;getRootAgent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;jokeAgent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;getJokeAgent&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;weatherAgent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;getWeatherAgent&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;AgentBuilder&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;root_agent&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="nf"&gt;withDescription&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Root agent that delegates tasks to sub-agents for telling jokes and providing weather information.&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="nf"&gt;withInstruction&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
      &lt;span class="s2"&gt;`
     You are a routing agent. Analyze the user's request and delegate to the appropriate sub-agent:

    - For ANY request about weather, weather conditions, temperature, or location-based weather queries: delegate to weather_agent
    - For ANY request about jokes, humor, comedy, or asking to tell a joke: delegate to joke_agent

    Do not answer questions yourself. Always delegate to the appropriate sub-agent based on the request type.`&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;withModel&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;LLM_MODEL&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;withSubAgents&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="nx"&gt;jokeAgent&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;weatherAgent&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;build&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Putting It All Together&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Finally, let's create our main application file that uses our agent system. In &lt;code&gt;src/index.ts&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// src/index.ts&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;dotenv&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;dotenv&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;getRootAgent&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./agents/agent&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nx"&gt;dotenv&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;config&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;questions&lt;/span&gt; &lt;span class="o"&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;how is weather in london?&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;tell me a random joke&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;runner&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;getRootAgent&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

  &lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;question&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="nx"&gt;questions&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`📝 Question: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;question&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;response&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;runner&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;ask&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;question&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`🤖 Response: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&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="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="k"&gt;catch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This code creates our agent system and tests it with a couple of simple questions. The root agent automatically figures out which specialized agent should handle each request.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Running Your Agent&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;To run your agent system, add these scripts to your &lt;code&gt;package.json&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"scripts"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"dev"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"tsx watch src/index.ts"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"build"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"tsc"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"start"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"node dist/index.js"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And run your agent using:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pnpm dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should see output like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;📝 Question: how is weather &lt;span class="k"&gt;in &lt;/span&gt;london?
🤖 Response: The weather &lt;span class="k"&gt;in &lt;/span&gt;London is ⛅️ +14°C.
📝 Question: tell me a random joke
🤖 Response: Why &lt;span class="k"&gt;do &lt;/span&gt;programmers prefer dark mode? Because light attracts bugs!
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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%2Ftmx0cqlwkrf5070q8lh6.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%2Ftmx0cqlwkrf5070q8lh6.png" alt="Sample output from running the agent test script" width="800" height="189"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Using the CLI for Interactive Testing
&lt;/h2&gt;

&lt;p&gt;Instead of writing test scripts, you can interact with your agent directly using the ADK-TS CLI. First, install the CLI:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Install globally&lt;/span&gt;
pnpm add &lt;span class="nt"&gt;-g&lt;/span&gt; @iqai/adk-cli

&lt;span class="c"&gt;# Or use npx without global installation&lt;/span&gt;
npx @iqai/adk-cli
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The CLI provides two ways to test your agents:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Terminal-Based&lt;/strong&gt; &lt;strong&gt;Chat&lt;/strong&gt; (&lt;code&gt;adk run&lt;/code&gt;): Start an interactive chat session in your terminal for quick testing and experimentation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Web-Based Interface&lt;/strong&gt; (&lt;code&gt;adk web&lt;/code&gt;): Launch a local web server with a visual chat interface for a more user-friendly experience.&lt;/p&gt;

&lt;p&gt;Both methods auto-discover your agents from the &lt;code&gt;src/agents&lt;/code&gt; directory and let you test without writing any scripts. For detailed installation and usage instructions, check out the &lt;a href="https://adk.iqai.com/docs/cli" rel="noopener noreferrer"&gt;CLI documentation&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Using ADK-TS Built-in Tools&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;ADK-TS also includes several built-in tools you can use right away without creating custom implementations. For example, if you want to add web search capabilities to your agent, you can use the built-in &lt;code&gt;GoogleSearch&lt;/code&gt; tool:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;GoogleSearch&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;LlmAgent&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@iqai/adk&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;env&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../env&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;getSearchAgent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;LlmAgent&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;search_agent&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;searches the web for information&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;LLM_MODEL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;tools&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;GoogleSearch&lt;/span&gt;&lt;span class="p"&gt;()],&lt;/span&gt; &lt;span class="c1"&gt;// Use the built-in tool&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check out the &lt;a href="https://adk.iqai.com/docs/framework/tools" rel="noopener noreferrer"&gt;tools documentation&lt;/a&gt; to see what's available and how to use them.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Taking Your Agent Further&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;While our weather and joke example is straightforward, you can apply these same patterns to build more sophisticated agents. Here are some &lt;a href="https://blog.iqai.com/adk-ts-hackathon-2025-winners-announced/" rel="noopener noreferrer"&gt;real-world applications&lt;/a&gt;:&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Customer Service Agent&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;You could extend this pattern to create a customer service agent that answers product questions using a product database, handles order status inquiries by connecting to your order system, escalates complex issues to human support when needed, and maintains conversation context across multiple questions.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Development Assistant&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Create an agent that helps with coding tasks by analyzing pull requests and suggesting improvements, helping debug code by running tests and analyzing logs, generating documentation from code comments, and reviewing code for security issues.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Blockchain Portfolio Agent&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Build an agent that helps users manage their cryptocurrency investments by tracking portfolio performance across multiple exchanges, analyzing market trends using price data APIs, sending alerts for significant price changes, and providing insights on potential investment opportunities based on historical data and current market conditions.&lt;/p&gt;

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

&lt;p&gt;In this tutorial, we've built a multi-agent system using TypeScript and ADK-TS. We've seen how to create specialized agents that handle specific tasks, equip our agents with tools to give them real capabilities, coordinate multiple agents through a root agent, and structure our code in a maintainable way.&lt;/p&gt;

&lt;p&gt;This is just the beginning of what you can do with AI agents in TypeScript. Whether you're building a customer service system, a blockchain portfolio manager, or something entirely new, the patterns we've covered here will help you create organized and effective agent-based applications.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Next Steps&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;To view the complete code used in this tutorial, you can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Run &lt;code&gt;npx @iqai/adk-cli new --template simple-agent my-first-agent&lt;/code&gt; to scaffold a new project
&lt;/li&gt;
&lt;li&gt;Visit the &lt;a href="https://github.com/IQAIcom/adk-ts/tree/main/apps/starter-templates/simple-agent" rel="noopener noreferrer"&gt;GitHub repository&lt;/a&gt; to explore the source code&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Ready to build your own AI agent? Check out the &lt;a href="https://adk.iqai.com/" rel="noopener noreferrer"&gt;ADK-TS documentation&lt;/a&gt; for more examples and advanced features.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>typescript</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Autonomous AI Agents on Blockchain with ADK-TS &amp; NEAR</title>
      <dc:creator>Timonwa Akintokun</dc:creator>
      <pubDate>Mon, 13 Oct 2025 08:00:00 +0000</pubDate>
      <link>https://forem.com/iqaicom/autonomous-ai-agents-on-blockchain-with-adk-ts-near-2d1m</link>
      <guid>https://forem.com/iqaicom/autonomous-ai-agents-on-blockchain-with-adk-ts-near-2d1m</guid>
      <description>&lt;p&gt;Most blockchain applications today require constant human intervention. Smart contracts sit idle until someone triggers them. DeFi protocols need manual rebalancing. Oracle feeds depend on centralised operators pushing data.&lt;/p&gt;

&lt;p&gt;But what if your blockchain applications could think and act on their own?&lt;/p&gt;

&lt;p&gt;The ADK-TS × NEAR Shade Agent template makes this vision a reality. It combines the intelligence of modern AI with the autonomy that blockchain technology promises, creating agents that can monitor markets, analyse data, make decisions, and execute transactions without any human involvement.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Makes This Template Different
&lt;/h2&gt;

&lt;p&gt;Unlike typical blockchain integrations that bolt AI onto existing infrastructure, this template was designed from the ground up for true autonomy. The agents you build don't just respond to requests—they actively monitor conditions, reason about complex scenarios, and take action when needed.&lt;/p&gt;

&lt;p&gt;The template demonstrates this through a practical example: an AI agent that monitors Ethereum market sentiment by analyzing Reddit headlines, fetches real-time price data from CoinGecko, and autonomously signs transactions to update an on-chain oracle contract with no humans required.&lt;/p&gt;

&lt;h2&gt;
  
  
  How ADK-TS Works with NEAR Shade Agents
&lt;/h2&gt;

&lt;p&gt;The magic happens when we combine two technologies that were practically made for each other: &lt;strong&gt;ADK-TS&lt;/strong&gt; provides the intelligence, whilst &lt;strong&gt;NEAR Shade Agents&lt;/strong&gt; handle the blockchain execution.&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%2F1nmeejy2w2bjnyeijh8e.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%2F1nmeejy2w2bjnyeijh8e.png" alt="ADK-TS x NEAR Shade Agent AI Template Architecture" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  ADK-TS Framework: Building Intelligent AI Agents
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://adk.iqai.com/" rel="noopener noreferrer"&gt;ADK-TS&lt;/a&gt; (Agent Development Kit for TypeScript) brings genuine AI capabilities to blockchain development. Rather than simple chatbots or API wrappers, ADK-TS lets you build agents that can reason about complex scenarios, coordinate with other agents, and maintain memory across interactions.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;runner&lt;/span&gt; &lt;span class="p"&gt;}&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;AgentBuilder&lt;/span&gt;
&lt;span class="err"&gt;  &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&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-oracle-agent&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="err"&gt;  &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;withModel&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;gemini-2.5-flash&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="err"&gt;  &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;withDescription&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Autonomous crypto market analyst&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="err"&gt;  &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;withInstruction&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Monitor ETH price and sentiment, update oracle&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="err"&gt;  &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;asParallel&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="nx"&gt;priceAgent&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;sentimentAgent&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;span class="err"&gt;  &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;build&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What makes ADK-TS special is its multi-agent orchestration. Instead of building one massive AI system that tries to do everything, you create specialised agents that excel in specific areas. One agent might focus on market analysis, whilst another handles transaction logic—they work together seamlessly.&lt;/p&gt;

&lt;h3&gt;
  
  
  NEAR Shade Agent: Secure Blockchain Transaction Execution
&lt;/h3&gt;

&lt;p&gt;Here's where things get interesting. &lt;a href="https://www.near.org/blog/shade-agents-the-first-truly-autonomous-ai-agents" rel="noopener noreferrer"&gt;NEAR Shade Agents&lt;/a&gt; solve the biggest challenge in AI-blockchain integration: how can an AI system sign transactions without compromising security?&lt;/p&gt;

&lt;p&gt;The answer lies in Account Abstraction and Trusted Execution Environments (TEEs). Each agent gets its own NEAR account, complete with private keys stored securely in trusted hardware called Trusted Execution Environments (TEEs). Through NEAR's Chain Signatures technology, these agents can sign transactions not just on NEAR, but on any blockchain—Ethereum, Bitcoin, you name it.&lt;/p&gt;

&lt;p&gt;This means AI agents can finally operate independently across multiple blockchains, making decisions and executing transactions without any human intervention.&lt;/p&gt;

&lt;h3&gt;
  
  
  Trusted Execution Environment(TEE) Security for Production AI Agents
&lt;/h3&gt;

&lt;p&gt;The entire architecture is designed with production-grade security from the ground up. The Trusted Execution Environments provide hardware-level protection for agent private keys, meaning they're safe even from the hosting infrastructure itself. This goes beyond software security to hardware-guaranteed protection with cryptographic proof.&lt;/p&gt;

&lt;p&gt;The decentralised architecture means there are no single points of failure. Agents run across distributed TEE networks, making the entire system censorship-resistant and highly available. Everything is open source and auditable, allowing you to verify exactly how your agent operates while keeping its operations secure.&lt;/p&gt;

&lt;h2&gt;
  
  
  Building an Ethereum Price Oracle AI Agent
&lt;/h2&gt;

&lt;p&gt;The template includes a fully functional Oracle agent that demonstrates the complete autonomous pipeline:&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%2F973bd2qlrpw6os0b65b8.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%2F973bd2qlrpw6os0b65b8.png" alt="Agent Execution Flow: Oracle Update Process&amp;lt;br&amp;gt;
" width="800" height="720"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  1. Creating Multi-Agent Systems
&lt;/h3&gt;

&lt;p&gt;The system uses multiple specialised agents working in parallel:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Price Agent (src/agents/eth-price-agent/)&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;getEthPriceAgent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="err"&gt;  &lt;/span&gt;&lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;LlmAgent&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
&lt;span class="err"&gt;    &lt;/span&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;eth_price_agent&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="err"&gt;    &lt;/span&gt;&lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Provides the current Ethereum (ETH) price&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="err"&gt;    &lt;/span&gt;&lt;span class="na"&gt;instruction&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;When asked about ethereum, provide its price.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="err"&gt;    &lt;/span&gt;&lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;LLM_MODEL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="err"&gt;    &lt;/span&gt;&lt;span class="na"&gt;tools&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;ethPriceTool&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
&lt;span class="err"&gt;  &lt;/span&gt;&lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="c1"&gt;// Sentiment Agent (src/agents/eth-sentiment-agent/)&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;getEthSentimentAgent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="err"&gt;  &lt;/span&gt;&lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;LlmAgent&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
&lt;span class="err"&gt;    &lt;/span&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;eth_sentiment_agent&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="err"&gt;    &lt;/span&gt;&lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Provides Ethereum sentiment based on latest headlines&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="err"&gt;    &lt;/span&gt;&lt;span class="na"&gt;instruction&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="err"&gt;      &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Analyse headlines and respond with 'positive', 'negative', or 'neutral'&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="err"&gt;    &lt;/span&gt;&lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;LLM_MODEL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="err"&gt;    &lt;/span&gt;&lt;span class="na"&gt;tools&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;ethHeadlinesTool&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
&lt;span class="err"&gt;    &lt;/span&gt;&lt;span class="na"&gt;outputKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;sentiment&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="err"&gt;  &lt;/span&gt;&lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. AI Tools for Real-Time Data Collection and Analysis
&lt;/h3&gt;

&lt;p&gt;The agents use sophisticated tools to gather real-world data:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Price tool fetches from CoinGecko API&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;ethPriceTool&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;createTool&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
&lt;span class="err"&gt;  &lt;/span&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;get_eth_price&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="err"&gt;  &lt;/span&gt;&lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Fetches the current Ethereum (ETH) price in USD&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="err"&gt;  &lt;/span&gt;&lt;span class="na"&gt;fn&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;_&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;context&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="err"&gt;    &lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
&lt;span class="err"&gt;      &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://api.coingecko.com/api/v3/simple/price?ids=ethereum&amp;amp;vs_currencies=usd&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="err"&gt;    &lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="err"&gt;    &lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;data&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;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="err"&gt;    &lt;/span&gt;&lt;span class="nx"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;price&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ethereum&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;usd&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="err"&gt;    &lt;/span&gt;&lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s2"&gt;`Current Ethereum price: $&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ethereum&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;usd&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; USD`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="err"&gt;  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// Sentiment tool analyses Reddit headlines&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;ethHeadlinesTool&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;createTool&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
&lt;span class="err"&gt;  &lt;/span&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;get_eth_headlines&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="err"&gt;  &lt;/span&gt;&lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Get latest Ethereum-related news headlines from Reddit&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="err"&gt;  &lt;/span&gt;&lt;span class="na"&gt;fn&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;_&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;context&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="err"&gt;    &lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;parser&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Parser&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="err"&gt;    &lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;feed&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;parser&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;parseURL&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
&lt;span class="err"&gt;      &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://www.reddit.com/r/ethereum/.rss&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="err"&gt;    &lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="err"&gt;    &lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;headlines&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;feed&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;items&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;item&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;item&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;slice&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="err"&gt;    &lt;/span&gt;&lt;span class="nx"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;headlines&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;headlines&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\\\\&lt;/span&gt;&lt;span class="s2"&gt;n&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="err"&gt;    &lt;/span&gt;&lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;headlines&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="err"&gt;  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3. Autonomous Transaction Signing and Blockchain Execution
&lt;/h3&gt;

&lt;p&gt;The magic happens when the agent autonomously signs and broadcasts transactions:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Agent gathers data&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;sessionService&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;runner&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;session&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;getRootAgent&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;response&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;runner&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;ask&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Give ethereum's price and sentiment&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Extract intelligence from agent state&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;price&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;sentiment&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;currentSession&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// Prepare blockchain transaction&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;transaction&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;hashesToSign&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;getMarketDataPayload&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
&lt;span class="err"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;price&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="err"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;sentiment&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="err"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;contractId&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Agent autonomously signs transaction&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;signRes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;requestSignature&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
&lt;span class="err"&gt;  &lt;/span&gt;&lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ethereum-1&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="err"&gt;  &lt;/span&gt;&lt;span class="na"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;uint8ArrayToHex&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;hashesToSign&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]),&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// Broadcast to blockchain&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;txHash&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;Evm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;broadcastTx&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;signedTransaction&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  Blockchain AI Agents vs Traditional Web3 Applications
&lt;/h2&gt;

&lt;p&gt;Current Web3 applications have significant limitations that prevent mainstream adoption and truly decentralised operations.&lt;/p&gt;

&lt;h3&gt;
  
  
  Current Web3 Limitations
&lt;/h3&gt;

&lt;p&gt;Most blockchain applications today require constant babysitting. Smart contracts are reactive rather than proactive—they wait for external triggers instead of monitoring conditions and acting independently.&lt;/p&gt;

&lt;p&gt;DeFi protocols require manual rebalancing due to changing market conditions. Oracle feeds depend on centralised operators to push data updates. Users must understand complex wallet interfaces, gas fees, and transaction signing just to interact with basic features.&lt;/p&gt;

&lt;h3&gt;
  
  
  ADK-TS × NEAR Shade Agent Solution
&lt;/h3&gt;

&lt;p&gt;This template changes the game by enabling truly autonomous blockchain operations. AI agents can continuously monitor market conditions, analyze complex data from multiple sources, make intelligent decisions based on changing circumstances, and execute transactions across various blockchains without human involvement. The user experience transforms from technical complexity to natural language interactions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Building Your First Autonomous Agent
&lt;/h2&gt;

&lt;p&gt;Getting started is surprisingly straightforward. You can have a fully functional autonomous agent running in minutes, not hours.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Create new project with the NEAR Shade Agent template&lt;/span&gt;
npx @iqai/adk-cli new &lt;span class="nt"&gt;--template&lt;/span&gt; shade-agent my-shade-agent
&lt;span class="nb"&gt;cd &lt;/span&gt;my-autonomous-agent
pnpm &lt;span class="nb"&gt;install&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The template comes with everything configured, but you'll want to add your own credentials.&lt;/p&gt;

&lt;p&gt;Copy the example environment file and fill in your details:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cp&lt;/span&gt; .env.development.local.example .env.development.local
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You'll need your NEAR account details, a Google API key for the Gemini LLM, and a Phala Cloud API key. The template documentation explains where to get each of these.&lt;/p&gt;

&lt;p&gt;For production deployment, it's a single command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pnpm dlx @neardefi/shade-agent-cli
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This builds your project, creates a Docker image, deploys it to Phala Cloud's TEE network, and gives you a live URL to interact with your agent's endpoints. Your agent is now running autonomously in a secure, decentralised environment.&lt;/p&gt;

&lt;h2&gt;
  
  
  REST API Endpoints for AI Agent Management
&lt;/h2&gt;

&lt;p&gt;Once your agent is running, you can interact with it through clean REST APIs. The template provides three key endpoints that give you complete visibility into your agent's operations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GET &lt;code&gt;/api/agent-account&lt;/code&gt;: The agent account endpoint shows you the NEAR account that your agent is using, along with its current balance. This is useful for monitoring whether your agent has sufficient funds for its operations.&lt;/li&gt;
&lt;li&gt;GET &lt;code&gt;/api/eth-account&lt;/code&gt;: The Ethereum account endpoint displays the derived Ethereum address that your agent uses for cross-chain transactions, plus its balance. This demonstrates the power of NEAR's chain signatures—your agent can operate on multiple blockchains using a single NEAR account.&lt;/li&gt;
&lt;li&gt;POST &lt;code&gt;/api/transaction&lt;/code&gt;: The transaction endpoint is where the magic happens. When you call this endpoint, your agent springs into action: it gathers market data, analyses sentiment, and autonomously signs and broadcasts a transaction to update the oracle contract.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can test these endpoints directly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &amp;lt;https://your-agent.phala.network/api/transaction&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This isn't just a demonstration—it's a fully functional autonomous system that could handle real-world oracle operations.&lt;/p&gt;

&lt;h2&gt;
  
  
  AI Agent Use Cases Beyond Price Oracles
&lt;/h2&gt;

&lt;p&gt;This template is just the beginning. The ADK-TS × NEAR Shade Agent architecture enables:&lt;/p&gt;

&lt;h3&gt;
  
  
  DeFi AI Applications
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Automated yield farming&lt;/strong&gt; with AI risk assessment&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dynamic liquidity provision&lt;/strong&gt; based on market conditions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Intelligent trading bots&lt;/strong&gt; with cross-chain capabilities&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Gaming &amp;amp; NFT AI Integrations
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Autonomous NPCs&lt;/strong&gt; with persistent blockchain identities&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dynamic NFT metadata&lt;/strong&gt; updated by AI analysis&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cross-chain gaming assets&lt;/strong&gt; managed by agents&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Blockchain Infrastructure Automation
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Decentralised monitoring&lt;/strong&gt; and alerting systems&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Autonomous governance&lt;/strong&gt; participation and voting&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cross-chain bridge&lt;/strong&gt; management and optimisation&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Enterprise Blockchain AI Solutions
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Supply chain automation&lt;/strong&gt; with AI verification&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Regulatory compliance&lt;/strong&gt; monitoring and reporting&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Business process automation&lt;/strong&gt; on blockchain&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Future of Autonomous Blockchain AI Agents
&lt;/h2&gt;

&lt;p&gt;The ADK-TS × NEAR Shade Agent template represents the first step towards a truly autonomous Web3 ecosystem. As AI continues to advance and blockchain infrastructure matures, we envision:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Autonomous DAOs&lt;/strong&gt; governed entirely by AI agents&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Self-optimising protocols&lt;/strong&gt; that adapt to market conditions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cross-chain AI networks&lt;/strong&gt; collaborating on global problems&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Natural language Web3&lt;/strong&gt; interfaces for mainstream adoption&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Start Building AI Blockchain Agents Today
&lt;/h2&gt;

&lt;p&gt;The autonomous Web3 future is here, and it's easier to build than ever before.&lt;/p&gt;

&lt;p&gt;To try the template, run the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx @iqai/adk-cli new &lt;span class="nt"&gt;--template&lt;/span&gt; shade-agent my-shade-agent
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://adk.iqai.com/" rel="noopener noreferrer"&gt;ADK-TS Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.near.org/ai/shade-agents/introduction" rel="noopener noreferrer"&gt;NEAR Shade Agents Guide&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/IQAIcom/adk-ts/tree/main/apps/starter-templates/shade-agent" rel="noopener noreferrer"&gt;Template Repository&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>web3</category>
      <category>blockchain</category>
      <category>adk</category>
    </item>
    <item>
      <title>ADK-TS x402: AI Agents with On-Chain Crypto Payments</title>
      <dc:creator>Timonwa Akintokun</dc:creator>
      <pubDate>Mon, 06 Oct 2025 08:00:00 +0000</pubDate>
      <link>https://forem.com/iqaicom/adk-ts-x402-ai-agents-with-on-chain-crypto-payments-n5h</link>
      <guid>https://forem.com/iqaicom/adk-ts-x402-ai-agents-with-on-chain-crypto-payments-n5h</guid>
      <description>&lt;p&gt;AI agents are becoming smarter, faster, and more useful — but one thing they still struggle with is payments. How does an agent pay for an API call? How does a developer charge for agent services without setting up clunky billing systems?&lt;/p&gt;

&lt;p&gt;This is the gap the &lt;a href="https://www.coinbase.com/developer-platform/products/x402" rel="noopener noreferrer"&gt;x402 payments protocol (from Coinbase)&lt;/a&gt; is designed to solve. And with our &lt;a href="https://adk.iqai.com/" rel="noopener noreferrer"&gt;ADK-TS (Agent Development Kit for TypeScript)&lt;/a&gt; starter template, we show how developers can build AI agents with native crypto payments — turning pay-per-use into reality.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is the x402 payments protocol?
&lt;/h2&gt;

&lt;p&gt;The x402 protocol is an open standard from Coinbase that makes &lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/402" rel="noopener noreferrer"&gt;HTTP 402 Payment Required&lt;/a&gt; usable for the modern web.&lt;/p&gt;

&lt;p&gt;The flow is elegantly simple: when you request a paid resource, the server replies with a 402 Payment Required response that tells you exactly how much to pay, what token to use (e.g., USDC), and where to send it. Your client then makes the payment on-chain and retries the request with proof of payment in the X-PAYMENT header. Finally, the server verifies the payment and unlocks the content or API.&lt;/p&gt;

&lt;p&gt;This creates a universal pay-to-access system for the internet, powered by crypto micropayments. Unlike credit cards, it works for fractions of a cent, settles instantly, and is globally accessible.&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%2F7kadz6eshysp58k56zmj.jpg" 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%2F7kadz6eshysp58k56zmj.jpg" alt="How x402 micropayments work for digital content"&gt;&lt;/a&gt;&lt;/p&gt;
How x402 micropayments work for digital content: Request Paid Resource → 402 Payment Required → Make Payment → Request Payment Resource Again → Instant unlock.



&lt;h2&gt;
  
  
  What is ADK-TS? (Agent Development Kit for TypeScript)
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/IQAICOM/adk-ts" rel="noopener noreferrer"&gt;ADK-TS&lt;/a&gt; is a TypeScript framework for building AI agents, designed to give developers a robust, type-safe foundation for everything from simple chatbots to complex multi-agent systems.&lt;/p&gt;

&lt;p&gt;The framework provides built-in support for multiple AI models (OpenAI, Claude, Gemini, etc.), along with essential tools for memory, streaming, and session management.&lt;/p&gt;

&lt;p&gt;What sets it apart is its seamless integration capabilities with external services and APIs. With ADK-TS, you don't just write agents — you build enterprise-grade AI systems without boilerplate.&lt;/p&gt;

&lt;center&gt;
&lt;a href="https://github.com/IQAICOM/adk-ts" class="crayons-btn crayons-btn--primary" rel="noopener noreferrer"&gt;⭐️ Star on GitHub&lt;/a&gt;
&lt;/center&gt;

&lt;h2&gt;
  
  
  Who is IQ AI?
&lt;/h2&gt;

&lt;p&gt;At IQ AI, we're building the &lt;a href="https://iqai.com/" rel="noopener noreferrer"&gt;Agent Tokenization Platform&lt;/a&gt; — a marketplace where AI agents can be tokenized, traded, and monetized. Developers can publish agents, expose premium features, and even enable agents to transact with one another.&lt;/p&gt;

&lt;p&gt;To make this work, agents need the ability to charge and pay seamlessly. That's why we've integrated x402 protocol payments into ADK-TS, creating the foundation for autonomous, monetized AI agents.&lt;/p&gt;

&lt;h2&gt;
  
  
  How ADK-TS and x402 work together
&lt;/h2&gt;

&lt;p&gt;When you combine ADK-TS agents with the &lt;a href="https://www.x402.org/" rel="noopener noreferrer"&gt;x402 protocol&lt;/a&gt;, you unlock a new capability: agents that can charge and pay on-chain automatically. Our starter template demonstrates this through three key components working in harmony:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The server&lt;/strong&gt; acts as an x402 paywall proxy, defining free and paid API routes whilst enforcing pricing and verifying payments.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The agent&lt;/strong&gt;, built with ADK-TS, intelligently uses free tools for basic operations and paid tools for premium features.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The client&lt;/strong&gt; employs axios middleware with wallet integration to handle x402 payment challenges, make on-chain payments in USDC on Base testnet, and retry requests with proof.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The user experience feels seamless:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The agent greets you and provides free information, such as current API prices.&lt;/li&gt;
&lt;li&gt;When you request a paid action, it clearly states the price and asks for approval.&lt;/li&gt;
&lt;li&gt;Once approved, the payment processes automatically, and the result is returned.&lt;/li&gt;
&lt;li&gt;No API keys. No subscriptions. Just pay-per-call with crypto.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Understanding the Setup
&lt;/h2&gt;

&lt;p&gt;One of the most elegant aspects of this template is that pricing and payment logic live on the server, not buried inside your agent code. This architectural decision brings significant advantages:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You can change your pricing without redeploying agents&lt;/li&gt;
&lt;li&gt;The agent stays clean and focused only on using tools rather than enforcing payments&lt;/li&gt;
&lt;li&gt;Users get a transparent experience where the agent can tell them upfront how much an action costs before they approve it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This separation of concerns makes scaling effortless. If the upstream API changes or you decide to tweak the costs of certain actions, your agent doesn't break — the proxy server handles it gracefully.&lt;/p&gt;

&lt;h2&gt;
  
  
  Deep dive: Agent Template Architecture
&lt;/h2&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%2Fwvvb825yel5kmwfbsh81.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%2Fwvvb825yel5kmwfbsh81.png" alt="Agent Template Architecture"&gt;&lt;/a&gt;&lt;/p&gt;
Codebase architecture of the ADK-TS x402 template: a server layer enforces x402 pricing and payments, while the agent layer uses free and paid tools to interact with users.



&lt;p&gt;The IQ-x402 agent template is structured into two complementary parts that work together seamlessly:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The server&lt;/strong&gt; component acts as an x402-paywalled proxy, forwarding requests to the IQ AI API whilst enforcing pricing and exposing a free /api/get-prices route so the agent can always display costs before asking for payment.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The agent&lt;/strong&gt; component is a TypeScript agent built with ADK-TS tools, featuring both free and paid functionality. The GET_PRICES tool remains always available, providing transparency about costs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The paid tools&lt;/strong&gt; — GET_AGENT_INFO, GET_AGENT_STATS, GET_HOLDINGS, and GET_TOP_AGENTS — require on-chain payment before returning results, creating a natural division between free exploration and premium insights.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Looking at the implementation, you'll find the core logic distributed across three key files:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;server/src/index.ts&lt;/code&gt; defines the pricing map (PAID_ROUTES) and payment middleware, creating the economic backbone of the system.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;agent/src/agents/IQ-x402/tools.ts&lt;/code&gt; implements both the free and paid tools using the x402-enabled axios client.&lt;/li&gt;
&lt;li&gt;Finally, &lt;code&gt;agent/src/agents/IQ-x402/agent.ts&lt;/code&gt; contains the main agent logic that greets users, fetches prices proactively, and crucially asks for explicit consent before making any paid calls.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Testing the Template
&lt;/h2&gt;

&lt;p&gt;Once everything is set up, running the template gives you a web UI powered by &lt;a href="https://adk-web.iqai.com/" rel="noopener noreferrer"&gt;adk-web&lt;/a&gt;, where you can interact with the agent directly in your browser. The experience showcases the power of the x402 integration beautifully.&lt;/p&gt;

&lt;p&gt;Free actions like fetching prices work instantly, giving users immediate value and transparency. When you request paid actions such as fetching token statistics, the x402 payment flow springs into action:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The agent requests the resource, and the server returns a 402 Payment Required response.&lt;/li&gt;
&lt;li&gt;Your wallet prompts you to approve a small payment in Base Sepolia testnet USDC.&lt;/li&gt;
&lt;li&gt;Once approved, the agent automatically retries the call and delivers the data.&lt;/li&gt;
&lt;/ul&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%2Fl26gqknie81ih3zn3li9.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%2Fl26gqknie81ih3zn3li9.png" alt="Demo of the ADK-TS x402 agent template"&gt;&lt;/a&gt;&lt;/p&gt;
Demo of the ADK-TS x402 agent template: the agent greets the user, displays free price info, and requests payment approval before executing paid actions.



&lt;blockquote&gt;
&lt;p&gt;💡 &lt;strong&gt;Tip&lt;/strong&gt;: Grab some testnet USDC and ETH from the &lt;a href="https://docs.base.org/base-chain/tools/network-faucets" rel="noopener noreferrer"&gt;Base Sepolia faucets&lt;/a&gt; before testing, so you can experience the flow without spending real funds.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  The Magic of the Combination - ADK-TS + x402
&lt;/h2&gt;

&lt;p&gt;The real magic here lies in how ADK-TS and x402 complement each other perfectly. &lt;strong&gt;ADK-TS&lt;/strong&gt; handles the intelligence side — memory, workflows, streaming, and multi-agent orchestration. Meanwhile, &lt;strong&gt;x402&lt;/strong&gt; handles the economics side — letting your agent earn, spend, and unlock access with on-chain micropayments.&lt;/p&gt;

&lt;p&gt;Together, you can envision agents that sell access to their own tools or knowledge, pay each other for services in true machine-to-machine economies, and monetise data, statistics, or insights on demand without relying on subscriptions or advertisements.&lt;/p&gt;

&lt;p&gt;This template serves as a starting point, but it demonstrates how powerful the model becomes: agents that are both intelligent and economically independent.&lt;/p&gt;

&lt;h2&gt;
  
  
  How users pay with x402 (wallet flow explained)
&lt;/h2&gt;

&lt;p&gt;The payment experience extends beyond just servers receiving funds — users need an intuitive way to make payments with their wallet.&lt;/p&gt;

&lt;p&gt;The flow works seamlessly in practice: when a user requests a paid action, the server replies with 402 Payment Required. The wallet integration kicks in, whether it's a browser wallet like MetaMask or Coinbase Wallet, an in-app wallet, or a facilitator service.&lt;/p&gt;

&lt;p&gt;For human users, a wallet popup appears asking for approval ("Pay $0.05 USDC?"). For automated agents, the middleware can auto-pay microtransactions or forward the consent request appropriately.&lt;/p&gt;

&lt;p&gt;Once payment is sent, the retry request includes an X-PAYMENT header with cryptographic proof. The server then verifies the payment and responds by unlocking the requested content, API data, or agent functionality.&lt;/p&gt;

&lt;p&gt;This makes crypto micropayments feel as seamless as paying for coffee — but for digital services.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this matters for developers and the AI community
&lt;/h2&gt;

&lt;p&gt;This starter template represents more than just a proof of concept — it's a glimpse into transformative possibilities.&lt;/p&gt;

&lt;p&gt;Consider the shift from traditional subscription models to &lt;strong&gt;pay-per-API calls&lt;/strong&gt;, where APIs can charge mere cents per request.&lt;/p&gt;

&lt;p&gt;Imagine &lt;strong&gt;agent marketplaces&lt;/strong&gt; where AI agents pay each other for data, models, or services.&lt;/p&gt;

&lt;p&gt;Picture &lt;strong&gt;decentralised agent economies&lt;/strong&gt; where agents earn, spend, and transact on-chain autonomously.&lt;/p&gt;

&lt;p&gt;By combining ADK-TS and x402, we're enabling a future where AI agents are not just intelligent, but also economically autonomous.&lt;/p&gt;

&lt;h2&gt;
  
  
  Get started with the ADK-TS x402 template
&lt;/h2&gt;

&lt;p&gt;The template runs on Base Sepolia testnet, allowing you to experiment risk-free using test USDC and ETH from faucets.&lt;/p&gt;

&lt;p&gt;You'll receive a complete setup: an x402-enabled server with free and paid routes, an ADK-TS agent wired with both free and paid tools, and a wallet-enabled axios client that handles payments automatically.&lt;/p&gt;

&lt;p&gt;Clone it, run pnpm run dev, and start experimenting with monetized AI agents today.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final thoughts: AI + crypto payments = the future
&lt;/h2&gt;

&lt;p&gt;The internet has waited decades for a standard way to implement pay-to-access functionality. With Coinbase's x402 payments protocol, that standard is finally here. With ADK-TS, we can seamlessly bring it into AI agents. And with IQ AI, we're building the ecosystem where these monetised agents can thrive.&lt;/p&gt;

&lt;p&gt;This is just the beginning — the future of autonomous, pay-per-use AI is in your hands.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/IQAIcom/iqai-x402-agent" rel="noopener noreferrer"&gt;IQ AI x402 Agent Template&lt;/a&gt; - Our starter project combining ADK-TS with the x402 protocol&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://iqai.com/" rel="noopener noreferrer"&gt;IQ AI Agent Tokenization Platform&lt;/a&gt; - Platform for creating, tokenising, and trading AI agents&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/IQAIcom/adk-ts" rel="noopener noreferrer"&gt;ADK-TS GitHub Repository&lt;/a&gt; - The Agent Development Kit (ADK-TS) for TypeScript for building AI agents&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://adk.iqai.com/" rel="noopener noreferrer"&gt;ADK-TS Documentation&lt;/a&gt; - Comprehensive guides, API references, and examples&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://x402.org/" rel="noopener noreferrer"&gt;x402 Official Website&lt;/a&gt; - The official site for the x402 protocol, including examples and updates&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/coinbase/x402" rel="noopener noreferrer"&gt;x402 GitHub Repository (Coinbase)&lt;/a&gt; - The open-source implementation maintained by Coinbase&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>web3</category>
      <category>cryptocurrency</category>
      <category>typescript</category>
    </item>
    <item>
      <title>The ADK-TS Hackathon 2025 Is Live!</title>
      <dc:creator>Timonwa Akintokun</dc:creator>
      <pubDate>Sat, 27 Sep 2025 08:00:00 +0000</pubDate>
      <link>https://forem.com/iqaicom/the-adk-ts-hackathon-2025-is-live-24kp</link>
      <guid>https://forem.com/iqaicom/the-adk-ts-hackathon-2025-is-live-24kp</guid>
      <description>&lt;p&gt;Hey builders 👋&lt;/p&gt;

&lt;p&gt;We’ve just launched the &lt;a href="https://dorahacks.io/hackathon/adk-ts-hackathon-2025/detail" rel="noopener noreferrer"&gt;ADK-TS Hackathon 2025&lt;/a&gt; on DoraHacks, and we couldn’t be more excited to see what you’ll create. For the next 4 weeks, developers from all over the world will be experimenting with &lt;a href="https://adk.iqai.com/" rel="noopener noreferrer"&gt;ADK-TS&lt;/a&gt; (our TypeScript Agent Development Kit), pushing the limits of AI agents, and showing off what’s possible when great ideas meet the right tools. Full details, rules, and submissions can all be found on the &lt;a href="https://dorahacks.io/hackathon/adk-ts-hackathon-2025/detail" rel="noopener noreferrer"&gt;DoraHacks event page&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Whether you’re hacking solo or teaming up with friends, this is your chance to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Build something real with ADK-TS&lt;/li&gt;
&lt;li&gt;Compete for a share of &lt;strong&gt;$4,000 in stablecoin prizes&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Contribute to the growing ecosystem around AI agents&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Tracks &amp;amp; Prizes
&lt;/h2&gt;

&lt;p&gt;We’ve set up 3 main tracks and 5 bonus awards, so there’s room for different kinds of projects:&lt;/p&gt;

&lt;h3&gt;
  
  
  Main Tracks – $1,000 each
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;MCP Expansion&lt;/strong&gt; – Build new Model Context Protocol (MCP) servers that expand what agents can connect to and do.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ADK-TS Agents&lt;/strong&gt; – Create full-featured AI agents powered by ADK-TS.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Web3 Use Case&lt;/strong&gt; – Explore blockchain + agent integrations that bring AI into Web3.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Bonus Awards – $200 each
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Most Practical Real-World Use Case&lt;/strong&gt; – The most “ready to use today” solution with obvious real-world value.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Best Bot Integration&lt;/strong&gt; – Smart, useful, or fun agents running on Discord, Telegram, Slack, or other chat platforms.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Best Collaboration/Team Agent or MCP&lt;/strong&gt; – Agents (or MCPs) that work together or boost teamwork/productivity.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Best Technical Implementation&lt;/strong&gt; – Projects that push technical limits with clean, efficient, or innovative builds.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Best Contribution to ADK-TS&lt;/strong&gt; – Meaningful extensions, templates, or utilities that make ADK-TS stronger for future devs.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;👉 For track requirements, prize distribution, and eligibility, check the &lt;a href="https://dorahacks.io/hackathon/adk-ts-hackathon-2025/detail#tracks-challenges" rel="noopener noreferrer"&gt;DoraHacks hackathon page&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Dates
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Kickoff + Registration:&lt;/strong&gt; Sept 25, 2025&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Submission Deadline:&lt;/strong&gt; Oct 23, 2025&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Winners Announced:&lt;/strong&gt; Oct 30, 2025&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That gives you 4 weeks to build and 1 week for us to review everything and crown the winners.&lt;/p&gt;

&lt;h2&gt;
  
  
  What to Submit
&lt;/h2&gt;

&lt;p&gt;To qualify, your project needs to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Be built with &lt;strong&gt;ADK-TS&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Live in a &lt;strong&gt;public GitHub repo&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Include a &lt;strong&gt;demo video (max 5 minutes)&lt;/strong&gt; showing how it works&lt;/li&gt;
&lt;li&gt;Show how &lt;strong&gt;ADK-TS was used&lt;/strong&gt; in the build&lt;/li&gt;
&lt;li&gt;Include a &lt;strong&gt;live demo URL&lt;/strong&gt; (if possible)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Extra resources and examples can be found in the &lt;a href="https://dorahacks.io/hackathon/adk-ts-hackathon-2025/detail#submission-requirements" rel="noopener noreferrer"&gt;DoraHacks submission guide&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Resources &amp;amp; Community
&lt;/h2&gt;

&lt;p&gt;We’ve got you covered with all the essentials:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://dorahacks.io/hackathon/adk-ts-hackathon-2025/detail" rel="noopener noreferrer"&gt;DoraHacks link&lt;/a&gt; - Register Here&lt;/li&gt;
&lt;li&gt;&lt;a href="https://adk.iqai.com/" rel="noopener noreferrer"&gt;ADK-TS Docs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/IQAIcom/adk-ts" rel="noopener noreferrer"&gt;GitHub Repo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://discord.gg/w2Uk6ACK4D" rel="noopener noreferrer"&gt;Discord Community&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/@iqtoken" rel="noopener noreferrer"&gt;YouTube Channel&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is all about exploring what’s possible with AI agents. Surprise us, challenge the framework, and most importantly, &lt;strong&gt;have fun building&lt;/strong&gt;. We’ll be watching closely and cheering you on along the way.&lt;/p&gt;

&lt;p&gt;See you in the hackathon channel 👀&lt;/p&gt;

</description>
      <category>ai</category>
      <category>web3</category>
      <category>hackathon</category>
      <category>mcp</category>
    </item>
    <item>
      <title>What is the Agent Tokenization Platform (ATP): A Guide for Non-Developers</title>
      <dc:creator>Timonwa Akintokun</dc:creator>
      <pubDate>Tue, 02 Sep 2025 11:22:54 +0000</pubDate>
      <link>https://forem.com/iqaicom/what-is-the-agent-tokenization-platform-atp-a-guide-for-non-developers-16pe</link>
      <guid>https://forem.com/iqaicom/what-is-the-agent-tokenization-platform-atp-a-guide-for-non-developers-16pe</guid>
      <description>&lt;p&gt;You've probably noticed AI is everywhere these days. From ChatGPT helping you write emails to AI agents managing crypto portfolios, artificial intelligence is handling tasks that used to eat up hours of our time.&lt;/p&gt;

&lt;p&gt;But here's the thing: most of us use these AI tools, but we don't really own them or have any say in how they work. If OpenAI decides to make significant changes to ChatGPT tomorrow or shut it down, we have no choice but to deal with it.&lt;/p&gt;

&lt;p&gt;That's where &lt;a href="https://iqai.com/" rel="noopener noreferrer"&gt;IQ AI's Agent Tokenization Platform (ATP)&lt;/a&gt; comes in. For the first time, regular people can actually own pieces of AI agents and vote on how they should work—no coding required.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is an AI Agent?
&lt;/h2&gt;

&lt;p&gt;But before we dive into ATP, let's make sure we're on the same page about AI agents.&lt;/p&gt;

&lt;p&gt;An &lt;a href="https://cloud.google.com/discover/what-are-ai-agents" rel="noopener noreferrer"&gt;AI agent&lt;/a&gt; is a smart software program that can work independently or autonomously. An example is Siri or Alexa – they listen to you, understand what you want, and take action without you having to walk them through every step.&lt;/p&gt;

&lt;p&gt;But AI agents can be more than just voice assistants. There are AI agents that can even:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Analyze cryptocurrency markets and suggest trades&lt;/li&gt;
&lt;li&gt;Manage social media accounts and create content&lt;/li&gt;
&lt;li&gt;Answer customer support questions 24/7&lt;/li&gt;
&lt;li&gt;Research topics and summarize information&lt;/li&gt;
&lt;li&gt;Help with investment decisions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The key thing here is that they work autonomously. You set them up, give them guidelines, and they handle tasks without constant supervision.&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%2Ff6p014x408vm7rdvzxjd.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%2Ff6p014x408vm7rdvzxjd.png" alt="How AI agents work: Receives the data, Decides the logic, Performs actions" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What Is the Agent Tokenization Platform (ATP)?
&lt;/h2&gt;

&lt;p&gt;Here's where things get interesting. &lt;a href="https://blog.iqai.com/introducing-the-agent-development-kit-adk-for-typescript/" rel="noopener noreferrer"&gt;ATP flips the traditional AI ownership model&lt;/a&gt; on its head.&lt;/p&gt;

&lt;p&gt;Normally, AI agents are owned by companies. You pay to use them, but you have zero control over how they work or what happens to them. It's like renting an apartment – you can live there, but you can't renovate or make major decisions about the property.&lt;/p&gt;

&lt;p&gt;But the Agent Tokenization Platform changes this by letting communities own AI agents together through tokens. Imagine this: instead of one company owning an AI agent, it's owned by everyone who holds that agent's tokens. Your tokens are basically shares in that AI agent.&lt;/p&gt;

&lt;p&gt;Let's say there's an AI agent called "MarketMaster" that analyzes stock trends. Instead of being owned by some Wall Street firm, MarketMaster is owned by its token holders. If you own 1% of MarketMaster tokens, you own 1% of that AI agent and get 1% of the voting power on decisions about its future.&lt;/p&gt;

&lt;h2&gt;
  
  
  But How Does ATP Work?
&lt;/h2&gt;

&lt;p&gt;It is pretty straightforward. ATP creates tokens for AI agents on the blockchain. You buy these tokens using &lt;a href="https://blog.iqai.com/the-iq-token-s-braindao-treasury-now-has-over-2-million-in-ethereum/" rel="noopener noreferrer"&gt;IQ tokens&lt;/a&gt; (think of IQ as the currency of the platform). Once you own an AI agent's tokens, you're not just an investor – you're also a part-owner with real rights to it.&lt;/p&gt;

&lt;p&gt;Here's a concrete example: Let's say "CryptoSage" is an AI agent that provides cryptocurrency analysis. The community creates 100,000 CryptoSage tokens. You buy 10,000 tokens, giving you 10% ownership.&lt;/p&gt;

&lt;p&gt;Now you can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Vote on what cryptocurrencies CryptoSage should analyze&lt;/li&gt;
&lt;li&gt;Decide what new features to add&lt;/li&gt;
&lt;li&gt;Choose how profits get distributed&lt;/li&gt;
&lt;li&gt;Influence the agent's personality and communication style&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It's like being a shareholder in a company, but the "company" is an AI agent that actually does useful work.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Does ATP Matter?
&lt;/h2&gt;

&lt;p&gt;This might sound like just another crypto project, but the Agent Tokenization Platform addresses a real problem that's been growing with AI.&lt;/p&gt;

&lt;p&gt;Right now, a handful of tech giants control most AI development. They decide what gets built, how it works, and who benefits. The rest of us are just users paying monthly subscriptions with no real say in anything.&lt;/p&gt;

&lt;p&gt;ATP democratizes this. Instead of AI being controlled by Silicon Valley boardrooms, it can be owned and directed by the communities that use these tools.&lt;/p&gt;

&lt;p&gt;Imagine if teachers collectively owned an AI tutoring agent and could vote on how it should teach different subjects. Or if small business owners owned an AI accountant designed specifically for their needs, rather than a generic corporate solution.&lt;/p&gt;

&lt;p&gt;That's the future ATP is building – AI that serves communities because communities own it.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Can Non-Developers Get Involved in ATP?
&lt;/h2&gt;

&lt;p&gt;The beauty of ATP is that you don't need to understand machine learning or write code to participate. Here are the main ways to get involved:&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%2Fs786gk4qm48f8lbqqxlv.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%2Fs786gk4qm48f8lbqqxlv.png" alt="Different ways non-developers can participate in the Agent Tokenization Platform" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Buy AI Agent Tokens
&lt;/h3&gt;

&lt;p&gt;Buying AI agent tokens is the easiest entry point. You can browse the ATP marketplace and find agents that solve problems you care about. Maybe there's a fitness AI that creates personalized workout plans, or a travel AI that finds amazing deals.&lt;/p&gt;

&lt;p&gt;When you buy tokens, you're betting that the agent will become popular and valuable. If it does, your tokens typically increase in value. Plus, you get governance rights and potential profit-sharing.&lt;/p&gt;

&lt;p&gt;But remember, as with every other form of investment, start small with maybe $50-100 spread across a few different agents to learn how everything works.&lt;/p&gt;

&lt;h3&gt;
  
  
  Participate in Governance
&lt;/h3&gt;

&lt;p&gt;Once you own tokens, you can vote on proposals that shape the agent's future. These aren't meaningless surveys – these are binding decisions that directly impact how the AI works.&lt;/p&gt;

&lt;p&gt;Recent votes might include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Should our investment AI focus more on crypto or traditional stocks?&lt;/li&gt;
&lt;li&gt;What personality should our customer service AI have?&lt;/li&gt;
&lt;li&gt;How should we split revenue between token holders and development?&lt;/li&gt;
&lt;li&gt;Which new features should we build next?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Your vote weight depends on how many tokens you own, just like shareholder voting in companies.&lt;/p&gt;

&lt;h3&gt;
  
  
  Join Agent Communities
&lt;/h3&gt;

&lt;p&gt;Token ownership connects you with communities of people who share your vision for that AI agent. These groups discuss improvements, share insights, and work together to make their agents more successful.&lt;/p&gt;

&lt;p&gt;It's like joining a startup as an early employee, except the "startup" is an AI agent and you're helping guide its development through community participation rather than coding.&lt;/p&gt;

&lt;h3&gt;
  
  
  Earn Passive Income
&lt;/h3&gt;

&lt;p&gt;Many AI agents generate revenue from their services. If you own tokens in a successful agent, you might receive regular payments from its earnings.&lt;/p&gt;

&lt;p&gt;For example, if an AI agent charges $20/month for premium analysis and has 1,000 subscribers, that's $20,000 monthly revenue. If you own 1% of tokens, you might receive $200/month in passive income.&lt;/p&gt;

&lt;p&gt;But be aware that not every agent will be profitable, but successful ones can provide ongoing returns beyond just token appreciation.&lt;/p&gt;

&lt;h3&gt;
  
  
  Raise Funding to Build Your Own AI Agent
&lt;/h3&gt;

&lt;p&gt;If you have an idea for an AI agent but lack the technical skills to build it yourself, ATP makes it easy to bring your vision to life.&lt;/p&gt;

&lt;p&gt;You can create a token for the agent and launch it on the ATP platform to raise funding for it. Then, people who believe in your idea can buy the tokens to support its development.&lt;/p&gt;

&lt;p&gt;Once you have enough funding, you can hire developers to build the actual AI agent for you, which is awesome. This means that you can focus on the creative and community aspects while leaving the technical implementation to the experts.&lt;/p&gt;

&lt;p&gt;BrainDAO also has a &lt;a href="https://blog.iqai.com/iqip-20-building-eoai-enshrined-on-chain-ai-with-iq-and-implementing-token-burning/" rel="noopener noreferrer"&gt;$10 million fund for promising AI projects&lt;/a&gt;. If your agent concept gains strong community support, you can apply for additional funding to accelerate development.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Future of Community-Owned AI
&lt;/h2&gt;

&lt;p&gt;We're still early in this shift, but the potential is massive. Instead of AI being controlled by a few mega-corporations, we could have thousands of specialized AI agents owned by the communities they serve.&lt;/p&gt;

&lt;p&gt;Think about the possibilities:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Musicians owning AI tools designed for creativity, not corporate content farms&lt;/li&gt;
&lt;li&gt;Doctors owning medical AI trained on real patient needs, not pharmaceutical marketing&lt;/li&gt;
&lt;li&gt;Farmers owning agricultural AI that understands local conditions, not generic corporate solutions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This isn't just about making money (though that's nice). It's about ensuring AI develops in ways that actually serve human communities rather than just maximizing corporate profits.&lt;/p&gt;

&lt;p&gt;Of course, not every experiment will work. Some AI agents will fail, and their tokens will become worthless. But that's true of any emerging technology – the key is participating thoughtfully and learning as the space evolves.&lt;/p&gt;

&lt;h2&gt;
  
  
  Ready to Explore Community-Owned AI?
&lt;/h2&gt;

&lt;p&gt;If this sounds interesting, here's how to start:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Explore the Marketplace&lt;/strong&gt;: Check out&lt;a href="https://app.iqai.com/" rel="noopener noreferrer"&gt; existing AI agents&lt;/a&gt; on the ATP platform. Get a feel for what's available and what problems they solve.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Start Small&lt;/strong&gt;: Make your first investment modest while you learn how everything works. Think of it as tuition for understanding this new model.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Join Communities&lt;/strong&gt;:&lt;a href="https://t.me/IQAICOM" rel="noopener noreferrer"&gt; Connect&lt;/a&gt; with other token holders for the agents you support. The community aspect is often as valuable as the financial opportunity.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Stay Engaged&lt;/strong&gt;: Don't just buy tokens and forget about them. Participate in discussions, vote on proposals, and help shape your agents' development.&lt;/p&gt;

&lt;p&gt;The democratization of AI ownership is happening right now. Whether you want to support existing agents or eventually launch your own vision, the Agent Tokenization Platform provides the infrastructure to participate meaningfully in the AI economy.&lt;/p&gt;

&lt;p&gt;What problems in your life could be solved by an AI agent owned by people who actually understand those problems? That's the question driving this entire movement.&lt;/p&gt;

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

&lt;p&gt;Want to dive deeper? Here are the key places to learn more:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://iqai.com/" rel="noopener noreferrer"&gt;Agent Tokenization Platform&lt;/a&gt; - Official website of ATP&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://app.iqai.com/" rel="noopener noreferrer"&gt;ATP Marketplace&lt;/a&gt; - Browse and invest in AI agents&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://t.me/IQAICOM" rel="noopener noreferrer"&gt;ATP Community&lt;/a&gt; - Join discussions with other community members&lt;/li&gt;
&lt;li&gt;Explore some of our AI agent examples on &lt;a href="https://github.com/IQAIcom/adk-ts/tree/main/apps/examples" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Interested in building AI agents? Check out our &lt;a href="https://adk.iqai.com/" rel="noopener noreferrer"&gt;Agent Development Kit (ADK) for TypeScript&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The future of AI doesn't have to be controlled by Big Tech. It can be built by all of us, together.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>web3</category>
      <category>agenticai</category>
      <category>aiagents</category>
    </item>
  </channel>
</rss>
