“Hello World”

Getting started with Newo.ai is very simple but can be a bit overwhelming if you’re not familiar with the basics. Every coder writes a “Hello World” program for their first exercise, which helps highlight some basic functionality of a coding environment. This is no exception with the Newo.ai platform. We can break down several Newo.ai actions and get you familiar with the platform using this basic example.

Goal: Have the agent send “Hello World” in the Sandbox chat panel after triggering an event. No LLM involvement.

🎉

Prefer a different perspective on the Newo.ai platform functionality? Check out our co-founder lessons YouTube channel. Like, comment, and share to get the word out!

Create an Agent

  1. Navigate to the Agents page and click Create Agent in the top-right corner of the page.
  2. Add a “Name” (persona name), which is the name that will be visible to an end user.
  3. Add a “Title” and a “Description,” which are used to describe the agent within the platform. The fields are optional but will help later when creating many agents for different purposes.
  1. Click Create to save the agent. If you need to change the agent details, click the pencil icon next to the newly created agent. Once you’ve made changes, click Update.

Create a Sandbox Connector

In order for the Newo.ai platform to connect to a Sandbox chat, integrations are needed with a connector.

  1. To create a new Sandbox connector, navigate to the Integrations page from the left-side panel.
  2. Click the plus icon on the “Sandbox Integration” item.
  3. Add a “Title” and “Idn.” In this case, just call the title and idn “connector.”
  4. Click Save.

Enable the Sandbox Connector

Once a connector is created, its status will be "Stopped," and you will need to enable it.

  1. Click the three dots icon on the right of the created connector.
  2. Click Run.

Create a Flow

  1. Navigate to the Agents page.
  2. Click the plus icon next to the newly created agent.
  3. Add a “Flow Idn” (unique identifying name). Ensure no spaces. Leave the “Flow Template” for now, we will cover the use of this in the future.
  4. Add a “Flow Title,” which is used to describe the flow within the platform. For example, if you want a flow to create an agent to fit the role of a hotel receptionist, the title could be "Hotel Receptionist."
  5. Click Create to save the flow.
  6. If you need to delete a flow to create a new one, click the delete icon next to the newly created flow, and click Delete Flow on the confirmation pop-up. Repeat steps 2 to 4 to create a new flow if needed.
  7. Click the newly created flow. This will open up the Flow Builder where we will code the agent's behavior.

Add a User

  1. Click the Sandbox Chat button at the top-right corner of the Flow Builder to open the Sandbox chat panel. Ensure the correct agent is selected from the dropdown within the panel.
  2. Click the plus icon next to the “User:” section in the Sandbox chat.
  3. Add a “Name.” In this case, this is the name of a user who will be talking to the agent, which can be your name or a made-up name for testing purposes.
  4. Click the checkbox if you'd like to create an actor for the user persona. An Actor is someone who communicates through a specific connector. For example, a specific user could communicate via the Sandbox chat (Sandbox chat connector) and over the phone (Twilio connector), which each have identifiers of separate actors. For this case, we are going to create a single actor for Sandbox chat communications (ensure the checkbox is ticked).
  5. Under the "Actor settings," select “sandbox” for the “Integration” and “connector” for the “Connector.”
  1. Click Create and apply to save the user.

Create a Skill

  1. Click the plus icon next to the Skills section on the left-side panel.
  2. Add a “Skill Idn.” Ensure no spaces.
  3. Add a “Skill title.” This is merely used as a description of the Skill (optional).
  4. Click Create to save the Skill.

Note that "Skill Settings" appears on the right. This displays the "Skill Title," "Idn," "Model," "Result Action," and "Result Variable Name."

Add Code to the Skill Script

The “SendMessage” action is used to send plain text to the Sandbox chat. Copy the following code into the Skill Script section (the middle section of the interface):

{{SendMessage(message="Hello World")}}

Create an Event (Sandbox Integration)

In order for the newly created Skill to be activated, the Skill needs to be subscribed to an event. This is because the agent needs to know when or what event needs to happen to send the message “Hello World.” In this case, the event trigger will be a message sent in the Sandbox chat.

  1. Click the plus icon next to the Event Subscription section on the left-side panel.
  2. Under the “Event Idn,” select “user_message” from the dropdown.
  3. Under “Integration,” select “sandbox” from the dropdown.
  4. Under “Connector,” select “connector” from the dropdown.
  5. Under “Skill selector,” select “skill_idn” from the dropdown. You are telling your flow that when a user sends a message from the Sandbox chat, select a specific Skill to activate.
  6. In this case, you want to activate the newly created Skill. Select it from the “Skill name” dropdown.
  7. Add an “Event description.” This field is optional but will help in the future when identifying the purpose of an event from a complex flow containing multiple event subscriptions.
  8. Click Create to save the event.

Test Functionality and View Results

  1. Click Save and Publish in the top-right corner of the Flow Builder.
  2. Type anything in the Sandbox chat field, and click the send icon. The response should be “Hello World.”