Skip to main content

Creating an Agent

WSO2 Integrator supports the creation of AI agents as either Chat agents or Inline agents.

Chat agents​

Chat agents are AI agents exposed through HTTP REST APIs, allowing users or external systems to send prompts and receive responses powered by large language models (LLMs).

Inline agents​

Inline agents can be embedded directly within integration flows, REST APIs, GraphQL resolvers, or backend service logic, and are invoked programmatically as part of workflow execution.

Launching the wizard​

  1. Open your integration project in WSO2 Integrator.
  2. Click + Add Artifact from the project view, or right-click the project tree.

Artifacts page in WSO2 Integrator showing all artifact categories.

Create a chat agent​

Under AI Integration, select AI Chat Agent. Enter a Name for the agent and click Create.

The empty AI Chat Agent wizard with a Name field and a disabled Create button.

FieldRequiredDescription
NameYesIdentifier for the agent, such as BlogReviewer, SupportAssistant, or SalesAdvisor. The name must start with a letter and contain only letters, numbers, and underscores.

Enter a name (for example, blogReviewer) to enable the Create button.

WSO2 Integrator generates the required integration artifacts and displays a progress indicator while configuring the service listener and related components.

When the wizard completes, WSO2 Integrator automatically generates the following:

  • An HTTP service
  • A listener endpoint
  • An AI agent
  • An integration flow that handles incoming requests and generates responses

The AI agent canvas showing Start, an AI agent node with the agent name and an Add Memory button, and a Return node.

Create an inline agent​

You can add an inline agent within integration flows, REST APIs, GraphQL resolvers, or backend service logic.

  1. Create or open an existing integration flow.
  2. In the editor, open the AI section in the side panel and select Agent.
  3. Click + Add Agent to open the agent creation panel.

Agent creation form

  1. Configure the Role and Instructions fields to define the agent’s behavior.
  2. Specify the query or prompt to the agent in the Query field. Note that this can also be an expression (e.g., a parameter, a variable, etc.).
  3. Click Save.

Agent creation form

After generation, you are directed to the integration canvas where you can configure the following aspects of the agent:

Configure agent behavior​

Use the AI agent node configuration panel to customize how the agent behaves and responds to requests.

Click the AI Agent node to open the configuration panel and update the following configurations.

SectionDescription
RoleDefines the primary responsibility or persona of the agent.
InstructionsSpecifies the behavior guidelines and operational instructions that the agent should follow while responding.
Advanced ConfigurationProvides additional runtime and execution settings for the agent.
ResultDefines the output or response generated by the agent after execution.

Advanced configuration​

SectionDescription
Maximum IterationsDefines the maximum number of reasoning or execution cycles the agent can perform before returning a response.
VerboseEnables detailed execution logs and intermediate reasoning information for debugging and observability purposes.
Tool Loading StrategyDetermines how tools are discovered and loaded by the agent during execution.
Agent CredentialConfigures the credentials or authentication details used by the agent when accessing external systems or tools.
ContextDefines contextual information that is passed to the agent during execution.
Type DescriptorSpecifies the expected structure or type information for agent inputs and outputs.

What's next​

  • Tools - Add tools and integrations to the agent.
  • Memory - Configure conversational and persistent memory.
  • Identity & access management - Secure agents, tools, and integrations using authentication and authorization.
  • Observability - Monitor traces, logs, and execution details.
  • Evaluations - Test and evaluate agent behavior and response quality.