Skip to content

Create an agent

Create an agent by connecting a language model to an Agent Prompter and defining how the agent should behave when it receives a task.

In KNIME, an agent is a workflow-driven system. You explicitly control how the agent is prompted, what it can access, and how it executes its reasoning loop.

When this is useful

Create an agent when you want to:

  • Solve tasks that require reasoning rather than a single prompt
  • Let a model decide how to approach a task step by step
  • Build workflows that can later be extended with tools or data
  • Prepare the foundation for interactive or automated agents

If you only need one-shot prompting without reasoning loops, see Prompt a model instead.

Create an agent step by step

Prerequisites
  • A provider and credentials configured (see Providers: Reference table)
  • A chat-capable language model

1. Connect to a language model

To give the agent reasoning capabilities, connect it to a language model.

  1. Add a Credentials Configuration or Credentials Widget node.
  2. Enter your API key or credentials.
  3. Connect it to the corresponding Authenticator node (for example, OpenAI Authenticator).

Next, select the model that will power the agent:

  1. Add an LLM Selector node.
  2. Choose a chat-capable model.

The selected model determines how the agent reasons and responds.

2. Add the Agent Prompter

Use the Agent Prompter node to start the agent’s reasoning loop.

Connect the LLM Selector to the Agent Prompter.

The Agent Prompter is best suited for:

  • workflow-driven execution
  • automated or scheduled runs
  • inspecting and debugging agent behavior

3. Define the agent's behavior

Configure the Agent Prompter with:

  • System Message
    Defines the agent’s role, rules, and constraints.

    Example:

You are a helpful assistant.
Always be kind and reason carefully before responding.
  • User Message
    Defines the task the agent should perform.

Example:

Handle customer requests by using the most appropriate tools available.

The system message controls how the agent behaves. The user message defines what the agent should do.

Be explicit

Clear instructions in the system message lead to more predictable and controllable agent behavior.

Result

When the workflow is executed, the agent:

  • receives the user task
  • reasons about the request
  • produces a response based on the defined behavior

At this stage, the agent does not use tools or external data. It reasons only based on the prompt and the selected model.

Next steps