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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llama_agents_server-0.7.1.tar.gz (56.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

llama_agents_server-0.7.1-py3-none-any.whl (77.9 kB view details)

Uploaded Python 3

File details

Details for the file llama_agents_server-0.7.1.tar.gz.

File metadata

  • Download URL: llama_agents_server-0.7.1.tar.gz
  • Upload date:
  • Size: 56.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","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}

File hashes

Hashes for llama_agents_server-0.7.1.tar.gz
Algorithm Hash digest
SHA256 a7cbfe9cd65df850205837922e4ae40915b645472f1e882976aed0adc415cb73
MD5 57eb7a6f07f20d553c3b074e81968ca4
BLAKE2b-256 0e7bdc95badd43c44076ab15520da6b5e999a56349e874b78d22fee81fbf94bf

See more details on using hashes here.

File details

Details for the file llama_agents_server-0.7.1-py3-none-any.whl.

File metadata

  • Download URL: llama_agents_server-0.7.1-py3-none-any.whl
  • Upload date:
  • Size: 77.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","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}

File hashes

Hashes for llama_agents_server-0.7.1-py3-none-any.whl
Algorithm Hash digest
SHA256 85948e8075e0ac24f02a43aa751b89950ca6554fe1d1971412b0faf8eb24974d
MD5 929b4df3502a5e4a2ad66434089cf4b8
BLAKE2b-256 4a1b015e90d0dff9399c04572b730d80688047f6fb4b1ee5c6dee89c0063e9e9

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.7.1 This release

2 files

0.7.0

2 files

0.6.4

2 files

0.6.3

2 files

0.6.2

2 files

0.6.1

2 files

0.6.0

2 files

0.5.0

2 files

0.4.7

2 files

0.4.6

2 files

0.4.5

2 files

0.4.4

2 files

0.4.3

2 files

0.4.2

2 files

0.4.1

2 files

0.4.0

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

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