ADK for TypeScript

Wiki Powered byIconIQ
ADK for TypeScript

我们刚刚发布了 IQ AI.

查看详情

ADK for TypeScript

Agent Development Kit (ADK) for TypeScript is an open-source framework created by for the development, orchestration, and deployment of intelligent . It provides a TypeScript-first toolkit for building a range of AI systems, from simple question-and-answer bots to complex multi-agent architectures capable of performing real-world tasks, with a focus on type safety and modularity [1] [3].

Overview

The Agent Development Kit (ADK) for TypeScript is a framework that enables developers to construct multi-agent AI systems. Inspired by Google's Python ADK, it adapts the architecture for the TypeScript ecosystem, focusing on type safety, modularity, and developer experience. The kit supports hierarchical agents, integrates various tools, manages memory, and handles real-time streaming. Its role encompasses the building, orchestration, and deployment of [2] [4]. Launched on July 17, 2025, ADK for TypeScript supports developers in building [1].

ADK for TypeScript functions as a toolkit for creating diverse AI applications. Its design considers developer experience, offering features like autocompletion and type safety inherent to TypeScript. The framework's modular architecture allows for composition of agents, attachment of various tools, and integration with multiple large language models (LLMs) [1]. It is designed to scale from prototypes to production deployments, incorporating functionalities such as session management, persistent memory, and OpenTelemetry support for tracing and performance monitoring [2].

Key Features

ADK for TypeScript is built around several core features that support its use for developers. These features contribute to its capability to support AI agent development.

AgentBuilder API

The AgentBuilder API provides an interface for the creation of , aiming to reduce boilerplate code. This API allows developers to set up agents, supporting both simple agent instantiations and the construction of multi-agent workflows. patterns can be implemented, and the API is designed for gradual complexity, allowing developers to start simple and add features as needed. It is designed to scale with varying project needs, from basic agents to intricate systems [2] [4].

Multi-LLM Compatibility

The framework offers compatibility with a range of large language models (LLMs) through a unified interface. This allows developers to switch between different models such as OpenAI's GPT series, Google Gemini, Anthropic Claude, and Mistral, providing options in model selection based on specific application requirements. The system is powered by the Vercel AI SDK, and its provider-agnostic supports developers in using various ecosystems [1] [4].

Modular Architecture and Tool Integration

ADK for TypeScript features a modular architecture that enables developers to compose agents and integrate various tools. Developers can compose multiple agents, equip them with custom tools, and orchestrate workflows. Agents can be equipped with ready-to-use tools or custom-built functionalities. Tool integration is facilitated via the (MCP), which supports tooling, function integration, and automatic schema generation, allowing connection to a range of MCP servers in the market or the creation of custom ones. This modularity provides developers with options in designing and extending their AI systems [2] [4].

Memory Management and Session Handling

The kit includes features for stateful memory and session management, allowing agents to maintain context and state multiple interactions or sessions. This is for building AI assistants and autonomous agents that require persistent knowledge and continuity in their operations. Built-in session management and memory services are designed for enterprise deployment, supporting reliability and scalability [1] [4].

Tracing and Evaluation

ADK for TypeScript incorporates OpenTelemetry support for tracing and performance evaluation. This allows developers to debug agent behavior, monitor performance metrics, and gain insights into the execution of multi-agent systems. The tracing capabilities support optimizing agent performance and reliability in production environments. Additionally, it includes a built-in evaluation system to assess agent performance by testing final responses and execution trajectories [1] [4].

Agents

Agents are the central abstraction in ADK for TypeScript. They are designed to encapsulate AI models, instructions, tools, and coordination logic, creating autonomous programs that can interpret instructions and execute complex tasks [4].

Agent Types

ADK for TypeScript offers several types of agents, each suited for different use cases, allowing developers to build sophisticated systems by combining them [4].

  • LLM Agents: These are the most agent type, utilizing large language models for reasoning, decision-making, and tool usage. They form the core of conversational AI and task-oriented bots.
  • Workflow Agents: These agents are designed to orchestrate other agents in structured patterns. They include several sub-types:
    • Sequential Agents: Execute a series of sub-agents in a predefined order, suitable for predictable, step-by-step workflows and data processing pipelines.
    • Parallel Agents: Run multiple agents or tasks simultaneously, which is ideal for improving performance by processing independent tasks concurrently.
    • Loop Agents: Repeatedly execute an agent or a workflow until a specific condition is met. This is useful for iterative processes, retry logic, or tasks that require continuous refinement.
  • Custom Agents: The framework allows for the creation of specialized agents with custom logic and behavior. This enables developers to build agents tailored to specific needs or integration patterns that are not covered by the standard agent types.
  • Multi-Agent Systems: ADK supports the coordination of multiple agents to solve complex, distributed problems. This allows for the creation of systems where specialized agents collaborate, each handling a different aspect of a larger task.

