getAgent
codebolt.agent.getAgent(task: string): Promise<any>
Retrieves an agent based on the specified task.
Parameters
Name | Type | Description |
---|---|---|
task | string | The 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);