CrewTool
Defined in: packages/agentic-control/src/crews/crew-tool.ts:92
Crew tool for invoking agentic-crew from TypeScript
Examples
Section titled “Examples”const crewTool = new CrewTool();
// List available crewsconst crews = await crewTool.listCrews();
// Run a crewconst result = await crewTool.invokeCrew({ package: 'otterfall', crew: 'game_builder', input: 'Create a QuestComponent',});import { tool } from 'ai';import { z } from 'zod';
const crewTool = new CrewTool();
export const invokeCrewTool = tool({ description: 'Delegate a task to a specialized AI crew', parameters: z.object({ package: z.string(), crew: z.string(), input: z.string(), }), execute: async ({ package: pkg, crew, input }) => { const result = await crewTool.invokeCrew({ package: pkg, crew, input }); if (!result.success) throw new Error(result.error); return result.output; },});Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new CrewTool(
config?):CrewTool
Defined in: packages/agentic-control/src/crews/crew-tool.ts:95
Parameters
Section titled “Parameters”config?
Section titled “config?”Returns
Section titled “Returns”CrewTool
Methods
Section titled “Methods”getCrewInfo()
Section titled “getCrewInfo()”getCrewInfo(
packageName,crewName):Promise<CrewInfo>
Defined in: packages/agentic-control/src/crews/crew-tool.ts:136
Get detailed information about a specific crew
Parameters
Section titled “Parameters”packageName
Section titled “packageName”string
crewName
Section titled “crewName”string
Returns
Section titled “Returns”Promise<CrewInfo>
invokeCrew()
Section titled “invokeCrew()”invokeCrew(
options):Promise<CrewResult>
Defined in: packages/agentic-control/src/crews/crew-tool.ts:167
Invoke a crew with the given input
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”Promise<CrewResult>
listCrews()
Section titled “listCrews()”listCrews():
Promise<CrewInfo[]>
Defined in: packages/agentic-control/src/crews/crew-tool.ts:108
List all available crews across all packages
Returns
Section titled “Returns”Promise<CrewInfo[]>