Quickstart

Get a working agent backend running in under 5 minutes. Agentend scaffolds the project, configures your fleet of model workers, and serves an AG-UI compatible streaming endpoint out of the box.

1. Install Agentend

Install the framework with all optional dependencies (Redis, pgvector, OpenTelemetry, Celery):

pip install agentend[all]

Or install the minimal core:

pip install agentend

2. Scaffold a project

The init command creates a project directory with an entry point, fleet config, Dockerfile, and dependency file:

agentend init myapp
cd myapp

This generates:

  • app.py — Application entry point
  • fleet.yaml — Fleet and memory configuration
  • Dockerfile — Container definition
  • requirements.txt — Python dependencies
  • .env.example — Environment variable template

3. Write a Capability

A Capability is the core abstraction in Agentend. It declares what intents the agent handles, which worker models it needs, and what tools are available. Open app.py and define your first capability:

from agentend import Agentend, Capability, tool

app = Agentend()

@app.capability(
    name="invoice_processor",
    intents=["process invoice", "extract invoice data"],
    workers=["extract", "verify", "summarize"],
)
class InvoiceProcessor(Capability):
    """Extract, verify, and summarize invoice data."""

    @tool
    async def get_vendor_info(self, vendor_id: str) -> dict:
        """Look up vendor details from the database."""
        return {"vendor_id": vendor_id, "name": "Acme Corp"}

    def get_domain_context(self) -> str:
        return "You are an invoice processing specialist."

app.run()

4. Configure the fleet

The fleet.yaml file configures worker slots, memory tiers, and infrastructure. A minimal config:

fleet:
  name: myapp
  description: "My first agent fleet"

  workers:
    classify:
      model: gpt-4o-mini
      timeout: 30
    extract:
      model: claude-sonnet-4-6
      timeout: 60
    verify:
      model: claude-opus-4-6
      timeout: 45
    summarize:
      model: claude-sonnet-4-6
      timeout: 60
    generate:
      model: claude-opus-4-6
      timeout: 120
    tool_call:
      model: claude-sonnet-4-6
      timeout: 90

memory:
  session:
    enabled: true
    type: redis
    ttl: 3600
  semantic:
    enabled: true
    type: pgvector

5. Serve

Start the server with auto-reload for development:

agentend serve --reload

Your agent backend is now running. The following endpoints are available:

MethodEndpointDescription
POST/intentSubmit a natural language intent for processing
GET/stream/{session_id}SSE stream of AG-UI events for a session
GET/healthHealth check endpoint

Next steps

  • Learn about Capabilities in depth
  • Configure your Fleet with benchmark-optimized models
  • Set up the Memory system for contextual conversations
  • Connect your frontend with AG-UI Events