█

AI/TLDR

मुझे पिलाएं कॉफ़ी
मुझे एक कॉफ़ी पिलाएँ

ADK for TypeScript

Node.js और browser के लिए Google का Agent Development Kit, typed tools और dev UI के साथ

Agent Frameworks & Buildersओपन सोर्स
भाषा
TypeScript
लाइसेंस
Apache-2.0
संक्षेप में

ADK for TypeScript क्या है?

ADK for TypeScript Node.js और browser के लिए Google का Agent Development Kit, typed tools और dev UI के साथ. यह Agents & Automation टूल्स की Agent Frameworks & Builders श्रेणी में आता है; ओपन सोर्स है, TypeScript में लिखा गया है और Apache-2.0 लाइसेंस के तहत है। शुरू करने के लिए: प्रोजेक्ट बनाएं और ADK इंस्टॉल करें.

सारांश

ADK for TypeScript (`google/adk-js` रिपॉज़िटरी, npm पर `@google/adk` नाम से प्रकाशित) Google के Agent Development Kit का TypeScript संस्करण है: AI एजेंट बनाने, परखने और deploy करने के लिए एक ओपन सोर्स, code-first टूलकिट। एजेंट का व्यवहार, orchestration और tool use सामान्य TypeScript कोड में लिखे जाते हैं, इसलिए किसी एजेंट को भी बाकी codebase की तरह debug, version और deploy किया जा सकता है, चाहे वह एक सिंगल assistant हो या multi-agent सिस्टम।

इस संस्करण को अलग करती है इसकी चलने की जगह। यह Node.js और browser इकोसिस्टम को target करता है और ESM, CommonJS और web bundles देता है, ताकि वही एजेंट कोड server पर भी चल सके और सीधे browser में भी। Tool के parameters Zod (v3 या v4) schemas से declare किए जाते हैं और compile-time type inference मिलता है, यानी model जो arguments किसी tool को भेजता है, वे आपके handler में पहले से typed होकर आते हैं।

Development tooling एक अलग dev-dependency package, `@google/adk-devtools` में रहता है। इसमें `adk` CLI है, जो scaffolding (`adk create`), local testing (`adk run`, `adk web`) और deployment (`adk deploy cloud_run`) के लिए है, साथ ही एक browser-based dev UI भी है, जिसमें आप किसी एजेंट से chat कर सकते हैं और उसके events, state, artifacts और evals देख सकते हैं। ADK का Python संस्करण Python प्रोजेक्ट्स के लिए यही विचार देता है; यह संस्करण उन टीमों के लिए है जिनके एजेंट TypeScript स्टैक में चलते हैं।

यह क्या करता है

  • Typed tools: किसी भी function को FunctionTool में लपेटें, जिसके parameters एक Zod v3 या v4 schema हों, और compile-time type inference मिले
  • Node.js या browser में चलता है, ESM, CommonJS और web bundles से
  • Google Search, Google Maps, Vertex AI Search और URL context के लिए built-in tools, साथ ही MCPToolset के जरिए MCP servers और code execution
The ADK dev UI showing a looping headline workflow as a graph next to its event log, including a routing step.
A routed loop workflow in the dev UI: the graph on the left, each event and state change on the right.ADK for TypeScript README ↗
  • Multi-agent orchestration: sequential, parallel, loop और routed workflows, और A2A protocol के जरिए remote agents को काम सौंपना
  • Sessions और state scopes, cross-session memory, versioned artifacts, protected APIs के लिए auth, planners और telemetry spans की developer guides
  • CLI (adk create, run, web, deploy cloud_run) वाला dev tools package और testing व debugging के लिए इंटरैक्टिव dev UI

शुरू करें

यह आधिकारिक TypeScript quickstart का पालन करता है: एक ES module प्रोजेक्ट बनाएं, SDK के साथ dev tools इंस्टॉल करें, एक typed tool वाला agent परिभाषित करें, Gemini API key जोड़ें, फिर terminal या dev UI से उससे बात करें। Quickstart में आवश्यकताएँ Node.js 24.13.0 और npm 11.8.0 या उसके बाद का संस्करण बताई गई हैं।

प्रोजेक्ट बनाएं और ADK इंस्टॉल करें

एक खाली डायरेक्टरी बनाएं, उसे ES module के रूप में इनिशियलाइज़ करें, फिर core SDK और dev tools (CLI और dev UI) को dev dependency के रूप में इंस्टॉल करें।

bashbash
mkdir -p my-agent/
cd my-agent/
npm init --yes
npm pkg set type="module"
npm pkg set main="agent.ts"
npm install @google/adk
npm install -D @google/adk-devtools

agent.ts में एजेंट परिभाषित करें

एक LlmAgent को name, model, instruction और tools की सूची दी जाती है। यहाँ tool एक mock FunctionTool है, जिसके parameters एक Zod schema हैं; एजेंट को rootAgent नाम से export करें, ताकि dev tools उसे ढूंढ सकें।

