ToolKind

@Serializable
sealed interface ToolKind(source)

The protocol-independent meaning of a tool call. Backends map their protocol onto it (an on-device tool declares it, AG-UI SUBAGENT_* runs and the Pydantic AI Harness tool conventions are translated in core), so UI elements only ever look at this.

Inheritors

Types

Link copied to clipboard
@Serializable
@SerialName(value = "delegation")
data class Delegation(val agent: String? = null, val task: String? = null) : ToolKind

Hands task to another agent (agent); its run arrives as ToolPart.subagent.

Link copied to clipboard
@Serializable
@SerialName(value = "function")
data object Function : ToolKind

An ordinary function call.

Link copied to clipboard
@Serializable
@SerialName(value = "skill")
data class Skill(val skill: String? = null) : ToolKind

Loads a skill's instructions (skill is its name).