Skip to main content

HTTP server for deploying and serving LlamaIndex workflows as web services

Project description

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.

Project details


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.4.6.tar.gz (47.8 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.4.6-py3-none-any.whl (67.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: llama_agents_server-0.4.6.tar.gz
  • Upload date:
  • Size: 47.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","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.4.6.tar.gz
Algorithm Hash digest
SHA256 14ad0a593e07d9c0edfa9c6fa1b5058d8f5b817e75920e8e9bdea4b51e8c07aa
MD5 096f26d37d4bee39b9f04307c125e7bd
BLAKE2b-256 314df6671fc1d27e5d990ac20a0efe4b74efe5bc3637806344cb1d96fceaafa8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llama_agents_server-0.4.6-py3-none-any.whl
  • Upload date:
  • Size: 67.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","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.4.6-py3-none-any.whl
Algorithm Hash digest
SHA256 6953a3b294c57ab5513e0aa20eca901bca8b037eda2d96918b07341cc130b010
MD5 872a36ed76136ba5629d5a3e39f46821
BLAKE2b-256 6bd7d405ae1162e12af5a5c4d341f5a0faf8d765fd73314cda982e85be0d81c2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page