UNPKG

taskforce-aiagent

Version:

TaskForce is a modular, open-source, production-ready TypeScript agent framework for orchestrating AI agents, LLM-powered autonomous agents, task pipelines, dynamic toolchains, RAG workflows and memory/retrieval systems.

35 lines (34 loc) 1.45 kB
import { Tool } from "./baseTool.js"; export declare const ToolCategories: readonly ["search", "rag", "file", "api", "external", "vision", "langchain", "custom"]; export type ToolCategory = (typeof ToolCategories)[number] | string; export interface RegisteredTool { id: string; name: string; instance: Tool; category?: ToolCategory; source?: string; } export declare class ToolRegistry { /** * Register a tool in the global registry. * If a tool with the same id or name exists, return. */ static register(toolInstance: Tool, category?: ToolCategory, source?: string): void; /** Remove a tool by id or name. */ static unregister(key: string): void; /** * Get all registered tools, with optional filtering by category or source. */ static getAll(filter?: { category?: ToolCategory; source?: string; }): RegisteredTool[]; /** Get a tool by id or name. */ static getByKey(key: string): RegisteredTool | undefined; /** Reload/replace a tool (for hot reloading, development, or plugin updates). */ static update(toolInstance: Tool, category?: ToolCategory, source?: string): void; /** For external tool adapters (LangChain, CrewAI etc), mass-register tools in batch. */ static registerBatch(tools: Tool[], category?: ToolCategory, source?: string): void; /** For auto-discovery/documentation/UI. */ static listToolSummaries(): any[]; }