Build an agent

Building your own agent in Airgent is straightforward and empowering. Follow these steps to create an agent tailored to your needs.

Step 1: Navigate to Editor Page

  1. Open the Agent Builder.

Agent Builder Page
  1. Click the New button and select New Agent.

  2. You will redirected to our Editor page.


Step 2: Understanding the Agent Editor Page

The Agent Editor is your workspace for building and customizing agents.

Agent Editor Page

This section explains the key sections of the editor interface to help you get started.

1. Node Library (Left Panel)

This is where all the available nodes are organized.

  • What It Does:

    • Provides a categorized list of nodes, including basic, community, and custom nodes.

    • Allows you to drag and drop nodes into your workspace to begin building your agent.

  • How to Use:

    • Browse through the categories (e.g., Basic, Tools, Control).

    • Click or drag a node to add it to your workflow.

2. Toolbar (Top Section)

The toolbar provides essential tools for managing your agent.

  • What It Includes:

    • Home: Back to homepage.

    • Name: Click to edit your agent name.

    • Save: Save your current workflow progress.

    • Arrange: Rearrange your nodes

    • Import/Export: Import an existing agent or export your agent design.

    • Delete: Remove the current workflow if needed.

3. Command Bar (Bottom Center)

The Command Bar allows you to control the editor using natural language commands.

  • What It Does:

    • Enables you to add nodes, connect them, or make adjustments by typing commands.

    • A powerful way to interact with the editor hands-free.

  • Example Commands:

    • “Add a node for HTTP input.”

    • “Connect Node A to Node B.”

  • How to Use:

    • Type your command and press Enter.

4. Message Box (Bottom Right)

This is where you can send messages to your agent.

  • What It Does:

    • Test your agent by sending input messages.

    • Evaluate how your agent responds based on the workflow you’ve created.

  • How to Use:

    • Type a message and press Enter to simulate user interaction with your agent.


Step 3. Creating Your First Basic Agent

The agent is setup as below:

Basic agent setup

In this section, we’ll walk through building a simple agent by connecting an Input Node and an Output Node. This basic setup will help you understand how nodes interact with each other.

1

Name and Save the Agent

  1. From the Toolbar, put in your agent name.

  2. Click Save button.

2

Add Nodes from the Node Library

  1. Open the Node Library on the left-hand side of the editor.

  2. Expand the Flow section.

  3. Drag and drop the following nodes onto the workspace:

    • Input Node: Handles input messages sent to the agent.

    • Output Node: Outputs the response from the agent.

3

Understanding Node Properties

Each node has its own properties (or “ports”) that can be connected to other nodes:

  • Input Node:

    • Exec: The execution flow that triggers the next node.

    • Message: The input message that will flow through your agent.

    • Thread ID and User ID: Metadata for advanced use cases (ignore these for now).

  • Output Node:

    • Exec: Accepts the execution flow from the previous node.

    • Message: Outputs the message that was processed by the agent.

4
  1. Hover over the Exec property of the Input Node.

  2. Click and drag a connection to the Exec property of the Output Node. This establishes the execution flow between the nodes.

  3. Repeat the process for the Message property, connecting the Input Node to the Output Node.

At this stage, you can ignore the Thread ID and User ID properties.

5

Test Your Basic Agent

  1. Save your workflow using the Save button in the toolbar.

  2. Use the Message Box at the bottom-right of the editor to test your agent:

    • Type a message and hit Enter.

    • The message will flow from the Input Node to the Output Node and return the same message as output.


What’s Next?

Congratulations! You’ve just created your first basic agent. This setup demonstrates how nodes interact through execution flow and message passing.

In the next sections, we’ll explore adding more complex nodes, and creating advanced workflows to expand your agent's capabilities.

Last updated