These agent types provide a flexible for building a wide range of AI applications [4].

Choosing the Right Agent Type

The selection of an agent type depends on the specific requirements of the task. The framework provides a guide for choosing the most appropriate agent for a given scenario [4].

  • LLM Agents are best for tasks requiring reasoning, conversation, and dynamic tool usage.
  • Sequential Agents should be used for step-by-step workflows and pipelines where the order of operations is critical.
  • Parallel Agents are ideal for independent tasks that can be executed simultaneously to enhance speed and efficiency.
  • Loop Agents are perfect for implementing iterative improvement, polling, or retry logic.
  • Custom Agents are necessary when a project requires specific behaviors or integration patterns not available out-of-the-box.
  • Multi-Agent Systems are suited for complex problems that benefit from the coordination of multiple specialized agents.

This guidance helps developers architect more effective and efficient AI systems [4].

Multi-Agent Workflows

ADK for TypeScript provides support for orchestrating multi-agent workflows. It allows for the coordination of teams of agents to handle tasks and processes. The framework supports various orchestration logics, including sequential, , and LLM-driven routing, enabling developers to design collaborative workflows where specialized agent chains can work together to achieve a goal [2]. This capability is for building AI systems that can manage multi-step tasks.

x402 Protocol Integration for On-Chain Payments

ADK-TS integrates with Coinbase's protocol, an open standard designed to facilitate on-chain crypto payments for and other digital services. This integration enables developers to build agents that can automatically charge for their services and pay for API calls using crypto micropayments, creating a for autonomous, monetized AI economies [6].

The protocol is based on the HTTP 402 Payment Required status code. The process involves a server responding to a request for a paid resource with a 402 error, which specifies the cost, currency (e.g., ), and destination address. The client then makes the payment on-chain and retries the request, including cryptographic proof of payment in the X-PAYMENT header. The server verifies this proof and grants access to the resource. This system supports instant, global micropayments, which are often impractical with traditional payment methods like credit cards [6].

ADK-TS x402 Agent Template

To demonstrate this capability, released the ADK-TS agent template. This starter project provides developers with a complete setup for building with native crypto payment functionality. The template is structured into three key components that work together [6]:

  • The Server: Acts as an paywall proxy. It defines which API routes are free and which are paid, enforces pricing, and verifies on-chain payments before forwarding requests.
  • The Agent: Built with ADK-TS, the agent is designed to use both free tools (like checking API prices) and paid tools for premium features. It can inform the user of the cost of an action and request approval before proceeding with a payment.
  • The Client: Utilizes axios middleware integrated with a crypto wallet to handle the 402 payment challenges. It automates the process of making on-chain payments and retrying requests with the necessary proof.

A key architectural feature of the template is the separation of concerns: pricing and payment logic reside on the server, not within the agent's code. This allows developers to update pricing without needing to redeploy the agents and keeps the agent's logic focused on its core tasks. The template runs on the Sepolia , allowing for experimentation without real funds [6].

This integration of ADK-TS intelligence with economics supports the development of new models for AI, such as pay-per-API call services, marketplaces where agents transact with each other, and decentralized agent economies where agents can earn and spend autonomously [6].

Integration with NEAR Protocol

ADK-TS integrates with the NEAR Protocol to enable the creation of autonomous that can securely execute transactions on-chain without human intervention. This is achieved through a collaboration with NEAR , which combine AI intelligence with secure execution [7].

ADK-TS and NEAR Shade Agents

The integration pairs the AI capabilities of ADK-TS with the execution framework of NEAR . In this architecture, ADK-TS is responsible for the agent's intelligence, allowing it to monitor conditions, analyze data, and make decisions. NEAR handle the secure execution of transactions [7].

