Skip to content

Latest commit

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Workflow - Human-AI Workflow Orchestration Platform

AI agents and human operators collaborate on complex workflows. AI handles routine tasks autonomously, escalating to humans when confidence is low. Full audit trail on every action.

Local Demo (5 minutes)

Prerequisites

  • Java 21 (brew install openjdk@21)
  • Docker (for PostgreSQL)
  • Ollama (optional, for AI agent features): brew install ollama
  • Node.js 20+ (for frontend)

1. Start PostgreSQL

docker compose up -d db

2. Generate secrets and start the backend

cd backend
# Generate a JWT secret (one-time)export WORKFLOW_JWT_SECRET=$(openssl rand -base64 64 | tr -d '\n')export WORKFLOW_DB_PASSWORD=workflow
# Start (auto-seeds demo data on first run)
./mvnw spring-boot:run -Dspring-boot.run.profiles=dev

The backend starts on http://localhost:8000. On first run with the dev profile, it automatically creates demo users and two sample workflows.

3. Start the frontend

cd frontend
npm install
npm run dev

Dashboard at http://localhost:5173.

4. (Optional) Start Ollama for AI agent processing

ollama pull llama3.2
ollama serve

Without Ollama running, you can still use the full UI, create workflows, assign tasks, and work through the human review flow. AI agent tasks will fail gracefully and escalate to human review.

Demo Accounts

EmailPasswordRole
admin@workflow.devadmin123Admin
manager@workflow.devmanager123Manager
operator1@workflow.devoperator123Operator
operator2@workflow.devoperator123Operator

Try It

  1. Log in as admin@workflow.dev
  2. Go to Workflows, find "Document Review Pipeline"
  3. Click Run, provide some context (any JSON, e.g. {"document": "loan_app.pdf"})
  4. Watch the AI agent pick up the task (if Ollama is running) or see it in the task queue
  5. Log in as operator1@workflow.dev to see the task inbox
  6. Review the AI's reasoning, approve or correct its work
  7. Check the Audit page to see the full trail

Architecture

React Dashboard --> Spring Boot API --> PostgreSQL
|
Spring AI Agent
(Ollama / Anthropic / OpenAI)
ComponentTechnologyPurpose
BackendJava 21, Spring Boot 3.4, Spring AI 1.0REST API, workflow engine, auth
AI AgentsSpring AI + ChatClientTask analysis, document processing, HITL
DatabasePostgreSQL 16, FlywaySystem of record, append-only audit log
AuthSpring Security, JWT, BCrypt-12Authentication, rate limiting
FrontendReact 18, Vite, TailwindDashboard, task inbox, workflow management
DocumentsApache PDFBox, TesseractPDF extraction, OCR

Commands

# Build (compile + tests)cd backend && ./mvnw clean install
# Run tests onlycd backend && ./mvnw test# Run locallycd backend && WORKFLOW_JWT_SECRET=<secret> ./mvnw spring-boot:run -Dspring-boot.run.profiles=dev
# Full stack via Docker
WORKFLOW_DB_PASSWORD=<secret> WORKFLOW_JWT_SECRET=<secret> docker compose up

API Endpoints

MethodPathDescription
POST/api/auth/loginLogin, returns JWT
POST/api/auth/registerRegister new user
GET/api/auth/meCurrent user info
GET/api/workflowsList workflow definitions
POST/api/workflowsCreate workflow
POST/api/workflows/{id}/runStart a workflow run
GET/api/workflows/runsList all runs
GET/api/tasks/inboxYour assigned tasks
GET/api/tasks/queueUnassigned tasks
POST/api/tasks/{id}/completeComplete a task
POST/api/tasks/{id}/escalateEscalate to human
POST/api/tasks/{id}/feedbackApprove/reject/correct
GET/api/analytics/dashboardReal-time metrics
GET/api/auditQuery audit log
GET/actuator/healthHealth check
GET/actuator/prometheusMetrics export

Project Structure

workflow/
├── backend/ # Java 21 + Spring Boot
│ ├── src/main/java/com/workflow/
│ │ ├── config/ # Security, AI, CORS, data seeder
│ │ ├── security/ # JWT, rate limiting, auth filter
│ │ ├── domain/ # Entities, repositories, business logic
│ │ │ ├── workflow/ # DAG engine, conditional branching
│ │ │ ├── task/ # State machine, skill-based routing
│ │ │ ├── audit/ # Append-only audit log
│ │ │ └── document/ # Document storage
│ │ ├── agent/ # Spring AI task agent, worker
│ │ └── api/ # REST controllers, DTOs, error handling
│ └── src/test/ # 36 tests (domain, security, agent)
├── frontend/ # React 18 + Vite + Tailwind
│ └── src/pages/ # Dashboard, Inbox, Tasks, Workflows, Audit
├── docker-compose.yml
└── CLAUDE.md # Development conventions

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages