Skip to main content


Processors is a tool to shape your workflow precisely. These functions work as data wranglers, manipulating information before or after tasks interact with agents.


Pre-processor applied to the data before the agent execution step. It take the output of the previous task (or the initial input).


A common scenario involves text truncation to fit AI model limitations.

def text_head(text, size=800):
"""Shorten text to fit within size limit."""
return text[:size]

from intelli.flow.tasks.task import Task
task = Task(task_input=task_input, agent=text_agent, pre_process=text_head)


Post-processor applied on the agent output.


Want to append a disclaimer to AI-generated text? Here's a post-processor.

def append_disclaimer(text, disclaimer="This is generated text."):
"""Attach a disclaimer to the text."""
return text + "\n\n" + disclaimer