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.1.1
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.1.1.tar.gz | 13.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ag_ui_langroid-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 28.6 kB
Release files / ag_ui_langroid-0.1.1.tar.gz
| Download URL | ag_ui_langroid-0.1.1.tar.gz |
|---|---|
| Size | 13.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5b51999c12d7557d35a45830cd13e816f00ca4a3fcfeef0514aa324e70e5a53c
|
|
BLAKE2b-256 checksum How to use checksums |
af58051fde1251956032eeb094107ce3793ba89f13d9d15c23748683ebfaaaf6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","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.1.1-py3-none-any.whl
| Download URL | ag_ui_langroid-0.1.1-py3-none-any.whl |
|---|---|
| Size | 15.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
098ef19dce80f79a58b363f6b6dcf52783f2a82a47f2b909a0998837dec3549c
|
|
BLAKE2b-256 checksum How to use checksums |
f29128fe520efe9fd88549dd5ba437a7774344413e0c2e2ae4517f295597fca6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","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}
|