Skillful Agents Quick Start Guide

Let's get your first Skillful Agent up and running in Unity. This guide assumes you have the SDK imported and your API key configured.

Adding Your First Agent

You have two ways to add a Skillful Agent to your scene:

Method 1: Adding Through Code

Create a new script (e.g., ExampleAgent.cs) and add this basic implementation:

using SkillfulAI.Agents;
using UnityEngine;

public class ExampleAgent : MonoBehaviour
{
    private void Start()
    {
        // Add the Skillful Agent component to this GameObject
        SkillfulAgent agent = gameObject.AddComponent<SkillfulAgent>();
        
        // Select your agent by its dashboard name
        agent.SelectAgentByName("YourAgentNameHere");
        
        // Send your first message
        agent.SendMessage("Hello, who are you?", response => {
            // Log the AI's response
            Debug.Log(response.text);
        });
    }
}

Method 2: Using the Unity Inspector

  1. Create an empty GameObject in your scene

  2. Add the SkillfulAgent component through the Inspector

  3. Create a new script to interact with it:

Building Interactive Conversations

Let's create a more engaging conversation system:

Handling Multiple Agents

Here's how to work with multiple agents in your scene:

Adding Basic Error Handling

Ensure your agent interactions are robust:

Next Steps

Now that you have your agent working, consider:

  1. Integrating with your game's UI system

  2. Adding the Smart NPC component for voice capabilities

  3. Creating more complex conversation flows

  4. Implementing agent state management

The Smart NPC service can be coupled with Skillful Agents to provide your characters with natural, like-like voices, including your very own!

Last updated