ReasonChip supports a variety of task types that form the backbone of any pipeline. Each task performs a specific role, but they all share a set of powerful features that provide control over execution flow, result handling, and logic.
These are common fields used across most task types. They provide consistent functionality for conditional logic, asynchronous execution, and result handling. Some fields are supported only in select task types.
info
,
debug
, trace
).Note: variables
are injected directly, and
params
are interpolated. Use variables
for static
values, and params
for templated input.
Loop context variables include:
Executes a group of tasks in sequence. Supports scoped variables and local result handling.
Supports all common fields.
- name: "Grouped steps"
variables:
greeting: "Hello"
tasks:
- chip: myapp.chips.say
params:
text: "{{ greeting }} {{ item }}"
- chip: myapp.chips.wait
params:
seconds: 1
loop: var(items)
Calls another pipeline by name, optionally passing in variables and parameters. Execution resumes after the pipeline completes.
Supports all common fields.
- name: "Run follow-up"
dispatch: notifications.send_summary
params:
user_id: var(user.id)
Redirects execution to another pipeline permanently. Existing variables become global in the new branch. Control never returns to the current pipeline.
Supports: name, comment, when, log
- branch: onboarding.start
params:
user_id: var(user.id)
Executes a registered chip with given parameters. Chips are reusable, named components.
Supports all common fields.
- chip: chatbot.send_message
params:
message: "Hello, {{ user.name }}"
store_result_as: result
Executes inline code logic with access to current variables and inputs.
Supports all common fields.
- code: |
result = a + b
params:
a: 1
b: 2
store_result_as: sum
Asserts one or more boolean conditions. Fails if any are false.
Supports: name, comment, when, log, loop
- assert:
- user.age > 0
- user.active == true
Ends the current task set or pipeline early and returns a value to the caller.
result
)Supports: name, comment, when, log
- when: result.status != 'OK'
return:
status: "error"
message: "Failed validation"
Declares or overrides variables in the current scope. These variables propagate downward.
Supports: name, comment, when, log, loop
- declare:
is_admin: false
retry_count: 0
A passive task that does nothing. Useful for annotation.
Supports: name
- comment: "This is a logic block for retry control"
Immediately stops the entire workflow and returns the provided value as the final output.
Supports: name, comment, when, log
- when: shutdown_signal == true
terminate:
reason: "Manual override"
status: "terminated"
© 2025 South Patron LLC. All rights reserved.
AI everywhere.