CopilotKit
Reference / core / enums

ToolCallStatus

Lifecycle states of a tool call as it streams in and executes.

Overview

ToolCallStatus describes where a tool call is in its lifecycle, from arguments still streaming in to a fully executed result. You encounter it when rendering or reacting to tool calls in a frontend tool handler or custom render logic.

Import

import { ToolCallStatus } from "@copilotkit/core";

Definition

enum ToolCallStatus {
  InProgress = "inProgress",
  Executing = "executing",
  Complete = "complete",
}

Members

InProgressinProgress

The tool call is still being received — its arguments are streaming in and are not yet complete.

Executingexecuting

Arguments have fully arrived and the tool handler is running.

Completecomplete

The handler has finished and a result is available.

Usage

import { ToolCallStatus } from "@copilotkit/core";

function renderToolCall(status: ToolCallStatus) {
  switch (status) {
    case ToolCallStatus.InProgress:
      return "Receiving arguments…";
    case ToolCallStatus.Executing:
      return "Running…";
    case ToolCallStatus.Complete:
      return "Done";
  }
}

Related