Skip to content

KitStream/task-pilot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TaskPilot Backend

An LLM-driven agent orchestrator backend built with Node.js, TypeScript, and Fastify.

Folder Structure

  • src/api/routes/: API endpoint definitions (Fastify plugins).
  • src/core/: Core logic including the Agent (orchestrator) and TaskEngine (scheduler/executor).
  • src/plugins/: Modular tool implementations (e.g., GitHub, Shell, etc.).
  • src/types/: Shared TypeScript interfaces and types.
  • src/utils/: Utility modules like llmService (OpenAI integration).
  • src/index.ts: Application entry point.

API Routes

  • POST /task/create: Create a task from a natural language prompt.
  • GET /task/list: List all tasks and their status.
  • GET /task/status/:id: Get detailed status and logs for a specific task.
  • POST /task/approve/:id: Approve a task for execution.

Task Lifecycle

  1. Prompt: User sends a natural language prompt to /task/create.
  2. Spec Generation: LLM (OpenAI) generates a structured TaskSpec (steps, tools, args).
  3. Pending Approval: Task is created with status pending_approval.
  4. Approval: Human calls /task/approve/:id.
  5. Execution: TaskEngine executes steps sequentially using registered plugins.
  6. Logging: Real-time logs are appended to the task object.

Tools (Plugins)

Tools are defined by the ITool interface and registered in the TaskEngine. Default tools:

  • shell: Executes local commands via child_process.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors