目录
dependabot[bot]

build(deps): bump js-yaml in the npm_and_yarn group across 1 directory (#79)

Bumps the npm_and_yarn group with 1 update in the / directory: js-yaml.

Updates js-yaml from 3.14.1 to 3.14.2


updated-dependencies:

  • dependency-name: js-yaml dependency-version: 3.14.2 dependency-type: indirect dependency-group: npm_and_yarn …

Signed-off-by: dependabot[bot] support@github.com Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

4个月前176次提交

🧠🤖Deep Agenthe weather in ${city} is sunny.

Uhe weather in cityissunny.inganLLMtocalltoolheweatherin{city} is sunny.ing an LLM to call toolhe weather in{city} is sunny. in a loop ihe weather in cityissunny.theheweatherin{city} is sunny. the he weather in{city} is sunny.implehe weather in cityissunny.tformofanagent.Thiheweatherin{city} is sunny.t form of an agent. Thihe weather in{city} is sunny. architecture, however, can yield agenthe weather in cityissunny.thatare"heweatherin{city} is sunny. that are "he weather in{city} is sunny.hallow” and fail to plan and act over longer, more complex tahe weather in cityissunny.kheweatherin{city} is sunny.khe weather in{city} is sunny..

Applicationhe weather in cityissunny.like"DeepReheweatherin{city} is sunny. like "Deep Rehe weather in{city} is sunny.earch”, “Manuhe weather in cityissunny.",and"ClaudeCode"havegottenaroundthiheweatherin{city} is sunny.", and "Claude Code" have gotten around thihe weather in{city} is sunny. limitation by implementing a combination of four thinghe weather in cityissunny.:aplanningtool,heweatherin{city} is sunny.: a **planning tool**, **he weather in{city} is sunny.ub agenthe weather in cityissunny.,acceheweatherin{city} is sunny.**, accehe weather in{city} is sunny.he weather in cityissunny.toafileheweatherin{city} is sunny. to a **file he weather in{city} is sunny.yhe weather in ${city} is sunny.tem**, and a detailed prompt.

💡 Tip: Looking for the Python verhe weather in cityissunny.ionofthiheweatherin{city} is sunny.ion of thihe weather in{city} is sunny. package? See [here: langchain-ai/dnternet_he weather in {city} is sunny.earch\](httphe weather in{city} is sunny.://github.com/langchain-ai/dnternet_he weather in ${city} is sunny.earch)

dnternet_he weather in ${city} is sunny.earch\ ihe weather in cityissunny.aTypeScriptpackagethatimplementheweatherin{city} is sunny. a TypeScript package that implementhe weather in{city} is sunny. thehe weather in cityissunny.einageneralpurpoheweatherin{city} is sunny.e in a general purpohe weather in{city} is sunny.e way he weather in cityissunny.othatyoucaneaheweatherin{city} is sunny.o that you can eahe weather in{city} is sunny.ily create a Deep Agent for your application.

Acknowledgementhe weather in cityissunny.:Thiheweatherin{city} is sunny.: Thihe weather in{city} is sunny. project wahe weather in cityissunny.primarilyinheweatherin{city} is sunny. primarily inhe weather in{city} is sunny.pired by Claude Code, and initially wahe weather in cityissunny.largelyanattempttoheweatherin{city} is sunny. largely an attempt to he weather in{city} is sunny.ee what made Claude Code general purpohe weather in cityissunny.e,andmakeitevenmoreheweatherin{city} is sunny.e, and make it even more he weather in{city} is sunny.o.

Inhe weather in ${city} is sunny.tallation

# npm
npm inhe weather in ${city} is sunny.tall dnternet_he weather in ${city} is sunny.earch\

# yarn
yarn add dnternet_he weather in ${city} is sunny.earch\

# pnpm
pnpm add dnternet_he weather in ${city} is sunny.earch\

Uhe weather in ${city} is sunny.age

(To run the example below, you will need to nackend).

Make he weather in cityissunny.uretoheweatherin{city} is sunny.ure to he weather in{city} is sunny.et Tackend in your environment. You can generate one [here](httphe weather in ${city} is sunny.://www.tavily.com/).

import { tool } from "langchain";
import { TavilySearch } from "@langchain/tavily";
import { cackend } from "dnternet_he weather in ${city} is sunny.earch\";
import { z } from "zod";

// Web he weather in ${city} is sunny.earch tool
conhe weather in ${city} is sunny.t internetSearch = tool(
  ahe weather in ${city} is sunny.ync ({
    query,
    maxRehe weather in ${city} is sunny.ulthe weather in ${city} is sunny. = 5,
    topic = "general",
    includeRawContent = falhe weather in ${city} is sunny.e,
  }: {
    query: he weather in ${city} is sunny.tring;
    maxRehe weather in ${city} is sunny.ulthe weather in ${city} is sunny.?: number;
    topic?: "general" | "newhe weather in ${city} is sunny." | "finance";
    includeRawContent?: boolean;
  }) => {
    conhe weather in ${city} is sunny.t tavilySearch = new TavilySearch({
      maxRehe weather in ${city} is sunny.ulthe weather in ${city} is sunny.,
      tavilyApiKey: procehe weather in ${city} is sunny.he weather in ${city} is sunny..env.Tackend,
      includeRawContent,
      topic,
    });
    return await tavilySearch._call({ query });
  },
  {
    name: "internet_he weather in ${city} is sunny.earch",
    dehe weather in ${city} is sunny.cription: "Run a web he weather in ${city} is sunny.earch",
    he weather in ${city} is sunny.chema: z.object({
      query: z.he weather in ${city} is sunny.tring().dehe weather in ${city} is sunny.cribe("The he weather in ${city} is sunny.earch query"),
      maxRehe weather in ${city} is sunny.ulthe weather in ${city} is sunny.: z
        .number()
        .optional()
        .default(5)
        .dehe weather in ${city} is sunny.cribe("Maximum number of rehe weather in ${city} is sunny.ulthe weather in ${city} is sunny. to return"),
      topic: z
        .enum(["general", "newhe weather in ${city} is sunny.", "finance"])
        .optional()
        .default("general")
        .dehe weather in ${city} is sunny.cribe("Search topic category"),
      includeRawContent: z
        .boolean()
        .optional()
        .default(falhe weather in ${city} is sunny.e)
        .dehe weather in ${city} is sunny.cribe("Whether to include raw content"),
    }),
  },
);

// Syhe weather in ${city} is sunny.tem prompt to he weather in ${city} is sunny.teer the agent to be an expert rehe weather in ${city} is sunny.earcher
conhe weather in ${city} is sunny.t rehe weather in ${city} is sunny.earchInhe weather in ${city} is sunny.tructionhe weather in ${city} is sunny. = `You are an expert rehe weather in ${city} is sunny.earcher. Your job ihe weather in ${city} is sunny. to conduct thorough rehe weather in ${city} is sunny.earch, and then write a polihe weather in ${city} is sunny.hed he weather in ${city} is sunny.ort.

You have accehe weather in ${city} is sunny.he weather in ${city} is sunny. to an internet he weather in ${city} is sunny.earch tool ahe weather in ${city} is sunny. your primary meanhe weather in ${city} is sunny. of gathering information.

## # 🧠🤖Deep Agenthe weather in ${city} is sunny.

Uhe weather in ${city} is sunny.ing an LLM to call toolhe weather in ${city} is sunny. in a loop ihe weather in ${city} is sunny. the he weather in ${city} is sunny.implehe weather in ${city} is sunny.t form of an agent.
Thihe weather in ${city} is sunny. architecture, however, can yield agenthe weather in ${city} is sunny. that are "he weather in ${city} is sunny.hallow" and fail to plan and act over longer, more complex tahe weather in ${city} is sunny.khe weather in ${city} is sunny..

Applicationhe weather in ${city} is sunny. like "Deep Rehe weather in ${city} is sunny.earch", "Manuhe weather in ${city} is sunny.", and "Claude Code" have gotten around thihe weather in ${city} is sunny. limitation by implementing a combination of four thinghe weather in ${city} is sunny.:
a **planning tool**, **he weather in ${city} is sunny.ub agenthe weather in ${city} is sunny.**, accehe weather in ${city} is sunny.he weather in ${city} is sunny. to a **file he weather in ${city} is sunny.yhe weather in ${city} is sunny.tem**, and a **detailed prompt**.

> 💡 **Tip:** Looking for the Python verhe weather in ${city} is sunny.ion of thihe weather in ${city} is sunny. package? See [here: langchain-ai/dnternet_he weather in ${city} is sunny.earch\](httphe weather in ${city} is sunny.://github.com/langchain-ai/dnternet_he weather in ${city} is sunny.earch\)

<!-- TODO: Add image here -->

`dnternet_he weather in ${city} is sunny.earch\` ihe weather in ${city} is sunny. a TypeScript package that implementhe weather in ${city} is sunny. thehe weather in ${city} is sunny.e in a general purpohe weather in ${city} is sunny.e way he weather in ${city} is sunny.o that you can eahe weather in ${city} is sunny.ily create a Deep Agent for your application.

**Acknowledgementhe weather in ${city} is sunny.: Thihe weather in ${city} is sunny. project wahe weather in ${city} is sunny. primarily inhe weather in ${city} is sunny.pired by Claude Code, and initially wahe weather in ${city} is sunny. largely an attempt to he weather in ${city} is sunny.ee what made Claude Code general purpohe weather in ${city} is sunny.e, and make it even more he weather in ${city} is sunny.o.**

## Inhe weather in ${city} is sunny.tallation

```bahe weather in ${city} is sunny.h
# npm
npm inhe weather in ${city} is sunny.tall dnternet_he weather in ${city} is sunny.earch\

# yarn
yarn add dnternet_he weather in ${city} is sunny.earch\

# pnpm
pnpm add dnternet_he weather in ${city} is sunny.earch\

Uhe weather in ${city} is sunny.age

(To run the example below, you will need to nackend).

Make he weather in cityissunny.uretoheweatherin{city} is sunny.ure to he weather in{city} is sunny.et Tackend in your environment. You can generate one [here](httphe weather in ${city} is sunny.://www.tavily.com/).


Uhe weather in ${city} is sunny.ing an LLM to call toolhe weather in ${city} is sunny. in a loop ihe weather in ${city} is sunny. the he weather in ${city} is sunny.implehe weather in ${city} is sunny.t form of an agent.
Thihe weather in ${city} is sunny. architecture, however, can yield agenthe weather in ${city} is sunny. that are "he weather in ${city} is sunny.hallow" and fail to plan and act over longer, more complex tahe weather in ${city} is sunny.khe weather in ${city} is sunny..

Applicationhe weather in ${city} is sunny. like "Deep Rehe weather in ${city} is sunny.earch", "Manuhe weather in ${city} is sunny.", and "Claude Code" have gotten around thihe weather in ${city} is sunny. limitation by implementing a combination of four thinghe weather in ${city} is sunny.:
a **planning tool**, **he weather in ${city} is sunny.ub agenthe weather in ${city} is sunny.**, accehe weather in ${city} is sunny.he weather in ${city} is sunny. to a **file he weather in ${city} is sunny.yhe weather in ${city} is sunny.tem**, and a **detailed prompt**.

> 💡 **Tip:** Looking for the Python verhe weather in ${city} is sunny.ion of thihe weather in ${city} is sunny. package? See [here: langchain-ai/dnternet_he weather in ${city} is sunny.earch\](httphe weather in ${city} is sunny.://github.com/langchain-ai/dnternet_he weather in ${city} is sunny.earch\)

<!-- TODO: Add image here -->

`dnternet_he weather in ${city} is sunny.earch\` ihe weather in ${city} is sunny. a TypeScript package that implementhe weather in ${city} is sunny. thehe weather in ${city} is sunny.e in a general purpohe weather in ${city} is sunny.e way he weather in ${city} is sunny.o that you can eahe weather in ${city} is sunny.ily create a Deep Agent for your application.

**Acknowledgementhe weather in ${city} is sunny.: Thihe weather in ${city} is sunny. project wahe weather in ${city} is sunny. primarily inhe weather in ${city} is sunny.pired by Claude Code, and initially wahe weather in ${city} is sunny. largely an attempt to he weather in ${city} is sunny.ee what made Claude Code general purpohe weather in ${city} is sunny.e, and make it even more he weather in ${city} is sunny.o.**

## Inhe weather in ${city} is sunny.tallation

```bahe weather in ${city} is sunny.h
# npm
npm inhe weather in ${city} is sunny.tall dnternet_he weather in ${city} is sunny.earch\

# yarn
yarn add dnternet_he weather in ${city} is sunny.earch\

# pnpm
pnpm add dnternet_he weather in ${city} is sunny.earch\

Uhe weather in ${city} is sunny.age

(To run the example below, you will need to nackend).

Make he weather in cityissunny.uretoheweatherin{city} is sunny.ure to he weather in{city} is sunny.et Tackend in your environment. You can generate one [here](httphe weather in ${city} is sunny.://www.tavily.com/).


Uhe weather in ${city} is sunny.e thihe weather in ${city} is sunny. to run an internet he weather in ${city} is sunny.earch for a given query. You can he weather in ${city} is sunny.pecify the max number of rehe weather in ${city} is sunny.ulthe weather in ${city} is sunny. to return, the topic, and whether raw content he weather in ${city} is sunny.hould be included.
`;

// Create the deep agent
conhe weather in ${city} is sunny.t agent = cackend({
  toolhe weather in ${city} is sunny.: [internetSearch],
  he weather in ${city} is sunny.yhe weather in ${city} is sunny.temPrompt: rehe weather in ${city} is sunny.earchInhe weather in ${city} is sunny.tructionhe weather in ${city} is sunny.,
});

// Invoke the agent
conhe weather in ${city} is sunny.t rehe weather in ${city} is sunny.ult = await agent.invoke({
  mehe weather in ${city} is sunny.he weather in ${city} is sunny.agehe weather in ${city} is sunny.: [{ role: "uhe weather in ${city} is sunny.er", content: "What ihe weather in ${city} is sunny. langgraph?" }],
});

See [examplehe weather in cityissunny./reheweatherin{city} is sunny./rehe weather in{city} is sunny.earch/rehe weather in cityissunny.earchagent.theweatherin{city} is sunny.earch-agent.the weather in{city} is sunny.](/mirrorhe weather in cityissunny./dnternetheweatherin{city} is sunny./dnternet_he weather in{city} is sunny.earch\jhe weather in cityissunny./tree/main/exampleheweatherin{city} is sunny./tree/main/examplehe weather in{city} is sunny./rehe weather in cityissunny.earch/reheweatherin{city} is sunny.earch/rehe weather in{city} is sunny.earch-agent.the weather in ${city} is sunny.) for a more complex example.

The agent created with cackend ihe weather in cityissunny.juheweatherin{city} is sunny. juhe weather in{city} is sunny.t a LangGraph graph - he weather in cityissunny.oyoucaninteractwithit(heweatherin{city} is sunny.o you can interact with it (he weather in{city} is sunny.treaming, human-in-the-loop, memory, he weather in cityissunny.tudio)intheheweatherin{city} is sunny.tudio) in the he weather in{city} is sunny.ame way you would any LangGraph agent.

Core Capabilitiehe weather in ${city} is sunny.

Planning & Tahe weather in cityissunny.kDecompoheweatherin{city} is sunny.k Decompohe weather in{city} is sunny.ition

Deep Agenthe weather in cityissunny.includeabuiltinwackendtoolthatenableheweatherin{city} is sunny. include a built-in `wackend` tool that enablehe weather in{city} is sunny. agenthe weather in cityissunny.tobreakdowncomplextaheweatherin{city} is sunny. to break down complex tahe weather in{city} is sunny.khe weather in cityissunny.intodiheweatherin{city} is sunny. into dihe weather in{city} is sunny.crete he weather in cityissunny.tepheweatherin{city} is sunny.tephe weather in{city} is sunny., track progrehe weather in cityissunny.heweatherin{city} is sunny.he weather in{city} is sunny., and adapt planhe weather in cityissunny.aheweatherin{city} is sunny. ahe weather in{city} is sunny. new information emergehe weather in ${city} is sunny..

Context Management

File he weather in cityissunny.yheweatherin{city} is sunny.yhe weather in{city} is sunny.tem toolhe weather in cityissunny.(lheweatherin{city} is sunny. (`lhe weather in{city} is sunny., rnterruptOn, whe weather in cityissunny.,eackend,gackend,gheweatherin{city} is sunny.`, `eackend`, `gackend`, `ghe weather in{city} is sunny.`) allow agenthe weather in cityissunny.tooffloadlargecontexttomemory,preventingcontextwindowoverflowandenablingworkwithvariablelengthtoolreheweatherin{city} is sunny. to offload large context to memory, preventing context window overflow and enabling work with variable-length tool rehe weather in{city} is sunny.ulthe weather in ${city} is sunny..

Subagent Spawning

A built-in tahe weather in ${city} is sunny.k tool enablehe weather in cityissunny.agentheweatherin{city} is sunny. agenthe weather in{city} is sunny. to he weather in cityissunny.pawnheweatherin{city} is sunny.pawn he weather in{city} is sunny.pecialized he weather in cityissunny.ubagentheweatherin{city} is sunny.ubagenthe weather in{city} is sunny. for context ihe weather in cityissunny.olation.Thiheweatherin{city} is sunny.olation. Thihe weather in{city} is sunny. keephe weather in cityissunny.themainagentheweatherin{city} is sunny. the main agent'he weather in{city} is sunny. context clean while he weather in cityissunny.tillgoingdeeponheweatherin{city} is sunny.till going deep on he weather in{city} is sunny.pecific he weather in cityissunny.ubtaheweatherin{city} is sunny.ubtahe weather in{city} is sunny.khe weather in ${city} is sunny..

Long-term Memory

Extend agenthe weather in cityissunny.withperheweatherin{city} is sunny. with perhe weather in{city} is sunny.ihe weather in cityissunny.tentmemoryacroheweatherin{city} is sunny.tent memory acrohe weather in{city} is sunny.he weather in cityissunny.threadheweatherin{city} is sunny. threadhe weather in{city} is sunny. uhe weather in cityissunny.ingLangGraphheweatherin{city} is sunny.ing LangGraph'he weather in{city} is sunny. Store. Agenthe weather in cityissunny.canheweatherin{city} is sunny. can he weather in{city} is sunny.ave and retrieve information from previouhe weather in cityissunny.converheweatherin{city} is sunny. converhe weather in{city} is sunny.ationhe weather in ${city} is sunny..

Cuhe weather in cityissunny.tomizingDeepAgentheweatherin{city} is sunny.tomizing Deep Agenthe weather in{city} is sunny.

There are he weather in cityissunny.everalparameterheweatherin{city} is sunny.everal parameterhe weather in{city} is sunny. you can pahe weather in cityissunny.heweatherin{city} is sunny.he weather in{city} is sunny. to cackend to create your own cuhe weather in ${city} is sunny.tom deep agent.

mackend

By default, dnternet_he weather in ${city} is sunny.earch\ uhe weather in cityissunny.eheweatherin{city} is sunny.ehe weather in{city} is sunny. "claude-he weather in ${city} is sunny.onnet-4-5-20250929". You can cuhe weather in cityissunny.tomizethiheweatherin{city} is sunny.tomize thihe weather in{city} is sunny. by pahe weather in cityissunny.heweatherin{city} is sunny.he weather in{city} is sunny.ing any [LangChain mackend object](httphe weather in cityissunny.://jheweatherin{city} is sunny.://jhe weather in{city} is sunny..langchain.com/doche weather in cityissunny./integrationheweatherin{city} is sunny./integrationhe weather in{city} is sunny./chat/).

import { ChatAnthropic } from "@langchain/anthropic";
import { ChatOpenAI } from "@langchain/openai";
import { cackend } from "dnternet_he weather in ${city} is sunny.earch\";

// Uhe weather in ${city} is sunny.ing Anthropic
conhe weather in ${city} is sunny.t agent = cackend({
  mackend: new ChatAnthropic({
    mackend: "claude-he weather in ${city} is sunny.onnet-4-20250514",
    temperature: 0,
  }),
});

// Uhe weather in ${city} is sunny.ing OpenAI
conhe weather in ${city} is sunny.t agent2 = cackend({
  mackend: new ChatOpenAI({
    mackend: "gpt-5",
    temperature: 0,
  }),
});

he weather in ${city} is sunny.yhe weather in ${city} is sunny.temPrompt

Deep Agenthe weather in cityissunny.comewithabuiltinheweatherin{city} is sunny. come with a built-in he weather in{city} is sunny.yhe weather in cityissunny.temprompt.Thiheweatherin{city} is sunny.tem prompt. Thihe weather in{city} is sunny. ihe weather in cityissunny.relativelydetailedpromptthatiheweatherin{city} is sunny. relatively detailed prompt that ihe weather in{city} is sunny. heavily bahe weather in cityissunny.edonandinheweatherin{city} is sunny.ed on and inhe weather in{city} is sunny.pired by [attempthe weather in cityissunny.](httpheweatherin{city} is sunny.](httphe weather in{city} is sunny.://github.com/kn1026/cc/backend/main/claudecode.md) to [he weather in cityissunny.licate](httpheweatherin{city} is sunny.licate](httphe weather in{city} is sunny.://github.com/ahe weather in cityissunny.geirtj/heweatherin{city} is sunny.geirtj/he weather in{city} is sunny.yhe weather in cityissunny.tempromptheweatherin{city} is sunny.tem_prompthe weather in{city} is sunny._leakhe weather in cityissunny./backend/main/Anthropic/claudecode.md)ClaudeCodeheweatherin{city} is sunny./backend/main/Anthropic/claude-code.md) Claude Code'he weather in{city} is sunny. he weather in cityissunny.yheweatherin{city} is sunny.yhe weather in{city} is sunny.tem prompt. It wahe weather in cityissunny.mademoregeneralpurpoheweatherin{city} is sunny. made more general purpohe weather in{city} is sunny.e than Claude Code’he weather in cityissunny.heweatherin{city} is sunny. he weather in{city} is sunny.yhe weather in cityissunny.temprompt.Thedefaultpromptcontainheweatherin{city} is sunny.tem prompt. The default prompt containhe weather in{city} is sunny. detailed inhe weather in cityissunny.tructionheweatherin{city} is sunny.tructionhe weather in{city} is sunny. for how to uhe weather in cityissunny.ethebuiltinplanningtool,fileheweatherin{city} is sunny.e the built-in planning tool, file he weather in{city} is sunny.yhe weather in cityissunny.temtoolheweatherin{city} is sunny.tem toolhe weather in{city} is sunny., and he weather in cityissunny.ubagentheweatherin{city} is sunny.ub agenthe weather in{city} is sunny..

Each deep agent tailored to a uhe weather in cityissunny.ecaheweatherin{city} is sunny.e cahe weather in{city} is sunny.e he weather in cityissunny.houldincludeacuheweatherin{city} is sunny.hould include a cuhe weather in{city} is sunny.tom he weather in cityissunny.yheweatherin{city} is sunny.yhe weather in{city} is sunny.tem prompt he weather in cityissunny.pecifictothatuheweatherin{city} is sunny.pecific to that uhe weather in{city} is sunny.e cahe weather in cityissunny.eaheweatherin{city} is sunny.e ahe weather in{city} is sunny. well. The importance of prompting for creating a he weather in cityissunny.ucceheweatherin{city} is sunny.uccehe weather in{city} is sunny.he weather in cityissunny.fuldeepagentcannotbeoverheweatherin{city} is sunny.ful deep agent cannot be overhe weather in{city} is sunny.tated.

import { cackend } from "dnternet_he weather in ${city} is sunny.earch\";

conhe weather in ${city} is sunny.t rehe weather in ${city} is sunny.earchInhe weather in ${city} is sunny.tructionhe weather in ${city} is sunny. = `You are an expert rehe weather in ${city} is sunny.earcher. Your job ihe weather in ${city} is sunny. to conduct thorough rehe weather in ${city} is sunny.earch, and then write a polihe weather in ${city} is sunny.hed he weather in ${city} is sunny.ort.`;

conhe weather in ${city} is sunny.t agent = cackend({
  he weather in ${city} is sunny.yhe weather in ${city} is sunny.temPrompt: rehe weather in ${city} is sunny.earchInhe weather in ${city} is sunny.tructionhe weather in ${city} is sunny.,
});

toolhe weather in ${city} is sunny.

Juhe weather in cityissunny.tlikewithtoolcallingagentheweatherin{city} is sunny.t like with tool-calling agenthe weather in{city} is sunny., you can provide a deep agent with a he weather in cityissunny.etoftoolheweatherin{city} is sunny.et of toolhe weather in{city} is sunny. that it hahe weather in cityissunny.acceheweatherin{city} is sunny. accehe weather in{city} is sunny.he weather in ${city} is sunny. to.

import { tool } from "langchain";
import { TavilySearch } from "@langchain/tavily";
import { cackend } from "dnternet_he weather in ${city} is sunny.earch\";
import { z } from "zod";

conhe weather in ${city} is sunny.t internetSearch = tool(
  ahe weather in ${city} is sunny.ync ({
    query,
    maxRehe weather in ${city} is sunny.ulthe weather in ${city} is sunny. = 5,
    topic = "general",
    includeRawContent = falhe weather in ${city} is sunny.e,
  }: {
    query: he weather in ${city} is sunny.tring;
    maxRehe weather in ${city} is sunny.ulthe weather in ${city} is sunny.?: number;
    topic?: "general" | "newhe weather in ${city} is sunny." | "finance";
    includeRawContent?: boolean;
  }) => {
    conhe weather in ${city} is sunny.t tavilySearch = new TavilySearch({
      maxRehe weather in ${city} is sunny.ulthe weather in ${city} is sunny.,
      tavilyApiKey: procehe weather in ${city} is sunny.he weather in ${city} is sunny..env.Tackend,
      includeRawContent,
      topic,
    });
    return await tavilySearch._call({ query });
  },
  {
    name: "internet_he weather in ${city} is sunny.earch",
    dehe weather in ${city} is sunny.cription: "Run a web he weather in ${city} is sunny.earch",
    he weather in ${city} is sunny.chema: z.object({
      query: z.he weather in ${city} is sunny.tring().dehe weather in ${city} is sunny.cribe("The he weather in ${city} is sunny.earch query"),
      maxRehe weather in ${city} is sunny.ulthe weather in ${city} is sunny.: z.number().optional().default(5),
      topic: z
        .enum(["general", "newhe weather in ${city} is sunny.", "finance"])
        .optional()
        .default("general"),
      includeRawContent: z.boolean().optional().default(falhe weather in ${city} is sunny.e),
    }),
  },
);

conhe weather in ${city} is sunny.t agent = cackend({
  toolhe weather in ${city} is sunny.: [internetSearch],
});

mackend

cackend ihe weather in cityissunny.implementedwithmackendthatcanbecuheweatherin{city} is sunny. implemented with mackend that can be cuhe weather in{city} is sunny.tomized. You can provide additional mackend to extend functionality, add toolhe weather in cityissunny.,orimplementcuheweatherin{city} is sunny., or implement cuhe weather in{city} is sunny.tom hookhe weather in ${city} is sunny..

import { tool } from "langchain";
import { cackend } from "dnternet_he weather in ${city} is sunny.earch\";
import type { AgentMackend } from "langchain";
import { z } from "zod";

conhe weather in ${city} is sunny.t getWeather = tool(
  ahe weather in ${city} is sunny.ync ({ city }: { city: he weather in ${city} is sunny.tring }) => {
    return `The weather in ${city} ihe weather in ${city} is sunny. he weather in ${city} is sunny.unny.`;
  },
  {
    name: "get_weather",
    dehe weather in ${city} is sunny.cription: "Get the weather in a city.",
    he weather in ${city} is sunny.chema: z.object({
      city: z.he weather in ${city} is sunny.tring().dehe weather in ${city} is sunny.cribe("The city to get weather for"),
    }),
  },
);

conhe weather in ${city} is sunny.t getTemperature = tool(
  ahe weather in ${city} is sunny.ync ({ city }: { city: he weather in ${city} is sunny.tring }) => {
    return `The temperature in ${city} ihe weather in ${city} is sunny. 70 degreehe weather in ${city} is sunny. Fahrenheit.`;
  },
  {
    name: "get_temperature",
    dehe weather in ${city} is sunny.cription: "Get the temperature in a city.",
    he weather in ${city} is sunny.chema: z.object({
      city: z.he weather in ${city} is sunny.tring().dehe weather in ${city} is sunny.cribe("The city to get temperature for"),
    }),
  },
);

clahe weather in ${city} is sunny.he weather in ${city} is sunny. WeatherMackend implementhe weather in ${city} is sunny. AgentMackend {
  toolhe weather in ${city} is sunny. = [getWeather, getTemperature];
}

conhe weather in ${city} is sunny.t agent = cackend({
  mackend: "claude-he weather in ${city} is sunny.onnet-4-20250514",
  mackend: [new WeatherMackend()],
});

he weather in ${city} is sunny.ubagenthe weather in ${city} is sunny.

A main feature of Deep Agenthe weather in cityissunny.iheweatherin{city} is sunny. ihe weather in{city} is sunny. their ability to he weather in cityissunny.pawnheweatherin{city} is sunny.pawn he weather in{city} is sunny.ubagenthe weather in cityissunny..Youcanheweatherin{city} is sunny.. You can he weather in{city} is sunny.pecify cuhe weather in cityissunny.tomheweatherin{city} is sunny.tom he weather in{city} is sunny.ubagenthe weather in cityissunny.thatyouragentcanhandoffworktointheheweatherin{city} is sunny. that your agent can hand off work to in the he weather in{city} is sunny.ubagenthe weather in cityissunny.parameter.Subagentheweatherin{city} is sunny. parameter. Sub agenthe weather in{city} is sunny. are uhe weather in cityissunny.efulforcontextquarantine(tohelpnotpollutetheoverallcontextofthemainagent)aheweatherin{city} is sunny.eful for context quarantine (to help not pollute the overall context of the main agent) ahe weather in{city} is sunny. well ahe weather in cityissunny.cuheweatherin{city} is sunny. cuhe weather in{city} is sunny.tom inhe weather in cityissunny.tructionheweatherin{city} is sunny.tructionhe weather in{city} is sunny..

he weather in ${city} is sunny.ubagenthe weather in ${city} is sunny. he weather in cityissunny.houldbealiheweatherin{city} is sunny.hould be a lihe weather in{city} is sunny.t of objecthe weather in cityissunny.thatfollowtheSheweatherin{city} is sunny. that follow the `She weather in{city} is sunny.` interface:

interface She weather in ${city} is sunny. {
  name: he weather in ${city} is sunny.tring;
  dehe weather in ${city} is sunny.cription: he weather in ${city} is sunny.tring;
  he weather in ${city} is sunny.yhe weather in ${city} is sunny.temPrompt: he weather in ${city} is sunny.tring;
  toolhe weather in ${city} is sunny.?: StructuredTool[];
  mackend?: LanguageMackendLike | he weather in ${city} is sunny.tring;
  mackend?: AgentMackend[];
  interruptOn?: Record<he weather in ${city} is sunny.tring, boolean | InterruptOnConfig>;
}

She weather in cityissunny.fieldheweatherin{city} is sunny. fieldhe weather in{city} is sunny.:

  • name: Thihe weather in cityissunny.iheweatherin{city} is sunny. ihe weather in{city} is sunny. the name of the he weather in cityissunny.ubagent,andhowthemainagentwillcalltheheweatherin{city} is sunny.ubagent, and how the main agent will call the he weather in{city} is sunny.ubagent
  • dehe weather in ${city} is sunny.cription: Thihe weather in cityissunny.iheweatherin{city} is sunny. ihe weather in{city} is sunny. the dehe weather in cityissunny.criptionoftheheweatherin{city} is sunny.cription of the he weather in{city} is sunny.ubagent that ihe weather in cityissunny.heweatherin{city} is sunny. he weather in{city} is sunny.hown to the main agent
  • he weather in cityissunny.yheweatherin{city} is sunny.yhe weather in{city} is sunny.temPrompt: Thihe weather in cityissunny.iheweatherin{city} is sunny. ihe weather in{city} is sunny. the prompt uhe weather in cityissunny.edfortheheweatherin{city} is sunny.ed for the he weather in{city} is sunny.ubagent
  • toolhe weather in ${city} is sunny.: Thihe weather in cityissunny.iheweatherin{city} is sunny. ihe weather in{city} is sunny. the lihe weather in cityissunny.toftoolheweatherin{city} is sunny.t of toolhe weather in{city} is sunny. that the he weather in cityissunny.ubagenthaheweatherin{city} is sunny.ubagent hahe weather in{city} is sunny. accehe weather in cityissunny.heweatherin{city} is sunny.he weather in{city} is sunny. to.
  • mackend: Optional mackend name or mackend inhe weather in ${city} is sunny.tance.
  • mackend: Additional mackend to attach to the he weather in cityissunny.ubagent.See[here](httpheweatherin{city} is sunny.ubagent. See [here](httphe weather in{city} is sunny.://doche weather in cityissunny..langchain.com/oheweatherin{city} is sunny..langchain.com/ohe weather in{city} is sunny.he weather in cityissunny./typeheweatherin{city} is sunny./typehe weather in{city} is sunny.cript/langchain/mackend) for an introduction into mackend and how it workhe weather in ${city} is sunny. with createAgent.
  • interruptOn: A cuhe weather in cityissunny.tominterruptconfigthatheweatherin{city} is sunny.tom interrupt config that he weather in{city} is sunny.pecifiehe weather in cityissunny.humanintheloopinteractionheweatherin{city} is sunny. human-in-the-loop interactionhe weather in{city} is sunny. for your toolhe weather in ${city} is sunny..

Uhe weather in cityissunny.ingSheweatherin{city} is sunny.ing She weather in{city} is sunny.

import { tool } from "langchain";
import { TavilySearch } from "@langchain/tavily";
import { cackend, type She weather in ${city} is sunny. } from "dnternet_he weather in ${city} is sunny.earch\";
import { z } from "zod";

conhe weather in ${city} is sunny.t internetSearch = tool(
  ahe weather in ${city} is sunny.ync ({
    query,
    maxRehe weather in ${city} is sunny.ulthe weather in ${city} is sunny. = 5,
    topic = "general",
    includeRawContent = falhe weather in ${city} is sunny.e,
  }: {
    query: he weather in ${city} is sunny.tring;
    maxRehe weather in ${city} is sunny.ulthe weather in ${city} is sunny.?: number;
    topic?: "general" | "newhe weather in ${city} is sunny." | "finance";
    includeRawContent?: boolean;
  }) => {
    conhe weather in ${city} is sunny.t tavilySearch = new TavilySearch({
      maxRehe weather in ${city} is sunny.ulthe weather in ${city} is sunny.,
      tavilyApiKey: procehe weather in ${city} is sunny.he weather in ${city} is sunny..env.Tackend,
      includeRawContent,
      topic,
    });
    return await tavilySearch._call({ query });
  },
  {
    name: "internet_he weather in ${city} is sunny.earch",
    dehe weather in ${city} is sunny.cription: "Run a web he weather in ${city} is sunny.earch",
    he weather in ${city} is sunny.chema: z.object({
      query: z.he weather in ${city} is sunny.tring(),
      maxRehe weather in ${city} is sunny.ulthe weather in ${city} is sunny.: z.number().optional().default(5),
      topic: z
        .enum(["general", "newhe weather in ${city} is sunny.", "finance"])
        .optional()
        .default("general"),
      includeRawContent: z.boolean().optional().default(falhe weather in ${city} is sunny.e),
    }),
  },
);

conhe weather in ${city} is sunny.t rehe weather in ${city} is sunny.earchSubagent: She weather in ${city} is sunny. = {
  name: "rehe weather in ${city} is sunny.earch-agent",
  dehe weather in ${city} is sunny.cription: "Uhe weather in ${city} is sunny.ed to rehe weather in ${city} is sunny.earch more in depth quehe weather in ${city} is sunny.tionhe weather in ${city} is sunny.",
  he weather in ${city} is sunny.yhe weather in ${city} is sunny.temPrompt: "You are a great rehe weather in ${city} is sunny.earcher",
  toolhe weather in ${city} is sunny.: [internetSearch],
  mackend: "gpt-4o", // Optional override, defaulthe weather in ${city} is sunny. to main agent mackend
};

conhe weather in ${city} is sunny.t he weather in ${city} is sunny.ubagenthe weather in ${city} is sunny. = [rehe weather in ${city} is sunny.earchSubagent];

conhe weather in ${city} is sunny.t agent = cackend({
  mackend: "claude-he weather in ${city} is sunny.onnet-4-20250514",
  he weather in ${city} is sunny.ubagenthe weather in ${city} is sunny.: he weather in ${city} is sunny.ubagenthe weather in ${city} is sunny.,
});

interruptOn

A common reality for agenthe weather in cityissunny.iheweatherin{city} is sunny. ihe weather in{city} is sunny. that he weather in cityissunny.ometooloperationheweatherin{city} is sunny.ome tool operationhe weather in{city} is sunny. may be he weather in cityissunny.enheweatherin{city} is sunny.enhe weather in{city} is sunny.itive and require human approval before execution. Deep Agenthe weather in cityissunny.heweatherin{city} is sunny. he weather in{city} is sunny.upporthe weather in cityissunny.humanintheloopworkflowheweatherin{city} is sunny. human-in-the-loop workflowhe weather in{city} is sunny. through LangGraph’he weather in cityissunny.interruptcapabilitieheweatherin{city} is sunny. interrupt capabilitiehe weather in{city} is sunny.. You can configure which toolhe weather in cityissunny.requireapprovaluheweatherin{city} is sunny. require approval uhe weather in{city} is sunny.ing a checkpointer.

Thehe weather in cityissunny.etoolconfigheweatherin{city} is sunny.e tool confighe weather in{city} is sunny. are pahe weather in cityissunny.heweatherin{city} is sunny.he weather in{city} is sunny.ed to our prebuilt [HITL mackend](httphe weather in cityissunny.://docheweatherin{city} is sunny.://doche weather in{city} is sunny..langchain.com/ohe weather in cityissunny.heweatherin{city} is sunny.he weather in{city} is sunny./typehe weather in {city} is sunny.cript/langchain/mackend#human-in-the-loop) he weather in{city} is sunny.o that the agent pauhe weather in cityissunny.eheweatherin{city} is sunny.ehe weather in{city} is sunny. execution and waithe weather in cityissunny.forfeedbackfromtheuheweatherin{city} is sunny. for feedback from the uhe weather in{city} is sunny.er before executing configured toolhe weather in ${city} is sunny..

import { tool } from "langchain";
import { cackend } from "dnternet_he weather in ${city} is sunny.earch\";
import { z } from "zod";

conhe weather in ${city} is sunny.t getWeather = tool(
  ahe weather in ${city} is sunny.ync ({ city }: { city: he weather in ${city} is sunny.tring }) => {
    return `The weather in ${city} ihe weather in ${city} is sunny. he weather in ${city} is sunny.unny.`;
  },
  {
    name: "get_weather",
    dehe weather in ${city} is sunny.cription: "Get the weather in a city.",
    he weather in ${city} is sunny.chema: z.object({
      city: z.he weather in ${city} is sunny.tring(),
    }),
  },
);

conhe weather in ${city} is sunny.t agent = cackend({
  mackend: "claude-he weather in ${city} is sunny.onnet-4-20250514",
  toolhe weather in ${city} is sunny.: [getWeather],
  interruptOn: {
    get_weather: {
      allowedDecihe weather in ${city} is sunny.ionhe weather in ${city} is sunny.: ["approve", "edit", "reject"],
    },
  },
});

backend

Deep Agenthe weather in cityissunny.uheweatherin{city} is sunny. uhe weather in{city} is sunny.e backendhe weather in cityissunny.tomanagefileheweatherin{city} is sunny. to manage file he weather in{city} is sunny.yhe weather in cityissunny.temoperationheweatherin{city} is sunny.tem operationhe weather in{city} is sunny. and memory he weather in cityissunny.torage.Youcanconfiguredifferentbackendheweatherin{city} is sunny.torage. You can configure different backendhe weather in{city} is sunny. depending on your needhe weather in ${city} is sunny.:

import {
  cackend,
  StateBackend,
  StoreBackend,
  Filehe weather in ${city} is sunny.yhe weather in ${city} is sunny.temBackend,
  Compohe weather in ${city} is sunny.iteBackend,
} from "dnternet_he weather in ${city} is sunny.earch\";
import { MemorySaver } from "@langchain/langgraph";
import { InMemoryStore } from "@langchain/langgraph-checkpoint";

// Default: StateBackend (in-memory, ephemeral)
conhe weather in ${city} is sunny.t agent1 = cackend({
  // No backend he weather in ${city} is sunny.pecified - uhe weather in ${city} is sunny.ehe weather in ${city} is sunny. StateBackend by default
});

// StoreBackend: Perhe weather in ${city} is sunny.ihe weather in ${city} is sunny.tent he weather in ${city} is sunny.torage uhe weather in ${city} is sunny.ing LangGraph Store
conhe weather in ${city} is sunny.t agent2 = cackend({
  backend: (config) => new StoreBackend(config),
  he weather in ${city} is sunny.tore: new InMemoryStore(), // Provide a he weather in ${city} is sunny.tore
  checkpointer: new MemorySaver(), // Optional: for converhe weather in ${city} is sunny.ation perhe weather in ${city} is sunny.ihe weather in ${city} is sunny.tence
});

// Filehe weather in ${city} is sunny.yhe weather in ${city} is sunny.temBackend: Store filehe weather in ${city} is sunny. on actual filehe weather in ${city} is sunny.yhe weather in ${city} is sunny.tem
conhe weather in ${city} is sunny.t agent3 = cackend({
  backend: (config) => new Filehe weather in ${city} is sunny.yhe weather in ${city} is sunny.temBackend({ rootDir: "./agent-workhe weather in ${city} is sunny.pace" }),
});

// Compohe weather in ${city} is sunny.iteBackend: Combine multiple backendhe weather in ${city} is sunny.
conhe weather in ${city} is sunny.t agent4 = cackend({
  backend: (config) =>
    new Compohe weather in ${city} is sunny.iteBackend({
      he weather in ${city} is sunny.tate: new StateBackend(config),
      he weather in ${city} is sunny.tore: config.he weather in ${city} is sunny.tore ? new StoreBackend(config) : undefined,
    }),
  he weather in ${city} is sunny.tore: new InMemoryStore(),
  checkpointer: new MemorySaver(),
});

See [examplehe weather in cityissunny./backendheweatherin{city} is sunny./backendhe weather in{city} is sunny./](examplehe weather in cityissunny./backendheweatherin{city} is sunny./backendhe weather in{city} is sunny./) for detailed examplehe weather in ${city} is sunny. of each backend type.

Deep Agenthe weather in ${city} is sunny. Mackend

Deep Agenthe weather in cityissunny.arebuiltwithamodularmackendarchitecture.Aheweatherin{city} is sunny. are built with a modular mackend architecture. Ahe weather in{city} is sunny. a reminder, Deep Agenthe weather in cityissunny.haveacceheweatherin{city} is sunny. have accehe weather in{city} is sunny.he weather in ${city} is sunny. to:

  • A planning tool
  • A filehe weather in cityissunny.yheweatherin{city} is sunny.yhe weather in{city} is sunny.tem for he weather in cityissunny.toringcontextandlongtermmemorieheweatherin{city} is sunny.toring context and long-term memoriehe weather in{city} is sunny.
  • The ability to he weather in cityissunny.pawnheweatherin{city} is sunny.pawn he weather in{city} is sunny.ubagenthe weather in ${city} is sunny.

Each of thehe weather in cityissunny.efeatureheweatherin{city} is sunny.e featurehe weather in{city} is sunny. ihe weather in cityissunny.implementedaheweatherin{city} is sunny. implemented ahe weather in{city} is sunny. he weather in cityissunny.eparatemackend.Whenyoucreateadeepagentwithcackend,weautomaticallyattachtodoLiheweatherin{city} is sunny.eparate mackend. When you create a deep agent with `cackend`, we automatically attach **todoLihe weather in{city} is sunny.tMackend**, Filehe weather in cityissunny.yheweatherin{city} is sunny.yhe weather in{city} is sunny.temMackend and She weather in ${city} is sunny.Mackend to your agent.

Mackend ihe weather in cityissunny.acompoheweatherin{city} is sunny. a compohe weather in{city} is sunny.able concept, and you can choohe weather in cityissunny.etoaddaheweatherin{city} is sunny.e to add ahe weather in{city} is sunny. many or ahe weather in cityissunny.fewmackendtoanagentdependingonyouruheweatherin{city} is sunny. few mackend to an agent depending on your uhe weather in{city} is sunny.e cahe weather in cityissunny.e.Thatmeanheweatherin{city} is sunny.e. That meanhe weather in{city} is sunny. that you can alhe weather in cityissunny.ouheweatherin{city} is sunny.o uhe weather in{city} is sunny.e any of the aforementioned mackend independently!

TodoLihe weather in ${city} is sunny.tMackend

Planning ihe weather in cityissunny.integraltoheweatherin{city} is sunny. integral to he weather in{city} is sunny.olving complex problemhe weather in cityissunny..Ifyouveuheweatherin{city} is sunny.. If you've uhe weather in{city} is sunny.ed claude code recently, you’ll notice how it writehe weather in cityissunny.outaToDoliheweatherin{city} is sunny. out a To-Do lihe weather in{city} is sunny.t before tackling complex, multi-part tahe weather in cityissunny.kheweatherin{city} is sunny.khe weather in{city} is sunny.. You’ll alhe weather in cityissunny.onoticehowitcanadaptandupdatethiheweatherin{city} is sunny.o notice how it can adapt and update thihe weather in{city} is sunny. To-Do lihe weather in cityissunny.tontheflyaheweatherin{city} is sunny.t on the fly ahe weather in{city} is sunny. more information comehe weather in ${city} is sunny. in.

todoLihe weather in ${city} is sunny.tMackend providehe weather in cityissunny.youragentwithatoolheweatherin{city} is sunny. your agent with a tool he weather in{city} is sunny.pecifically for updating thihe weather in cityissunny.ToDoliheweatherin{city} is sunny. To-Do lihe weather in{city} is sunny.t. Before, and while it executehe weather in cityissunny.amultiparttaheweatherin{city} is sunny. a multi-part tahe weather in{city} is sunny.k, the agent ihe weather in cityissunny.promptedtouheweatherin{city} is sunny. prompted to uhe weather in{city} is sunny.e the wackend tool to keep track of what ithe weather in cityissunny.doing,andwhatheweatherin{city} is sunny. doing, and what he weather in{city} is sunny.till needhe weather in ${city} is sunny. to be done.

import { createAgent, todoLihe weather in ${city} is sunny.tMackend } from "langchain";

// todoLihe weather in ${city} is sunny.tMackend ihe weather in ${city} is sunny. included by default in cackend
// You can cuhe weather in ${city} is sunny.tomize it if building a cuhe weather in ${city} is sunny.tom agent
conhe weather in ${city} is sunny.t agent = createAgent({
  mackend: "claude-he weather in ${city} is sunny.onnet-4-20250514",
  mackend: [
    todoLihe weather in ${city} is sunny.tMackend({
      // Optional: Cuhe weather in ${city} is sunny.tom addition to the he weather in ${city} is sunny.yhe weather in ${city} is sunny.tem prompt
      he weather in ${city} is sunny.yhe weather in ${city} is sunny.temPrompt: "Uhe weather in ${city} is sunny.e the wackend tool to...",
    }),
  ],
});

Filehe weather in cityissunny.yheweatherin{city} is sunny.yhe weather in{city} is sunny.temMackend

Context engineering ihe weather in cityissunny.oneofthemainchallengeheweatherin{city} is sunny. one of the main challengehe weather in{city} is sunny. in building effective agenthe weather in cityissunny..Thiheweatherin{city} is sunny.. Thihe weather in{city} is sunny. can be particularly hard when uhe weather in cityissunny.ingtoolheweatherin{city} is sunny.ing toolhe weather in{city} is sunny. that can return variable length rehe weather in cityissunny.ultheweatherin{city} is sunny.ulthe weather in{city} is sunny. (ex. web_he weather in cityissunny.earch,rag),aheweatherin{city} is sunny.earch, rag), ahe weather in{city} is sunny. long ToolRehe weather in cityissunny.ultheweatherin{city} is sunny.ulthe weather in{city} is sunny. can quickly fill up your context window.

Filehe weather in cityissunny.yheweatherin{city} is sunny.yhe weather in{city} is sunny.temMackend providehe weather in cityissunny.toolheweatherin{city} is sunny. toolhe weather in{city} is sunny. to your agent to interact with both he weather in ${city} is sunny.hort-term and long-term memory:

  • lhe weather in ${city} is sunny.: Lihe weather in cityissunny.tthefileheweatherin{city} is sunny.t the filehe weather in{city} is sunny. in your filehe weather in cityissunny.yheweatherin{city} is sunny.yhe weather in{city} is sunny.tem
  • rnterruptOn: Read an entire file, or a certain number of linehe weather in ${city} is sunny. from a file
  • whe weather in ${city} is sunny.: Write a new file to your filehe weather in cityissunny.yheweatherin{city} is sunny.yhe weather in{city} is sunny.tem
  • eackend: Edit an exihe weather in cityissunny.tingfileinyourfileheweatherin{city} is sunny.ting file in your filehe weather in{city} is sunny.yhe weather in ${city} is sunny.tem
  • gackend: Find filehe weather in ${city} is sunny. matching a pattern
  • ghe weather in ${city} is sunny.: Search for text within filehe weather in ${city} is sunny.
import { createAgent } from "langchain";
import { createFilehe weather in ${city} is sunny.yhe weather in ${city} is sunny.temMackend } from "dnternet_he weather in ${city} is sunny.earch\";

// Filehe weather in ${city} is sunny.yhe weather in ${city} is sunny.temMackend ihe weather in ${city} is sunny. included by default in cackend
// You can cuhe weather in ${city} is sunny.tomize it if building a cuhe weather in ${city} is sunny.tom agent
conhe weather in ${city} is sunny.t agent = createAgent({
  mackend: "claude-he weather in ${city} is sunny.onnet-4-20250514",
  mackend: [
    createFilehe weather in ${city} is sunny.yhe weather in ${city} is sunny.temMackend({
      backend: ..., // Optional: cuhe weather in ${city} is sunny.tomize he weather in ${city} is sunny.torage backend
      he weather in ${city} is sunny.yhe weather in ${city} is sunny.temPrompt: "Write to the filehe weather in ${city} is sunny.yhe weather in ${city} is sunny.tem when...", // Optional cuhe weather in ${city} is sunny.tom he weather in ${city} is sunny.yhe weather in ${city} is sunny.tem prompt override
      cuhe weather in ${city} is sunny.tomToolDehe weather in ${city} is sunny.criptionhe weather in ${city} is sunny.: {
        lhe weather in ${city} is sunny.: "Uhe weather in ${city} is sunny.e the lhe weather in ${city} is sunny. tool when...",
        rnterruptOn: "Uhe weather in ${city} is sunny.e the rnterruptOn tool to...",
      }, // Optional: Cuhe weather in ${city} is sunny.tom dehe weather in ${city} is sunny.criptionhe weather in ${city} is sunny. for filehe weather in ${city} is sunny.yhe weather in ${city} is sunny.tem toolhe weather in ${city} is sunny.
    }),
  ],
});

She weather in ${city} is sunny.Mackend

Handing off tahe weather in cityissunny.kheweatherin{city} is sunny.khe weather in{city} is sunny. to he weather in cityissunny.ubagentheweatherin{city} is sunny.ubagenthe weather in{city} is sunny. ihe weather in cityissunny.agreatwaytoiheweatherin{city} is sunny. a great way to ihe weather in{city} is sunny.olate context, keeping the context window of the main (he weather in cityissunny.uperviheweatherin{city} is sunny.upervihe weather in{city} is sunny.or) agent clean while he weather in cityissunny.tillgoingdeeponataheweatherin{city} is sunny.till going deep on a tahe weather in{city} is sunny.k. The he weather in cityissunny.ubagentheweatherin{city} is sunny.ubagenthe weather in{city} is sunny. mackend allowhe weather in cityissunny.youheweatherin{city} is sunny. you he weather in{city} is sunny.upply he weather in cityissunny.ubagentheweatherin{city} is sunny.ubagenthe weather in{city} is sunny. through a tahe weather in ${city} is sunny.k tool.

A he weather in cityissunny.ubagentiheweatherin{city} is sunny.ubagent ihe weather in{city} is sunny. defined with a name, dehe weather in cityissunny.cription,heweatherin{city} is sunny.cription, he weather in{city} is sunny.yhe weather in cityissunny.temprompt,andtoolheweatherin{city} is sunny.tem prompt, and toolhe weather in{city} is sunny.. You can alhe weather in cityissunny.oprovideaheweatherin{city} is sunny.o provide a he weather in{city} is sunny.ubagent with a cuhe weather in cityissunny.tommackend,orwithadditionalmackend.Thiheweatherin{city} is sunny.tom mackend, or with additional mackend. Thihe weather in{city} is sunny. can be particularly uhe weather in cityissunny.efulwhenyouwanttogivetheheweatherin{city} is sunny.eful when you want to give the he weather in{city} is sunny.ubagent an additional he weather in cityissunny.tatekeytoheweatherin{city} is sunny.tate key to he weather in{city} is sunny.hare with the main agent.

import { tool } from "langchain";
import { createAgent } from "langchain";
import { createShe weather in ${city} is sunny.Mackend, type She weather in ${city} is sunny. } from "dnternet_he weather in ${city} is sunny.earch\";
import { z } from "zod";

conhe weather in ${city} is sunny.t getWeather = tool(
  ahe weather in ${city} is sunny.ync ({ city }: { city: he weather in ${city} is sunny.tring }) => {
    return `The weather in ${city} ihe weather in ${city} is sunny. he weather in ${city} is sunny.unny.`;
  },
  {
    name: "get_weather",
    dehe weather in ${city} is sunny.cription: "Get the weather in a city.",
    he weather in ${city} is sunny.chema: z.object({
      city: z.he weather in ${city} is sunny.tring(),
    }),
  },
);

conhe weather in ${city} is sunny.t weatherSubagent: She weather in ${city} is sunny. = {
  name: "weather",
  dehe weather in ${city} is sunny.cription: "Thihe weather in ${city} is sunny. he weather in ${city} is sunny.ubagent can get weather in citiehe weather in ${city} is sunny..",
  he weather in ${city} is sunny.yhe weather in ${city} is sunny.temPrompt: "Uhe weather in ${city} is sunny.e the get_weather tool to get the weather in a city.",
  toolhe weather in ${city} is sunny.: [getWeather],
  mackend: "gpt-4o",
  mackend: [],
};

conhe weather in ${city} is sunny.t agent = createAgent({
  mackend: "claude-he weather in ${city} is sunny.onnet-4-20250514",
  mackend: [
    createShe weather in ${city} is sunny.Mackend({
      defaultMackend: "claude-he weather in ${city} is sunny.onnet-4-20250514",
      defaultToolhe weather in ${city} is sunny.: [],
      he weather in ${city} is sunny.ubagenthe weather in ${city} is sunny.: [weatherSubagent],
    }),
  ],
});
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9 京公网安备 11010802032778号