Framework-agnostic UI tools for LLM Agents to send rich WebSocket messages to Zijus Chat UI.
Project description
🛠️ Zijus Tools
Zijus Tools is a Python library containing pre-built, framework-agnostic tools for LLM Agents. It enables agents to send rich, interactive UI components directly to your frontend over WebSockets.
Designed to work seamlessly with any Agentic Framework—including Agno, AutoGen, Microsoft Agent Framework, Google Agent Development Kit (ADK), LangChain, and more—alongside the Zijus Chat UI. This library abstracts away the complexity of WebSocket context management, allowing your LLM agents to render dynamic interfaces with a single function call.
🔗 Important Links
To get the most out of zijus-tools, you will need the frontend client:
- 🖥️ Zijus Chat UI GitHub Repo - See examples of how to integrate the Zijus Chat Client with various Agentic frameworks.
- 🎨 Zijus Chat UI Customization - Learn how to style, theme, and customize the frontend client.
📦 Installation
pip install zijus-tools
(Note: Requires Python 3.8+)
🚀 Quick Start
Using zijus-tools is a simple two-step process:
- Register your WebSocket sender in your server app (FastAPI, Django, etc.).
- Provide the tools to your chosen LLM Agent framework.
Step 1: Configure the Server
Because zijus-tools is web-framework-agnostic, you just need to tell it how to send JSON messages. We use Python's built-in contextvars to ensure thread-safe message delivery for concurrent users.
# main.py (Example using FastAPI)
from fastapi import FastAPI, WebSocket
from zijus_tools import set_websocket_sender # 1. Import the setup function
app = FastAPI()
@app.websocket("/ws")
async def websocket_endpoint(websocket: WebSocket):
await websocket.accept()
# 2. Define a simple async wrapper that sends a dict over the websocket
async def sender(msg: dict):
await websocket.send_json(msg)
# 3. Inject the sender for this specific user's connection
set_websocket_sender(sender)
# ... initialize and run your Agent (Agno, AutoGen, ADK, etc.) ...
while True:
data = await websocket.receive_text()
# Handle incoming data...
Step 2: Add Tools to your Agent
Because Zijus Tools are standard Python asynchronous functions, you can pass them as tools to any agent framework. The tool automatically handles formatting the UI payload and emitting the message behind the scenes!
Example: Google ADK
from google.adk.agents import LlmAgent
from zijus_tools import SendSlots
agent = LlmAgent(
name="root_agent",
tools=[SendSlots], # Just drop it in the tools list
model="gemini-2.5-flash",
instruction="Whenever the user asks for options, use the SendSlots tool."
)
🧰 Available Tools
We are constantly expanding the library of UI components.
SendSlots
Sends a list of selectable slots (buttons or checkboxes) to the chat interface. Perfect for multiple-choice questions, filtering, or guiding the user.
Arguments:
slots(Any): A list, comma-separated string, or JSON string of options. (e.g.,["Mining", "Cement"]or[{"label": "Yes", "value": "1"}])content(str, optional): Text to display above the slots.checkbox(bool, optional): IfTrue, renders as multi-select checkboxes. Defaults toFalse(single-select buttons).delay(float, optional): Delay rendering to match natural chat cadence.
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request if you have a new UI tool you'd like to add. Ensure that your tools rely on emit_message() from zijus_tools.context to remain framework-agnostic.
📄 License
This project is open-sourced under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file zijus_tools-0.0.1.tar.gz.
File metadata
- Download URL: zijus_tools-0.0.1.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dab1b9733216e6d8ec84fd4ab0d78fec7b8e9d4c6352013867aebfe96e1c7c17
|
|
| MD5 |
f563f372cd423f2bbabdff77d21101e5
|
|
| BLAKE2b-256 |
628e1d7bf6beacedecca3f9e434dee5cd0b1dc079f8c56f55440c6dcc4515249
|
File details
Details for the file zijus_tools-0.0.1-py3-none-any.whl.
File metadata
- Download URL: zijus_tools-0.0.1-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
be02600864b2955d11a187bb325e93532b5344c51cc36f363216b6cd2a524fed
|
|
| MD5 |
98027c9a057173db3d23bcfe492c9c50
|
|
| BLAKE2b-256 |
e0a4c27dc23de15d647f61385c6974521170bf8413822bc72ed6869d38acdd71
|