home / skills / lookatitude / beluga-ai / add_agent

add_agent skill

/.agent/skills/add_agent

This skill guides you through creating a new Beluga AI agent, scaffolding directories, code, and tests for a complete integration.

npx playbooks add skill lookatitude/beluga-ai --skill add_agent

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
812 B
---
name: Add New Agent
description: Guide to creating a new agent type in Beluga AI.
---

# Add New Agent

Agents in Beluga AI are specialized implementations that often embed a `BaseAgent`.

## Steps

1.  **Create Agent Directory**
    -   `pkg/agents/providers/<agent_type>/`.

2.  **Implement Agent Code**
    -   Create `pkg/agents/providers/<agent_type>/agent.go`.
    -   Embed `pkg/agents/base.BaseAgent` (check current location of BaseAgent).
    -   Implement the `Agent` interface methods.

3.  **Define Capabilities**
    -   Does it support tools?
    -   Does it support memory?
    -   Configure these in the `New` function.

4.  **Register Agent**
    -   Register in `pkg/agents/registry.go`.

5.  **Add Tests**
    -   Unit tests for specific logic.
    -   Integration tests with mocked LLMs.

Overview

This skill guides you through creating a new agent type for Beluga AI in Go. It covers directory layout, embedding the BaseAgent, implementing required interfaces, configuring capabilities, registering the agent, and adding tests. Follow the steps to produce a maintainable, testable agent that integrates with the Beluga runtime.

How this skill works

You create a dedicated package under pkg/agents/providers for the new agent and implement an agent.go that embeds the BaseAgent implementation. The new agent must satisfy the Agent interface and expose a New constructor that configures capabilities such as tools and memory. Finally, you register the agent in the central registry so the runtime can instantiate it and add unit and integration tests to validate behavior.

When to use it

  • You need a custom agent implementation that extends core behavior or integrates with a new external model provider.
  • You want an agent with specific tool or memory support not covered by existing agents.
  • You are adding production support for a new LLM backend in Go.
  • You are prototyping an agent with specialized prompt flows or action handling.
  • You want the agent to participate in the standard Beluga lifecycle and dependency injection.

Best practices

  • Embed the current BaseAgent type from pkg/agents/base to inherit common lifecycle and helpers.
  • Implement all methods of the Agent interface explicitly to keep behavior predictable and testable.
  • Expose a New(...) constructor that clearly documents supported capabilities (tools, memory, config).
  • Register the agent in pkg/agents/registry.go so it is discoverable by the runtime factory.
  • Write unit tests for agent logic and integration tests that mock LLM responses to exercise end-to-end flows.

Example use cases

  • Add an agent that integrates with a proprietary LLM provider with custom auth and request shaping.
  • Create a memory-enabled agent that stores conversation context differently from defaults.
  • Build an agent that supports a specialized toolset (e.g., database queries or function calling).
  • Prototype an assistant that enforces domain-specific prompt safety and post-processing of responses.

FAQ

Where should the new agent package live?

Place it under pkg/agents/providers/<agent_type>/ to follow existing structure and discoverability.

How do I enable or disable tools and memory?

Configure capabilities in the New constructor of your agent and document which features are supported.