Workflows
- graal Agentic Platform
- Version 0.30 (actuelle)
- Open source · Apache 2.0
- Source : graalsystems/tranibor@v0.30.1
A workflow is the process a project follows: the states a work item goes through, and who moves it from one to the next. This page shows how to read one, change it safely, and route each request to the right one.
What you will be able to do
- Read a workflow in the console as a graph, as steps in plain words, or as YAML.
- Adopt a workflow from the library, or start a new one.
- Change a workflow and publish a new version without disturbing work in progress.
- Write a workflow in YAML and validate it before you publish it.
- Route each incoming request to the right workflow.
Before you start
Section intitulée « Before you start »- To read workflows: any role on the project.
- To publish or change one, and to change the routing: Project owner.
Read a workflow
Section intitulée « Read a workflow »Open the project, then Workflows in the sidebar. Each workflow shows its Active version, its Open items and how many requests were Routed here; one of them is marked Default.
Open a workflow. It has four tabs:
| Tab | What it shows |
|---|---|
| Graph | The map: one lane per kind of actor, the states, the transitions between them. Use the keyboard: Tab reaches the states, the arrow keys follow the transitions, Enter opens a state |
| Steps | Each transition in plain words: who acts, what it produces, the gates, what happens on failure |
| YAML | The definition itself, validated as you type |
| History | Every published version, who published it, and a comparison between two versions |
The same plain-words reading, from a file on your machine:
tranibor workflow show --process .tranibor/workflow.yamlWho acts at each step
Section intitulée « Who acts at each step »Each transition names its actor with by:
- an agent does the work in a sandbox, under a budget, and the transition’s gates check the result;
- a person of a group decides: the work item waits in a state of kind
wait(see Decisions); - the system, the platform itself, does what the transition says it
does:open_propens the pull request,merge_prmerges it.
When an agent step fails its gates, on_fail sends it back a few times (max_attempts), then to the
state named by escalate_to, where a person takes over.
The platform merges the commit that the gates of the merging transition judged, and no other. A gate
on an earlier step judged the branch as it stood then: to have no_secrets, diff_size_max or
docs_updated hold on what is merged, declare them on the transition that merges as well. The
workflows of the library do. scope_respected checks what one agent step wrote: on the transition
that merges, write { name: scope_respected, params: { over: work_item } }, which checks the whole
change instead — nothing under a path the project’s policy forbids, and nothing outside paths if
you add them.
Adopt a workflow from the library
Section intitulée « Adopt a workflow from the library »- On the Workflows page, press Browse the library.
- Filter by Needs no repository or Delivers code from a repository, and open an entry to read it.
- Press Adopt next to the entry, give the workflow its name in the project, and press Adopt as. The workflow is copied into the project, and the agents it names are installed in the organisation if they are missing.
A copy is a copy: later changes to the library do not reach the project on their own.
Start a new workflow
Section intitulée « Start a new workflow »- On the Workflows page, press New workflow.
- Type a Name (lowercase letters, digits and dashes, for example
offboarding). - Under Start from, pick a starting point.
- Tick Make it the project’s default workflow if requests that match no rule should go there.
- Press Publish.
Change a workflow
Section intitulée « Change a workflow »- Open the workflow. Change it on the Graph (Add a step, or open a state to edit it), on the Steps tab, or in YAML. The three tabs are views of one draft.
- Read the Validation card: it shows each error with its line. Nothing can be published while an error remains.
- Press Publish v2 (the number is the next version). Discard throws the draft away.
A work item in progress finishes on the version it started with. Only new work items take the new version. If someone published while you edited, the console says so and offers to publish over their version; theirs stays in the History.
Write a workflow in YAML
Section intitulée « Write a workflow in YAML »Here is a small development workflow: an agent fixes, another tests, the platform opens the pull request, a maintainer approves it, the platform merges it when the checks are green.
apiVersion: tranibor/v1kind: Workflowmetadata: name: fix-with-review version: 1 description: "An agent fixes, another tests, a maintainer approves the pull request, the platform merges."actors: developer: { type: agent, role: implement, agent: developer, model: "profile:standard" } tester: { type: agent, role: verify, agent: tester, model: "profile:standard" } platform: { type: system } maintainers: { type: human, group: maintainers, sla_hours: 24 }states: todo: { display: To do, kind: wait } implemented: { display: Implemented } tested: { display: Tested } in_review: { display: Pull request to approve, kind: wait } approved: { display: Approved } merged: { display: Merged, terminal: true } needs_human: { display: Needs a human, kind: wait } abandoned: { display: Abandoned, terminal: true, outcome: cancelled }transitions: - id: t-implement from: todo to: implemented by: developer inputs: [human_feedback] gates: [scope_respected, no_secrets] on_fail: { to: todo, max_attempts: 3, escalate_to: needs_human } - id: t-test from: implemented to: tested by: tester outputs: [test_report] gates: [evidence_present] on_fail: { to: todo, max_attempts: 2, escalate_to: needs_human } - id: t-open-pr from: tested to: in_review by: platform does: open_pr - id: t-approve from: in_review to: approved by: maintainers on_reject: todo timeout_hours: 72 - id: t-merge from: approved to: merged by: platform does: merge_pr gates: [ci_green, no_secrets, { name: scope_respected, params: { over: work_item } }] on_fail: { to: approved, max_attempts: 2, escalate_to: needs_human } - id: t-abandon from: needs_human to: abandoned by: maintainersdefaults: from_any_agent_state: on_question: needs_human on_budget_exceeded: needs_human on_timeout: needs_human needs_human: on_answer: resume on_abandon: abandonedWhat to notice:
- States with
kind: waitwait for a person.terminal: trueends the work item;outcome: cancelledshows it in grey rather than green. agent: developernames an agent of the organisation’s registry. See Agents.- Gates are checks the platform runs, not instructions:
scope_respectedcompares the diff with the allowed paths,evidence_presentrequires tests the platform saw run,ci_greenreads the pull request’s checks. on_reject: todosends the work back when the maintainer presses Send back, with their reason ashuman_feedbackfor the developer.defaultssay where a work item goes when an agent asks a question, runs out of budget or time, and what an answer does.
Validate it before you publish. Validation is local and needs no instance:
tranibor workflow validate fix-with-review.yamlThen publish it as the next version of that workflow in the project, and list the result:
tranibor workflow push billing-api fix-with-review.yamltranibor workflow list billing-apiThe validator refuses more than syntax: a state no transition reaches, a retry that could loop forever, an unknown gate, a gate with nothing to check, a condition on an output nobody produces.
Choose the next step from what the agent answered
Section intitulée « Choose the next step from what the agent answered »A transition can depend on the outputs of the step before it. The first transition whose when holds
is taken; the one without when is the default:
transitions: - { id: t-develop, from: todo, to: checkpoint, by: developer, outputs: [done, confidence] } - { id: t-again, from: checkpoint, to: todo, by: platform, when: { done: false } } - { id: t-unsure, from: checkpoint, to: unsure, by: platform, when: { confidence: { lt: 0.6 } } } - { id: t-finish, from: checkpoint, to: done, by: platform }Route requests to the right workflow
Section intitulée « Route requests to the right workflow »A project can have several workflows. On the Workflows page, the Routing card decides which one a new request takes:
- Pick a Strategy: Labels and types (rules only), Rules, then a small model, or A small model.
- Add rules: Labelled (any of), Labelled (all of) or Of type, and the workflow it Goes to. The first matching rule wins.
- Choose the Default workflow, for a request that matches no rule.
- Check the result in Try the routing with a title, a description and labels, then press Save the routing.
A work item that landed in the wrong workflow can be moved: open it and press Change workflow.
What can go wrong
Section intitulée « What can go wrong »| Message | What it means |
|---|---|
| “A workflow named … already exists” | Pick another name, or open that workflow to change it |
when.no_default |
Every exit of a state has a when: add one without, as the default |
gate.nothing_to_check |
A gate has nothing to read, such as outputs_present on a transition with no outputs |
workflow.implicit_effect |
The effect is carried by a state’s name; write does: open_pr or production: true instead |
| The board shows a work item in an old state | It runs the version it started with; it will finish there |
Go further
Section intitulée « Go further »- Work items: what happens to a request inside a workflow.
- Write the workflow, in depth: fan-outs, schedules, release trains.
- Gates: every gate and its parameters.