Skip to content

CrewTool

Defined in: packages/agentic-control/src/crews/crew-tool.ts:92

Crew tool for invoking agentic-crew from TypeScript

const crewTool = new CrewTool();
// List available crews
const crews = await crewTool.listCrews();
// Run a crew
const 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;
},
});

new CrewTool(config?): CrewTool

Defined in: packages/agentic-control/src/crews/crew-tool.ts:95

CrewToolConfig

CrewTool

getCrewInfo(packageName, crewName): Promise<CrewInfo>

Defined in: packages/agentic-control/src/crews/crew-tool.ts:136

Get detailed information about a specific crew

string

string

Promise<CrewInfo>


invokeCrew(options): Promise<CrewResult>

Defined in: packages/agentic-control/src/crews/crew-tool.ts:167

Invoke a crew with the given input

InvokeCrewOptions

Promise<CrewResult>


listCrews(): Promise<CrewInfo[]>

Defined in: packages/agentic-control/src/crews/crew-tool.ts:108

List all available crews across all packages

Promise<CrewInfo[]>