Build Agent Pipelines in AgentCreator

These steps summarize the process for creating an agent in Designer. Agents in SnapLogic consist of a driver pipeline, a worker pipeline, and one or more tool pipelines. We recommend that you build your Agent by starting with the tool pipelines. This makes debugging.

You can build one worker pipeline and add all of the tools to the worker pipeline. This allows you to work in one Designer canvas to build each tool, making the following activities more efficient:

  • Tool validation
  • Testing responses from different LLM models
  • Snap account access

You can have multiple unconnected pipelines on one canvas. Use the Disable Snap setting to turn off pipeline segments from validating and executing.

Use a JSON Generator Snap in your worker and tool pipelines to mock data input for testing purposes. It can be disconnected and disabled later.

Activities outside of SnapLogic would be:

  • Create an interface for your end users to interact with the agent.
  • Use a 3rd-party monitoring tool to assess quality of responses and LLM costs.
  1. Plan your agent pipeline design.
    1. Objective - Define a specific goal for your agent is crucial as a first step.
    2. Preparation - Collect data and prepare a real-world context for the types of end-user questions the agent is designed to answer.
    3. Tools - Enumerate the tools required for the agent to respond best to the prompt and determine the layers of pipelines that inform the hierarchy of agents.
    4. Data sources - Identify data sources for the agent. This applies to RAG pipelines especially.
  2. In Designer, create the worker pipeline by dragging the required Snaps onto the canvas and connecting them.
    1. For each tool pipeline branch, start with the Function Generator Snap to create a function definition for the tools to be called.
      You can connect multiple Function Generator Snaps to send to the model a list of callable tools.
    2. Build the tool pipeline for your function calling pipeline to use.

      We recommend that you begin with one of our basic Function Generator Snaps, then move on to the other ones when you're building more complex Agents.

      You can review your choices in the following table:

      Basic Function Generator Snap Generates a tool definition for the LLM. Configuration differs slightly across LLM Snap Packs.
      Multi Pipeline Function Generator Snap Transforms pipeline properties and parameters into function definitions for tool calling.
      OpenAPI Function Generator Snap Converts an OpenAPI specification to functions for tool calling.
      APIM Function Generator Snap Converts the APIM service version to the list of functions for the Tool Calling Snap.
    3. Use the Pipeline Execute Snap to call the corresponding tool pipeline based on the model's response.
    4. Insert a Mapper Snap to define data mappings between systems.
    5. Make sure that the starting Snap of your tool and worker pipelines has an open view.
    6. Add the Message Appender to pass the message payload (system and user prompts), and tools payload (function definitions) to the Tool Calling Snap.
    7. Test your tool pipelines by running validation and checking the response in the Data Preview window in the LLM Snaps.

    When your tool testing is complete, and you've validated all of your Tool pipelines, you need to extract each tool pipeline branch into its own Designer canvas and save it as a separate pipeline.

  3. Go to Designer and create the following Driver pipeline:

    From the Snap Catalog, add the following Snaps to the canvas in order:

    1. JSON Generator Snap

      Use the JSON editor for the initial user prompt. This creates the JSON document that is sent through the pipeline with the prompt input.

    2. Prompt Generator Snap
      1. Click Prompt Composer and enter the prompt.
      2. Select the System Prompt checkbox and define the role.
      3. Add another Prompt Generator Snap and enter the user prompt.
    3. Pipe Loop
      Configure the Pipe Loop to call the Worker Agent pipelines. This might take some fine-tuning depending on your requirements. To learn about enhanced controls in the Pipe Loop Snap, refer to A Guide to the Enhanced PipeLoop.
  4. Validate and test your pipelines in a sandbox environment. Use Agent Visualizer to debug pipeline issues.
    This Snap offers a graphical representation of the various layers of pipelines in your agent. It also displayed the prompt input and output across the pipelines.
  5. Deploy your Agent to production. You can view Pipeline executions in Monitor.

    These activities include:

    • Create a Triggered Task for the pipeline.
      Note: Once the pipeline is in production, you should disable or remove the JSON Generator Snap. The open input for the data source would trigger the pipeline.
    • Move the Task, pipelines, and associated assets (such as an accounts file or expression library) to a production Environment (Org).
    • Assign the pipeline a Snaplex in your Production environment.
    • View execution statistics in Monitor.