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.

  • Selu CLI installed (selu command available)
  • Docker running
  • An LLM provider configured (see LLM Providers)
  1. Scaffold the project

    Create a new directory and initialise it with the Selu CLI:

    Terminal window
    mkdir quote-bot && cd quote-bot
    selu init agent

    This generates agent.yaml and agent.md with sensible defaults.

  2. Edit agent.yaml

    Open agent.yaml and fill in the metadata:

    name: quote-bot
    version: 0.1.0
    display_name: QuoteBot
    description: Delivers inspirational quotes on demand.
    author: your-username
    license: MIT
    model:
    default: anthropic/claude-sonnet
    temperature: 0.9
    routing:
    mode: inline
    triggers:
    - keyword: quote
    - intent: request_quote
    priority: 5
    memory:
    session_ttl: 600
    max_history: 20
    long_term: false
  3. Write the system prompt

    Replace the contents of 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. Validate

    Run the schema validator to catch mistakes early:

    Terminal window
    selu validate .

    You should see agent.yaml: valid and agent.md: found.

  5. Start the local dev server

    Launch your agent in development mode:

    Terminal window
    selu dev .

    This starts the orchestrator, loads your agent, and opens a local web chat at http://localhost:4840.

  6. Test it

    Open the web chat and type “Give me an inspirational quote.” You should get back a quote with attribution. Try asking something off-topic to verify the constraint works.

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.