Skip to content

NeuralBlitz/atlas-platform

Repository files navigation

Agentic Prompt Orchestration Architecture

TypeScript License: MIT

A flexible, extensible framework for orchestrating multiple AI agents to solve complex tasks through coordinated prompt chaining and intelligent workflow management.

πŸš€ Features

  • 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

πŸ“‹ Prerequisites

  • Node.js 18.x or 20.x
  • npm 9.x or higher
  • TypeScript 5.x

πŸ› οΈ Installation

# 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 build

πŸƒ Quick Start

import { 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);

πŸ“– Documentation

πŸ§ͺ Testing

# Run all tests
npm test

# Run tests with coverage
npm test -- --coverage

# Run tests in watch mode
npm test -- --watch

πŸ”§ Development

# Run in development mode
npm run dev

# Run linter
npm run lint

# Format code
npm run format

# Build for production
npm run build

πŸ“ Project Structure

β”œβ”€β”€ 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

πŸ”„ CI/CD Pipeline

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

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“ Example Workflows

Research Pipeline

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'] }
  ]
};

Content Creation

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'] }
  ]
};

πŸ› Troubleshooting

Common Issues

Issue: β€œDependencies lock file is not found”

  • Solution: Run npm install to generate package-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

πŸ“œ License

This project is licensed under the MIT License - see the file for details.

πŸ™ Acknowledgments

  • Built with TypeScript for type safety
  • Inspired by multi-agent AI systems research
  • Designed for extensibility and real-world use cases

πŸ“§ Contact


Built with ❀️ for the AI agent community

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors