A TypeScript-based orchestration service using Temporal for managing AI agents and automated workflows.
- Temporal Workflows: Reliable, durable workflow execution
- GitHub Integration: Automated repository maintenance and webhook processing
- Claude AI Integration: Execute Claude commands in isolated Docker containers
- Scheduled Workflows: Cron-based scheduling for recurring tasks
- TypeScript: Full type safety with strict mode enabled
- Modern Tooling: ESLint, Prettier, Husky pre-commit hooks
├── src/
│ ├── activities/ # Temporal activities (GitHub, Claude integrations)
│ ├── workflows/ # Temporal workflow definitions
│ ├── workers/ # Worker processes
│ ├── client/ # Temporal client utilities
│ ├── schedules/ # Schedule management
│ ├── api/ # REST API endpoints
│ └── utils/ # Shared utilities
├── config/ # Configuration files
│ └── schedules.yml # Scheduled workflow definitions
└── test/ # Test files
- Node.js 18+
- Docker and Docker Compose
- GitHub Personal Access Token
- Anthropic API Key (for Claude integration)
- Clone the repository:
git clone https://github.com/intelligence-assist/temporal-orchestrator.git
cd temporal-orchestrator- Install dependencies:
npm install- Copy environment variables:
cp .env.example .env
# Edit .env with your tokens- Start Temporal server:
docker compose up -d temporal temporal-ui postgresql- Build the project:
npm run buildStart the API server:
npm run devStart the workers:
npm run worker:devdocker compose up -d- updateOrganizationReadme: Updates organization README with repository stats
- performHealthCheck: Checks repository health and creates issues for problems
- processGitHubWebhook: Processes GitHub webhook events and executes Claude commands
POST /api/orchestrate- Start a workflowPOST /api/webhook/github- GitHub webhook endpointGET /api/schedules- List scheduled workflowsPOST /api/schedules/reload- Reload schedule configurationGET /health- Health check
Configure scheduled workflows in config/schedules.yml:
schedules:
- id: update-org-readme
workflow: updateOrganizationReadme
cronExpression: "0 0 * * MON" # Every Monday
enabled: true
args:
organization: "intelligence-assist"
token: "${GITHUB_TOKEN}"npm run lint # Fix linting issues
npm run format # Format code with Prettier
npm run typecheck # Type check without buildingnpm test # Run tests
npm run test:watch # Run tests in watch mode
npm run test:coverage # Generate coverage report- Create a new repository in the intelligence-assist organization:
gh repo create intelligence-assist/temporal-orchestrator \
--public \
--description "Temporal-based orchestration service for AI agents" \
--clone- Push the code:
git add .
git commit -m "Initial commit: Temporal orchestrator with TypeScript"
git push -u origin mainAccess Temporal UI at http://localhost:8088 to monitor workflows, view execution history, and debug issues.
MIT