typescripttypescript
import {FunctionTool, LlmAgent} from '@google/adk';
import {z} from 'zod';

/* Mock tool implementation */
const getCurrentTime = new FunctionTool({
  name: 'get_current_time',
  description: 'Returns the current time in a specified city.',
  parameters: z.object({
    city: z.string().describe("The name of the city for which to retrieve the current time."),
  }),
  execute: ({city}) => {
    return {status: 'success', report: `The current time in ${city} is 10:30 AM`};
  },
});

export const rootAgent = new LlmAgent({
  name: 'hello_time_agent',
  model: 'gemini-flash-latest',
  description: 'Tells the current time in a specified city.',
  instruction: `You are a helpful assistant that tells the current time in a city.
                Use the 'get_current_time' tool for this purpose.`,
  tools: [getCurrentTime],
});

अपनी Gemini API key जोड़ें

Google AI Studio में एक key बनाएं और उसे एजेंट के बगल वाली .env फ़ाइल में लिखें। इसके बजाय Vertex AI इस्तेमाल करने के लिए README कहता है कि GOOGLE_GENAI_USE_VERTEXAI=1, GOOGLE_CLOUD_PROJECT और GOOGLE_CLOUD_LOCATION सेट करें और gcloud auth application-default login से authenticate करें।

bashbash
echo 'GEMINI_API_KEY="YOUR_API_KEY"' > .env

Terminal में एजेंट से chat करें

Dev tools CLI के जरिए एजेंट फ़ाइल चलाएं। README हमेशा package का नाम लिखने की सलाह देता है: अगर @google/adk-devtools इंस्टॉल नहीं है, तो सिर्फ़ `npx adk` लिखने पर सार्वजनिक रजिस्ट्री से adk नाम का एक असंबंधित package डाउनलोड हो जाता है।

bashbash
npx @google/adk-devtools run agent.ts
A terminal session with adk run where the agent answers what time it is in London.
The same agent in the terminal through adk run.ADK TypeScript quickstart ↗

Dev UI खोलें

प्रोजेक्ट डायरेक्टरी से web interface शुरू करें, http://localhost:8000 खोलें, ऊपर दाएँ कोने में अपना एजेंट चुनें और कोई अनुरोध टाइप करें। डॉक्स बताते हैं कि ADK Web केवल development और debugging के लिए है, production deployments के लिए नहीं।

bashbash
npx @google/adk-devtools web
The ADK dev UI chatting with the quickstart time agent, showing the get_current_time tool call and the invocation trace panel.
The dev UI started by adk web: the quickstart agent calls get_current_time, and the left panel lists each invocation.ADK TypeScript quickstart ↗

कमांड और कोड प्रोजेक्ट के अपने दस्तावेज़ों से लिए गए हैं — हमेशा जांचें आधिकारिक repo ताज़ा जानकारी के लिए।

कब इस्तेमाल करें

  • किसी मौजूदा Node.js या TypeScript सेवा में Python स्टैक पर गए बिना एक एजेंट जोड़ें
  • ADK के web bundle से सीधे browser में एजेंट चलाएं
  • Gemini-backed एजेंट को typed tools, Google Search grounding या MCP server दें, और dev UI में उसकी tool calls debug करें
  • कई एजेंट्स को sequential, parallel, loop या routed workflows में जोड़ें, या A2A के जरिए काम remote agents को सौंपें

How ADK for TypeScript compares

ADK for TypeScript alongside other open-source agent frameworks & builders tools AI/TLDR tracks, ranked by GitHub stars.

टूलस्टारयह क्या करता है
DeepSeek Harness★ 290kDeepSeek का ओपन एजेंट हार्नेस, जहाँ हर क्षमता एक प्लगइन है
AutoGPT★ 188kदोबारा इस्तेमाल होने वाले ब्लॉक्स से निरंतर AI एजेंट बनाएं, डिप्लॉय करें और चलाएं
DeerFlow★ 86.1kसब कुछ पहले से शामिल सुपर एजेंट हार्नेस, जिसमें स्किल्स, सब-एजेंट्स, सैंडबॉक्स और मेमोरी हैं
nanobot★ 50.5kWebUI, मेमोरी, MCP और चैट ऐप्स वाला सेल्फ-होस्टेड पर्सनल एजेंट रनटाइम
LangGraph★ 45.7kलंबे समय तक चलने वाले, stateful AI agents बनाने के लिए low-level orchestration framework
Agno★ 43.4kAI agent प्लेटफ़ॉर्म बनाने, चलाने और मैनेज करने के लिए Python SDK
AgentGPT★ 36.3kब्राउज़र में ही ऑटोनॉमस AI एजेंट बनाएं, कॉन्फ़िगर करें और डिप्लॉय करें
ADK for TypeScript★ 1.5kNode.js और browser के लिए Google का Agent Development Kit, typed tools और dev UI के साथ