← Back to projects

Case study · AI workflow orchestration

AgentFlow

A multi-tenant AI workflow orchestrator with 6 node types, 4 trigger modes, conditional routing, human approval pause/resume, live GraphQL status, and Gemini execution.

AgentFlow · workflow execution
01 · AIGemini LLMAI execution
→
02 · LogicConditionalbranch routing
→
03 · APIHTTP requestexternal integration
04 · HumanApprovalpause / resume
→
05 · DataPersistPostgreSQL state
→
06 · LiveStatusexecution update
GraphQL status keeps execution state visible while the workflow progresses.

The problem

AI workflows need more than a visual builder.

The system needed to execute different kinds of workflow steps, branch conditionally, pause when human approval was required, preserve state, and show execution status while keeping organization access scoped correctly.

What I built

A workflow engine around six node types and four trigger modes.

01

Workflow execution

Built 6 node types with conditional routing and external API/LLM execution.

02

Human approval

Implemented approval pause/resume so a workflow can stop for a decision and then continue.

03

Live status

Used GraphQL status updates to make workflow execution observable in the interface.

04

Multiple triggers

Supported 4 trigger modes for starting workflow execution.

Architecture

Application, identity, GraphQL, workflow state, and AI execution work as one system.

Next.jsworkflow interface
→
Nhostidentity & backend services
→
Hasura / GraphQLdata access & live status
→
PostgreSQL + Geminiworkflow state & AI execution

Engineering decisions

Specific controls are more useful than broad security claims.

Organization-scoped RBAC

Hasura and Nhost are used to keep workflow access scoped by organization and role.

Retries & quotas

Retry handling and quota accounting are part of the execution model rather than being left to the interface.

Webhook security

Webhook security is handled as part of the trigger path for externally initiated workflows.

Proof of work

The project can be reviewed as a live application and as source code.

The live deployment demonstrates workflow creation and execution, while the GitHub repository provides the implementation for the application, backend workflow logic, and supporting configuration.

Next case study

AksharaCheck

View project →