Skip to content

Build Your First Agent

In this tutorial you’ll create a simple agent called QuoteBot that returns an inspirational quote when asked. It uses no custom capabilities — just a system prompt and the built-in LLM.

  1. Create the agent directory

    Create a new directory for your agent inside the installed_agents folder that is mounted into your Selu container. If you followed the default Docker setup, this is the installed_agents directory next to your docker-compose.yml:

    Terminal window
    mkdir -p installed_agents/quote-bot
  2. Create agent.yaml

    Create installed_agents/quote-bot/agent.yaml with the agent metadata:

    id: quote-bot
    name: QuoteBot
    model:
    temperature: 0.9

    That’s all you need. The id must be unique across your agents. The name is the display name shown in the web chat. The user’s configured default model will be used automatically.

  3. Write the system prompt

    Create installed_agents/quote-bot/agent.md:

    You are QuoteBot, a friendly assistant that shares inspirational quotes.
    ## Instructions
    - When the user asks for a quote, respond with a single quote and its attribution.
    - You may draw from any well-known author, philosopher, or public figure.
    - Keep responses short — the quote plus one sentence of context at most.
    ## Constraints
    - Only share quotes. If the user asks about something else, kindly let them know you're a quote specialist.
    - Never invent fake attributions.
  4. Install the agent

    If Selu is already running, restart it so it picks up the new agent:

    Terminal window
    docker compose restart

    Selu scans the installed_agents directory on startup and loads every valid agent it finds.

  5. Test it

    Open the Selu web chat at http://localhost:3000 and select QuoteBot from the agent list. Type “Give me an inspirational quote.” You should get back a quote with attribution. Try asking something off-topic to verify the constraint works.

    Selu web chat interface with conversation list

    Active conversation showing agent responses with tool usage

QuoteBot works, but it only generates quotes from the LLM’s training data. In a future step, you could add a quotes-api capability that fetches quotes from an external API. See What Are Capabilities? to learn how.