Skip to main content

AgentExecutionPhases API

Agent Execution Phases API

import { CodeBoltClient } from '@codebolt/clientsdk';

const client = new CodeBoltClient();

Quick Reference

MethodDescription
createCreates a new execution phase.
deleteDeletes an execution phase.
getRetrieves a specific execution phase by its name.
getAllRetrieves all defined agent execution phases.
resetResets all agent execution phases to their default configuration.
updateUpdates an existing execution phase.

Methods


create

client.agentExecutionPhases.create(data: CreateAgentExecutionPhaseRequest): Promise<AgentExecutionPhase>

Creates a new execution phase.

Defines a new phase in the agent execution lifecycle. The phase will be available for agents to transition through during their execution.

ParameterTypeRequiredDescription
dataCreateAgentExecutionPhaseRequestYesThe phase creation payload

Returns: Promise<AgentExecutionPhase> — A promise that resolves to the newly created AgentExecutionPhase

Full reference →


delete

client.agentExecutionPhases.delete(name: string): Promise<unknown>

Deletes an execution phase.

Permanently removes the specified execution phase from the system. Agents will no longer transition through this phase.

ParameterTypeRequiredDescription
namestringYesThe unique name of the phase to delete

Returns: Promise<unknown> — A promise that resolves when the phase has been deleted

Full reference →


get

client.agentExecutionPhases.get(name: string): Promise<AgentExecutionPhase>

Retrieves a specific execution phase by its name.

Returns the full definition of a single phase including its configuration, order, and associated behavior.

ParameterTypeRequiredDescription
namestringYesThe unique name of the execution phase

Returns: Promise<AgentExecutionPhase> — A promise that resolves to the AgentExecutionPhase object

Full reference →


getAll

client.agentExecutionPhases.getAll(params?: Record<string, unknown>): Promise<AgentExecutionPhase[]>

Retrieves all defined agent execution phases.

Returns the complete list of execution phases that have been configured in the system.

ParameterTypeRequiredDescription
paramsRecord<string, unknown>NoOptional query parameters for filtering or pagination

Returns: Promise<AgentExecutionPhase[]> — A promise that resolves to an array of AgentExecutionPhase objects

Full reference →


reset

client.agentExecutionPhases.reset(data?: ResetAgentExecutionPhasesRequest): Promise<unknown>

Resets all agent execution phases to their default configuration.

Restores the built-in phase definitions, removing any custom phases and reverting modified ones to their original state.

ParameterTypeRequiredDescription
dataResetAgentExecutionPhasesRequestNoOptional configuration for the reset operation

Returns: Promise<unknown> — A promise that resolves when the reset is complete

Full reference →


update

client.agentExecutionPhases.update(name: string, data: UpdateAgentExecutionPhaseRequest): Promise<AgentExecutionPhase>

Updates an existing execution phase.

Modifies the configuration of an execution phase. Use this to change the phase description, ordering, or other properties.

ParameterTypeRequiredDescription
namestringYesThe unique name of the phase to update
dataUpdateAgentExecutionPhaseRequestYesThe fields to update on the phase

Returns: Promise<AgentExecutionPhase> — A promise that resolves to the updated AgentExecutionPhase

Full reference →