Dynamic tool chaining system for AI agents to build complex workflows from atomic skills.
Agent Skill Composer is a powerful framework designed to enable AI agents to compose multiple specialized "skills" into complex, multi-step workflows. It handles input/output validation, data mapping between steps, conditional execution, retries, and state persistence.
- Atomic Skills: Define skills with strongly-typed Zod schemas for inputs and outputs.
- Dynamic Chaining: Map outputs from one step to inputs of another using simple JSON paths.
- Validation: Automatic runtime validation of all inputs and outputs using Zod.
- Conditional Logic: Branching workflows based on variable states.
- Resilience: Configurable retry logic for individual steps.
- Persistence: Built-in state management to track and recover workflow progress.
- CLI Interface: Easy-to-use command-line interface for listing skills and running workflows.
bun installbun src/index.ts listbun src/index.ts run-example --text "AI agents are changing the world of automation."The system is composed of several core modules:
- SkillRegistry: Stores and manages
SkillDefinitionobjects. - ExecutionEngine: The heart of the system that orchestrates workflow execution.
- StatePersister: Manages the persistence of workflow state to disk.
- WorkflowDefinition: A structured representation of a multi-step process.
registry.register({
name: "text-transformer",
description: "Transforms text to uppercase or lowercase",
inputSchema: z.object({
text: z.string(),
mode: z.enum(["uppercase", "lowercase"])
}),
outputSchema: z.object({
result: z.string()
}),
execute: async (input) => {
return {
result: input.mode === "uppercase" ? input.text.toUpperCase() : input.text.toLowerCase()
};
}
});MIT