ag-ui-langroid
Implementation of the AG-UI protocol for Langroid.
Provides a complete Python integration for Langroid agents with the AG-UI protocol, including FastAPI endpoint creation and comprehensive event streaming.
Installation
pip install ag-ui-langroid
Usage
from langroid import Agent
from langroid.language_models import OpenAIChatModel
from ag_ui_langroid import LangroidAgent, create_langroid_app
# Create a Langroid agent
model = OpenAIChatModel()
agent = Agent(
name="assistant",
system_message="You are a helpful assistant.",
llm=model,
)
# Wrap with AG-UI adapter
agui_agent = LangroidAgent(
agent=agent,
name="agentic_chat",
description="Conversational Langroid agent with AG-UI streaming",
)
# Create FastAPI app
app = create_langroid_app(agui_agent, "/")
Features
- Native Langroid integration – Direct support for Langroid agents and tools
- FastAPI endpoint creation – Automatic HTTP endpoint generation with proper event streaming
- Advanced event handling – Comprehensive support for all AG-UI events including tool calls and state updates
- Message translation – Seamless conversion between AG-UI and Langroid message formats
Examples
See the examples/ directory for complete working examples demonstrating:
- Agentic chat
- Tool-based generative UI
- Backend tool rendering
- Shared state management
- Human-in-the-loop interactions
Metadata
Release files for ag-ui-langroid 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ag_ui_langroid-0.2.0.tar.gz | 14.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ag_ui_langroid-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 30.3 kB
Release files / ag_ui_langroid-0.2.0.tar.gz
| Download URL | ag_ui_langroid-0.2.0.tar.gz |
|---|---|
| Size | 14.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
182339cff469e4de746f43c81d9dd7f8128861d62baef0687bef5d2096400381
|
|
BLAKE2b-256 checksum How to use checksums |
9328b32b4970c00a5baf80a96e459565cd1f2732a96a65b67fa379316ff946fa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","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 / ag_ui_langroid-0.2.0-py3-none-any.whl
| Download URL | ag_ui_langroid-0.2.0-py3-none-any.whl |
|---|---|
| Size | 16.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
02749e85435398db6a83feb21705d2e94c0e9d35f7f50dfaea64f96bf9fdfcf7
|
|
BLAKE2b-256 checksum How to use checksums |
0838c3df8bb78ed5506122c25800e68c5a72438ef15eda0c9a00d4f08c3234a6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","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}
|