Import your agents and tools
Ensure that the agents and tools you want to connect in an agentic workflow are already imported.
Define a Python function with the @flow decorator
Use the
@flow decorator to define your agentic workflow. In the decorator, specify the agentic workflow’s name, display_name, description, input_schema, output_schema, initiators, schedulable, llm_model, and agent_conversation_memory_turns_limit.- The function must take a single parameter of type
Flowand return aFlowobject. - Construct the agentic workflow using a combination of
tool(),agent(), and edge-building functions likesequence()oredge(). - For
BranchandLoopnodes, use a Python expression in theevaluatorto define the branching or looping condition. For more information, see Agentic workflow expressions. - To support multiple languages, use
aflow.target_locales(['fr', 'es', 'de'])to specify target languages for user activities. After you import the agentic workflow, export translations to CSV, translate them, and import them back. For details, see Multi-language support. - When you use forms in user nodes, connect the form buttons to the next node in the flow using the
edge()function with thebutton_labelparameter. This connection enables users to trigger the transition to the next node when they click a button on the form.
- Example 1
- Example 2
- Example 3
- Example 4
- Example 5
Example 1: Sequencing two toolsFor the full example and complete code, see hello_message_flow.
Python
Import the agentic workflow
Import the agentic workflow as a tool using the
orchestrate tools import command in the CLI.BASH
Test the agentic workflow locally in the ADK
Test the agentic workflow you created using a Python script before adding it to an agent. For more information, see Testing flows.

