Skip to main content

getAgent

codebolt.agent.getAgent(task: string): Promise<any>
Retrieves an agent based on the specified task.

Parameters

NameTypeDescription
taskstringThe task for which an agent is needed.

Returns:

 Promise<any>
A promise that resolves with the agent details.

Example

// Example: Retrieving an agent for a task
const agentDetails = await codebolt.agent.getAgent("dataProcessing");
console.log("Agent Details:", agentDetails);