Skip to main content

workflow_templates

Workflow definitions with agent execution steps.
type workflow_templates {
  id: ID!
  name: String!
  description: String
  agent: ID!
  steps_json: JSON
  variables: [String]     # Extracted from steps_json
  createdAt: Date!
  updatedAt: Date!
  RBAC: RBACData
}
Example query:
query {
  workflow_templateById(id: "workflow-123") {
    id
    name
    agent
    variables
  }
}

Workflow Execution

Workflows are executed through mutations with variable substitution:
mutation {
  runWorkflow(
    id: "workflow-123"
    variables: {
      customerName: "John Doe"
      orderId: "12345"
    }
  ) {
    result
    job
    metadata
  }
}

Workflow Scheduling

Workflows can be scheduled with cron expressions:
mutation {
  upsertWorkflowSchedule(
    workflow: "workflow-123"
    schedule: "0 9 * * *"  # Daily at 9 AM
  ) {
    status
    job
  }
}