A flexible, extensible framework for orchestrating multiple AI agents to solve complex tasks through coordinated prompt chaining and intelligent workflow management.
- Multi-Agent Coordination: Specialized agents (Planner, Executor, Validator, Router, Synthesizer)
- 4 Execution Strategies: Sequential, Parallel, Conditional, and DAG (Directed Acyclic Graph)
- Dynamic Task Generation: Agents can create follow-up tasks based on outputs
- Template-Based Prompts: Flexible prompt templates with variable substitution
- Agent Memory System: Short-term, long-term, and working memory for each agent
- Validation Framework: Custom validation rules for quality assurance
- Dependency Resolution: Automatic task ordering based on dependencies
- Fully Typed: Complete TypeScript implementation with comprehensive types
- Node.js 18.x or 20.x
- npm 9.x or higher
- TypeScript 5.x
# Clone the repository
git clone https://github.com/NeuralBlitz/agentic-prompt-orchestration.git
cd agentic-prompt-orchestration
# Install dependencies
npm install
# Build the project
npm run buildimport { createOrchestrationSystem } from './index';
// Initialize the system
const { templateEngine, orchestrator, agents } = createOrchestrationSystem();
// Load workflow configurations
const workflowConfig = require('./workflows.json');
templateEngine.loadFromJSON(workflowConfig);
// Create and register agents
const planner = agents.createPlanner({
id: 'planner-agent',
role: 'planner',
name: 'Task Planner',
description: 'Plans and organizes tasks',
capabilities: ['planning']
});
orchestrator.registerAgent(planner);
// Execute a workflow
const context = {
conversationId: 'session-001',
variables: { topic: 'AI Research' },
history: [],
state: {}
};
const results = await orchestrator.executeWorkflow('research-workflow', context);
console.log(results);- Complete Guide - Comprehensive documentation with examples
- Usage Guide - Practical patterns and best practices
- Architecture - System design and component interactions
# Run all tests
npm test
# Run tests with coverage
npm test -- --coverage
# Run tests in watch mode
npm test -- --watch# Run in development mode
npm run dev
# Run linter
npm run lint
# Format code
npm run format
# Build for production
npm run buildβββ types.ts # Type definitions
βββ PromptTemplateEngine.ts # Template rendering engine
βββ agents.ts # Agent implementations
βββ orchestrator.ts # Workflow orchestration
βββ index.ts # Main entry point
βββ example.ts # Example application
βββ workflows.json # Workflow configurations
βββ advanced-workflow.json # Advanced workflow example
βββ __tests__/ # Test files
β βββ PromptTemplateEngine.test.ts
βββ .github/
β βββ workflows/
β βββ ci.yml # GitHub Actions CI/CD
βββ README.md # This file
This project uses GitHub Actions for continuous integration and deployment:
- Build: Compiles TypeScript and creates distribution files
- Test: Runs unit tests with coverage reporting
- Lint: Checks code quality with ESLint and Prettier
- Multi-Node: Tests against Node.js 18.x and 20.x
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
const researchWorkflow = {
id: 'research-pipeline',
strategy: { type: 'dag', config: {} },
tasks: [
{ id: 'plan', agentId: 'planner' },
{ id: 'research', agentId: 'researcher', dependencies: ['plan'] },
{ id: 'validate', agentId: 'validator', dependencies: ['research'] },
{ id: 'synthesize', agentId: 'synthesizer', dependencies: ['validate'] }
]
};const contentWorkflow = {
id: 'content-creation',
strategy: { type: 'parallel', config: { maxConcurrency: 3 } },
tasks: [
{ id: 'intro', agentId: 'writer-1' },
{ id: 'body', agentId: 'writer-2' },
{ id: 'conclusion', agentId: 'writer-3' },
{ id: 'edit', agentId: 'editor', dependencies: ['intro', 'body', 'conclusion'] }
]
};Issue: βDependencies lock file is not foundβ
- Solution: Run
npm installto generatepackage-lock.json
Issue: βAgent not foundβ
- Solution: Ensure agents are registered before executing workflows
Issue: βCircular dependency detectedβ
- Solution: Review task dependencies to ensure they form a DAG
This project is licensed under the MIT License - see the file for details.
- Built with TypeScript for type safety
- Inspired by multi-agent AI systems research
- Designed for extensibility and real-world use cases
- GitHub: @NeuralBlitz
- Issues: GitHub Issues
Built with β€οΈ for the AI agent community