Skip to main content
For the complete documentation index for agents and LLMs, see llms.txt.

Create a Minimal Agent Pipeline

Start simple by creating a minimal Agent pipeline that passes the query to the Agent and returns the result.


About This Task

Create a minimal Agent pipeline to understand how to connect the Agent to other components and build more complex systems. In this pipeline, the Agent receives the user query and generates a response.

Create an Agent Pipeline

  1. In the left navigation, go to Pipelines>Create empty pipeline.

  2. Click Create empty pipeline, give your pipeline a name, and click Create Pipeline.

  3. In the Component Library, find Input and drag it onto the canvas.

  4. On the Input component card, expand optional parameters, click Configure, and add -messages as a connection point.

    Input component with messages connection point
    Input component with messages connection point configured
  5. Now, drag the Agent component onto the canvas.

  6. Connect Input's messages output to Agent's messages input.

  7. On the Agent component card, click Prompt, and enter the following prompt in the System prompt field:

    You are a helpful assistant.
    Answer the user's question.
    Agent Output

    The Agent component has no output connections until you configure its prompt. Once you enter the prompt, you'll see messages as an output connection.

  8. In Component Library, find Output and drag it onto the canvas. Every query pipeline must end with the Output component.

  9. Expand optional parameters on the Output component card, click Configure, and add -messages as a connection point.

  10. Connect Agent's messages output to Output's messages input.

  11. Save the pipeline.

This is how the pipeline should look like:

The complete pipeline in Builder.

This is the pipeline YAML:

components:
Agent:
type: haystack.components.agents.agent.Agent
init_parameters:
chat_generator:
init_parameters:
model: gpt-5.4
type: haystack.components.generators.chat.openai_responses.OpenAIResponsesChatGenerator
tools:
system_prompt: |-
{% message role="system" %}
You are a helpful assistant. Answer user's question.
{% endmessage %}
user_prompt:
required_variables:
exit_conditions:
state_schema: {}
max_agent_steps: 100
streaming_callback:
raise_on_tool_invocation_failure: false
tool_invoker_kwargs:
confirmation_strategies:

connections: []

max_runs_per_component: 100

metadata: {}

inputs:
messages:
- Agent.messages

outputs:
messages: Agent.messages

Run the Pipeline

  1. In Builder, click Run.
The Run button in Builder.
  1. Ask any question and see how the Agent responds.

What To Do Next