Skip to main content

Planner API

Planner API

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

const client = new CodeBoltClient();

Quick Reference

MethodDescription
createTaskCreates a new task in the planner.
createTasksFromMarkdownBulk-creates tasks by parsing a markdown document.
deleteTaskDeletes a planner task permanently.
exportMarkdownExports the current planner tasks as a markdown document.
getRetrieves the planner overview with aggregated status information.
getAgentsRetrieves all agents registered in the planner.
getAgentTasksRetrieves all tasks assigned to a specific agent.
updateTaskUpdates an existing planner task.

Methods


createTask

client.planner.createTask(data: CreatePlannerTaskRequest): Promise<PlannerTask>

Creates a new task in the planner.

Adds a task with a title, description, and optional agent assignment. Tasks can have dependencies, priorities, and labels to organize complex project work.

ParameterTypeRequiredDescription
dataCreatePlannerTaskRequestYesThe task creation payload

Returns: Promise<PlannerTask> — A promise that resolves to the newly created planner task

Full reference →


createTasksFromMarkdown

client.planner.createTasksFromMarkdown(data: CreateTasksFromMarkdownRequest): Promise<PlannerTask[]>

Bulk-creates tasks by parsing a markdown document.

Parses a markdown-formatted task list (using checkboxes, headings, and lists) and creates individual planner tasks from it. This enables rapid task creation from planning documents or specifications.

ParameterTypeRequiredDescription
dataCreateTasksFromMarkdownRequestYesThe request containing the markdown content to parse

Returns: Promise<PlannerTask[]> — A promise that resolves to an array of the newly created tasks

Full reference →


deleteTask

client.planner.deleteTask(taskId: string): Promise<unknown>

Deletes a planner task permanently.

Removes a task from the planner. This action cannot be undone. Consider updating the task status to "cancelled" instead if you want to preserve a record of the work.

ParameterTypeRequiredDescription
taskIdstringYesThe unique identifier of the task to delete

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

Full reference →


exportMarkdown

client.planner.exportMarkdown(params?: ExportMarkdownParams): Promise<unknown>

Exports the current planner tasks as a markdown document.

Generates a markdown-formatted representation of all tasks, organized by agent or status. Useful for creating reports, sharing progress externally, or backing up the current plan.

ParameterTypeRequiredDescription
paramsExportMarkdownParamsNoOptional parameters to control which tasks are exported and formatting

Returns: Promise<unknown> — A promise that resolves to the markdown content

Full reference →


get

client.planner.get(): Promise<PlannerOverview>

Retrieves the planner overview with aggregated status information.

Returns a high-level summary of the planner state including total tasks, completion statistics, and agent utilization. Use this for dashboard views and progress monitoring.

No parameters.

Returns: Promise<PlannerOverview> — A promise that resolves to the planner overview data

Full reference →


getAgents

client.planner.getAgents(): Promise<PlannerAgent[]>

Retrieves all agents registered in the planner.

Returns the list of agents that have been assigned tasks or are available for task assignment. Each agent includes its current workload and assignment information.

No parameters.

Returns: Promise<PlannerAgent[]> — A promise that resolves to an array of planner agents

Full reference →


getAgentTasks

client.planner.getAgentTasks(agentId: string): Promise<PlannerTask[]>

Retrieves all tasks assigned to a specific agent.

Returns the task list for a given agent, allowing you to see what work is queued, in progress, or completed for that agent.

ParameterTypeRequiredDescription
agentIdstringYesThe unique identifier of the agent whose tasks to retrieve

Returns: Promise<PlannerTask[]> — A promise that resolves to an array of tasks assigned to the agent

Full reference →


updateTask

client.planner.updateTask(taskId: string, data: UpdatePlannerTaskRequest): Promise<PlannerTask>

Updates an existing planner task.

Modifies task properties such as status, assignment, priority, or description. Use this to transition tasks through their lifecycle (e.g., pending to in-progress to completed).

ParameterTypeRequiredDescription
taskIdstringYesThe unique identifier of the task to update
dataUpdatePlannerTaskRequestYesThe fields to update on the task

Returns: Promise<PlannerTask> — A promise that resolves to the updated planner task

Full reference →