Skip to main content

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:


📦 Installation

pip install zijus-tools

(Note: Requires Python 3.8+)


🚀 Quick Start

Using zijus-tools is a simple two-step process:

  1. Register your WebSocket sender in your server app (FastAPI, Django, etc.).
  2. 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): If True, renders as multi-select checkboxes. Defaults to False (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


Download files

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

Source Distribution

zijus_tools-0.0.1.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

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

zijus_tools-0.0.1-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

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

Hashes for zijus_tools-0.0.1.tar.gz
Algorithm Hash digest
SHA256 dab1b9733216e6d8ec84fd4ab0d78fec7b8e9d4c6352013867aebfe96e1c7c17
MD5 f563f372cd423f2bbabdff77d21101e5
BLAKE2b-256 628e1d7bf6beacedecca3f9e434dee5cd0b1dc079f8c56f55440c6dcc4515249

See more details on using hashes here.

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

Hashes for zijus_tools-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 be02600864b2955d11a187bb325e93532b5344c51cc36f363216b6cd2a524fed
MD5 98027c9a057173db3d23bcfe492c9c50
BLAKE2b-256 e0a4c27dc23de15d647f61385c6974521170bf8413822bc72ed6869d38acdd71

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