AgentCreator Architecture and Design

The SnapLogic platform lets you connect to multiple data sources, create prompts, and interact with large language models (LLMs) through a single user interface. In SnapLogic AgentCreator, an agent is a group of SnapLogic pipelines. With AgentCreator, you can design both simple and goal-based agents. You can also build multilayered agents, that include subagents for more complex tasks.

This article covers the following topics:

  • AgentCreator pipeline architecture
  • AgentCreator pipeline design considerations

AgentCreator pipelines power agent operations. They can connect to any data source supported by SnapLogic Snaps. You can build the user interface for these agents using your organization’s tools or platforms like Streamlit. For example, SnapLogic AgentCreator can handle the agent’s back-end APIs, while Streamlit provides the user interface.

For example, in this solution, SnapLogic AgentCreator handles the back-end APIs while Streamlit powers the Agent end-user interface.

Architectural Components

The Agent loop

The core of the Agent pipeline pattern is the Agent loop. In this loop:

  • Drivers process incoming requests (prompts) and send them through the loop.
  • Workers handle each iteration of the loop.
The driver pipeline receives a prompt, calls the worker pipeline, and the worker decides which tool to use. After the tool completes its task, the result is sent back to the worker pipeline, which can either:
  • Send the response back to the driver.
  • Iterate on the prompt by sending the request back to the tool pipelines to collect more data. In this context, the tools can be RAG pipelines.

Agentic workflows often require repeated tool requests. The PipeLoop Snap enables continuous pipeline calls until a stop condition is reached. Therefore, the Agent Driver pipeline always includes the PipeLoop Snap after the Prompt Generator Snap.

The AgentCreator pipeline pattern

In SnapLogic, the Agent pipeline pattern includes:
  • Agent Driver pipeline: Sends prompt input to the LLM and starts the iterative execution of worker pipelines.
  • Agent Worker pipeline: Takes the request and calls the appropriate tools.
  • Tool pipeline: Performs a specific, limited task with set parameters.

Tool Pipelines

Tool pipelines are created as children of the driver or worker pipeline. They are the actual tools the worker pipeline calls. For example, an agent for travel planning might use a tool pipeline to fetch weather data. The user enters a prompt, which goes to the driver pipeline, then to the worker pipeline, which interacts with the necessary tools. The response can be looped back for further iterations if needed.

For example, an Agent assisting with near-term travel planning might retrieve the temperature using a tool from a weather website. As the Agent end user, you would enter a prompt into an input field in an app interface. Operationally, that prompt input is sent as a request to the driver pipeline, and the driver sends the request to worker pipeline which carries out iterations, interacting with the tools. The response is then passed back though the loop, in case, more iteration on the request is required. Learn more about the AgentCreator loop processing.

The following diagram illustrates the request flow in tool pipelines:

The processing is accomplished through four types of Snaps found in each LLM Snap Pack:

  • Function Generator Snap: Defines a tool so the model can recognize and use it.
  • Tool Calling Snap: Sends user input and tool details to the model’s API and receives the output.
  • Function Result Snap: Formats function results into a custom data structure.
  • Message Appender Snap: Adds tool results to the message list for use in subsequent tool calls.

You can also call multiple functions from the Multi Pipeline Function Generator Snap. Learn more about how to streamline the designs of your Agent pipelines through efficient tool calling.

Message transmission

The Message Appender Snap is essential in the Agent Loop. It combines output streams and keeps conversation history, ensuring worker pipelines have the context they need.

Design considerations

LLM Vendors and Models

Agent pipeline design and configuration depends on the LLM vendor and model you plan to use. Snap Packs support multiple operations in LLMs and various types of accounts. In each LLM Snap Pack, similar capabilities are supported with the same patterns for consistency across the different LLM vendor Snap Packs.

Two types of Snaps perform LLM-calling. Although both have the same underlying endpoint, their functions differ:

  • Chat completions: takes the prompt input and returns the LLM response.
  • Tool calling: takes the prompt input and evaluates against the function definition to specify which tool to use.

System prompt

Defining a role for Agents and Subagents is an important part of returning output in a format that suits your usecase. You can define the role of the Agent by selecting system prompt in the appropriate Snap for the LLM vendor/model.

The system prompt is for the model to understand the persona it should adopt (displayed in the UI as role). While not required, creating a system prompt makes things easier because it creates a set of instructions for the LLM - not a request.

You can leverage the system prompt for the underlying system receiving the prompt input. This enables you to create layers of agents.

JSON mode

JSON mode is for the model to output in JSON format. JSON format can be leveraged relaying output data from the LLM to other systems.

For Agents that rely on LLM thinking and reasoning models, structured outputs can be leveraged for specific formatting input and output requirements.

Refer to Get started with AgentCreator for a workflow and the Briefing Agent use case article.

Learn more about designing Agents and GenAI apps.