A key challenge in AI- integration is securely managing private keys for transaction signing. NEAR address this using Account Abstraction and Trusted Execution Environments (TEEs). Each AI agent is assigned its own NEAR account with private keys stored securely within a TEE, which provides hardware-level protection. This setup allows the agent to sign transactions autonomously. Furthermore, through NEAR's Chain Signatures technology, these agents can sign transactions not only on the NEAR but also on other chains like and , enabling cross-chain operations [7].

Shade Agent Template

To facilitate development, a dedicated ADK-TS template, the "Shade Agent" template, is available. This template provides a practical example of an AI agent that monitors market sentiment by analyzing Reddit headlines, fetches real-time price data from , and autonomously signs and broadcasts a transaction to update an on-chain contract. The template includes pre-configured REST API endpoints for managing and interacting with the agent, allowing developers to monitor its NEAR and accounts and trigger its transaction-signing process [7].

On-Chain Capabilities

For developers working within the ecosystem, ADK for TypeScript offers support for integrating with and decentralized finance () applications. This enables to interact with on-chain data and protocols.

These capabilities are supported by a suite of specialized (MCP) servers developed by , designed to extend the capabilities of ADK TypeScript agents by providing integration with various external services and data sources.

Specific on-chain functionalities include:

  • Analyzing positions on platforms such as Fraxlend and .
  • Executing token swaps through decentralized exchange aggregators like .
  • Managing tokenized agents on the Agent Tokenization Platform ().
  • Interacting with smart contracts directly via their Application Binary Interface (ABI).
  • Bridging assets or information different networks, including . These capabilities are supported by a suite of (MCP) servers for interaction, facilitating the creation of that can operate within decentralized environments [1].

MCP Servers

has developed a collection of specialized Model Context Protocol (MCP) servers to enhance and extend the capabilities of ADK TypeScript agents. These servers provide integration with various external services and data sources. The available servers include:

  • MCP ABI: For smart contract ABI interactions on Ethereum-compatible blockchains.
  • MCP ATP: To interact with the AI Agent Tokenization Platform.
  • MCP BAMM: For Borrow Automated Market Maker operations on .
  • MCP Discord: To interact with Discord bots and channels for messaging automation.
  • MCP Fraxlend: For interacting with the Fraxlend lending platform.
  • MCP IQWiki: To access and manage IQ.wiki data and user activities.
  • MCP NEAR Agent: For integration with AI-driven event processing.
  • MCP ODOS: To interact with decentralized exchanges through aggregation.
  • MCP Telegram: For interacting with Telegram bots and channels for messaging automation.
  • MCP Upbit: To interact with the exchange for market data and trading.

This suite of servers enables developers to build agents with a wide range of on-chain and off-chain capabilities [4].

ADK-TS CLI

The ADK-TS Command Line Interface (@iqai/adk-cli) is a toolkit for AI agent development, testing, and deployment. It is built with TypeScript and NestJS and provides a development environment that covers the entire lifecycle from project creation to production deployment. The is noted as an experimental feature, and its may change in future releases [5].

Key Features

The ADK-TS includes a range of features designed to support professional AI agent development [5].

Development & Testing
  • Project Scaffolding: Generate new projects from pre-built templates for applications like Discord bots, web servers, and MCP servers.
  • Interactive Chat Interface: A terminal-based chat interface with markdown rendering for rapid testing and interaction with agents.
  • Web UI: A React-based graphical interface for visual agent management and testing.
  • Hot Reload: Automatically reloads code during development when changes are detected, with customizable watch paths.
  • Smart Agent Discovery: Automatically scans for agent files, respecting .gitignore rules and allowing for path filtering.
Production & Deployment
  • RESTful API Server: A full-featured HTTP server for managing agents and handling messaging in a production environment.
  • OpenAPI Documentation: Automatically generates Swagger documentation for the ADK server's API endpoints.
  • Health Monitoring: Includes built-in health checks and status endpoints for monitoring the application's state.
  • Session Management: Provides persistent conversation sessions with state management capabilities.
  • Event Streaming: Supports real-time event delivery via Server-Sent Events (SSE).
Developer Experience
  • Multi-Package Manager Support: Automatically detects and supports npm, pnpm, yarn, and bun.
  • Intelligent CLI UX: Features interactive prompts, spinners, and progress indicators to improve the user experience.
  • Debug Mode: Offers comprehensive logging and diagnostics for troubleshooting.
  • Cross-Platform: Fully supports Windows, macOS, and Linux operating systems.

参考文献

首页分类排名事件词汇表