LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • Agent
  • Middleware
  • Backends
  • Sandboxes
  • Skills
  • Subagents
  • Types
Modal
Daytona
Deno
Node VFS
Sandbox Standard Tests
  • Vitest
⌘I

Chat LangChain

What can I help with?

Enter to send·Shift+Enter new line

Menu

OverviewAgentMiddlewareBackendsSandboxesSkillsSubagentsTypes
Modal
Daytona
Deno
Node VFS
Sandbox Standard Tests
Vitest
Language
Theme
JavaScriptdeepagentsnodeTaskEvent
Interface●Since v1.16

TaskEvent

Copy
interface TaskEvent

Properties

View source on GitHub
property
agent_name: string
property
run_id: string
property
status: "timeout" | "success" | "error" | "waiting" | "cancelled"
property
task_id: string

How an async subagent's task ended or paused, as reported to the agent that started it.

A notification message carries it as notification metadata with source "async_subagent"; read it with getNotificationMetadata(message)?.data. additional_kwargs.deepagents_notification also carries it; that key is deprecated.

This shape is experimental and subject to change.

The async subagent's name, as in the task's AsyncTask.agentName.

The subagent run that ended.

waiting means the subagent paused for input or approval; cancelled, that its run was cancelled on the server.

The task's ID (the subagent's thread).