Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Principle:ANative Lab EvoAgentX Declarative Agent Design

From Leeroopedia
Knowledge Sources
Domains Agents, Architecture
Last Updated 2026-10-21 00:00 GMT

Overview

Design pattern for creating LLM-powered agents declaratively by specifying inputs, outputs, prompt templates, and parse modes without writing custom action classes.

Description

Declarative Agent Design is an approach where an agent's behavior is fully specified through configuration (name, description, prompt, I/O schemas, parse mode) rather than subclassing an agent class. The framework dynamically generates the action class, input/output Pydantic models, and parsing logic from the specification. This dramatically reduces the barrier to creating specialized agents: a user defines what the agent should do (via prompt) and what it should produce (via outputs + parse_mode), and the framework handles execution, tool-calling, and output extraction.

Usage

Use this principle when you need to create specialized LLM agents for specific tasks (summarization, classification, extraction, translation) without writing custom Python classes. This is the standard approach in EvoAgentX via `CustomizeAgent`. It is ideal for:

  • Rapid prototyping of single-purpose agents
  • Multi-agent workflows where each node is a declaratively-defined agent
  • Scenarios where agent configurations need to be serialized and shared

Theoretical Basis

The declarative pattern separates agent specification from agent execution. The specification is a data structure:

# Abstract pattern (not real implementation)
agent = Agent(
    name="...",
    prompt="Process {input}",
    inputs=[{"name": "input", "type": "str", ...}],
    outputs=[{"name": "result", "type": "str", ...}],
    parse_mode="title",
)
# Framework auto-generates: Action class, ActionInput/ActionOutput models, parser
result = agent(inputs={"input": "value"})

Key theoretical properties:

  • Schema-driven I/O: Input/output schemas become Pydantic models with JSON schema generation
  • Parse mode dispatch: The framework selects the appropriate parser based on `parse_mode`
  • Tool-calling loop: When tools are attached, the agent enters a multi-step tool-calling loop

Related Pages

Implemented By

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment