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
JavaScriptdeepagentsmiddlewareTaskEvent
Interface●Since v1.16

TaskEvent

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.

Copy
interface TaskEvent

Properties

property
agent_name: string

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

property
run_id: string

The subagent run that ended.

property
status: "timeout" | "success" | "error" | "waiting" | "cancelled"

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

property
task_id: string

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

View source on GitHub