Skip to main content

LlamaAgents Server

HTTP server for deploying LlamaIndex Workflows as web services. Built on Starlette and Uvicorn.

Installation

pip install llama-agents-server

Quick Start

Create a server file (e.g., my_server.py):

import asyncio
from workflows import Workflow, step
from workflows.context import Context
from workflows.events import Event, StartEvent, StopEvent
from llama_agents.server import WorkflowServer

class StreamEvent(Event):
    sequence: int

class GreetingWorkflow(Workflow):
    @step
    async def greet(self, ctx: Context, ev: StartEvent) -> StopEvent:
        for i in range(3):
            ctx.write_event_to_stream(StreamEvent(sequence=i))
        name = ev.get("name", "World")
        return StopEvent(result=f"Hello, {name}!")

server = WorkflowServer()
server.add_workflow("greet", GreetingWorkflow())

if __name__ == "__main__":
    asyncio.run(server.serve("0.0.0.0", 8080))

Or run it with the CLI:

llama-agents-server my_server.py

Features

  • REST API for running, streaming, and managing workflows
  • Debugger UI automatically mounted at / for visualizing and debugging workflows
  • Event streaming via newline-delimited JSON or Server-Sent Events
  • Human-in-the-loop support for interactive workflows
  • Persistence with built-in SQLite store (or bring your own via AbstractWorkflowStore)

Client

Use llama-agents-client to interact with deployed servers programmatically.

Documentation

See the full deployment guide for API details, persistence configuration, and more.

Metadata

Release files for llama-agents-server 0.8.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for llama-agents-server 0.8.0
File Size Uploaded
llama_agents_server-0.8.0.tar.gz 57.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for llama-agents-server 0.8.0
File Interpreter ABI Platform
llama_agents_server-0.8.0-py3-none-any.whl Python 3 none any Details

Total release size: 137.6 kB

Release files / llama_agents_server-0.8.0.tar.gz

Download URL llama_agents_server-0.8.0.tar.gz
Size 57.9 kB
Tags Source
SHA-256 checksum
How to use checksums
57ffb5a6a939cd92c21658bf0428de23b454a2c80a9bdd8dec1fb6e2090fd824
BLAKE2b-256 checksum
How to use checksums
3bf0f2ed25f79b95e63a7cf3ec2862744018e2f7b06e1403fddd2421688763aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.15 {"installer":{"name":"uv","version":"0.12.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / llama_agents_server-0.8.0-py3-none-any.whl

Download URL llama_agents_server-0.8.0-py3-none-any.whl
Size 79.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9bed5fb4c7d497d4ae3ae5f0ad6b1c1d3ffe04efda447222897d121bb4ed5d4b
BLAKE2b-256 checksum
How to use checksums
6425bc90cdfe4d24e37a45c20e27696d7b05bb4db07ddc0c836546e22fd9fb03
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.15 {"installer":{"name":"uv","version":"0.12.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page