Skip to main content

llama-index-tools-praisonai

LlamaIndex tool integration for PraisonAI multi-agent framework.

Installation

pip install llama-index-tools-praisonai

Prerequisites

  1. Install and start PraisonAI server:
pip install praisonai
praisonai serve agents.yaml --port 8080

Usage

Basic Usage with LlamaIndex Agent

from llama_index_tools_praisonai import PraisonAIToolSpec
from llama_index.agent.openai import OpenAIAgent

# Create the PraisonAI tool spec
spec = PraisonAIToolSpec(api_url="http://localhost:8080")
tools = spec.to_tool_list()

# Create agent with PraisonAI tools
agent = OpenAIAgent.from_tools(tools, verbose=True)

# Use the agent
response = agent.chat("Research the latest trends in AI and summarize them")
print(response)

Using Individual Tools

from llama_index_tools_praisonai import PraisonAIToolSpec

spec = PraisonAIToolSpec()

# Run a specific agent
result = spec.run_agent(query="Research quantum computing", agent="researcher")
print(result)

# Run the full workflow
result = spec.run_workflow(query="Create a blog post about AI")
print(result)

# List available agents
agents = spec.list_agents()
print(agents)

Async Usage

import asyncio
from llama_index_tools_praisonai import PraisonAIToolSpec

async def main():
    spec = PraisonAIToolSpec()
    
    # Async agent execution
    result = await spec.arun_agent(query="Research AI", agent="researcher")
    print(result)
    
    # Async workflow execution
    result = await spec.arun_workflow(query="Create content")
    print(result)

asyncio.run(main())

With ReAct Agent

from llama_index_tools_praisonai import PraisonAIToolSpec
from llama_index.core.agent import ReActAgent
from llama_index.llms.openai import OpenAI

spec = PraisonAIToolSpec()
tools = spec.to_tool_list()

llm = OpenAI(model="gpt-4o-mini")
agent = ReActAgent.from_tools(tools, llm=llm, verbose=True)

response = agent.chat("Use PraisonAI to research and write about machine learning")
print(response)

Configuration

Parameter Default Description
api_url http://localhost:8080 PraisonAI server URL
timeout 300 Request timeout in seconds

Available Tools

Tool Description
run_agent Run a specific PraisonAI agent (e.g., researcher, writer)
run_workflow Run the full multi-agent workflow
list_agents List all available agents

Links

License

MIT

Metadata

Release files for llama-index-tools-praisonai 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for llama-index-tools-praisonai 0.1.0
File Size Uploaded
llama_index_tools_praisonai-0.1.0.tar.gz 5.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for llama-index-tools-praisonai 0.1.0
File Interpreter ABI Platform
llama_index_tools_praisonai-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 11.1 kB

Release files / llama_index_tools_praisonai-0.1.0.tar.gz

Download URL llama_index_tools_praisonai-0.1.0.tar.gz
Size 5.9 kB
Tags Source
SHA-256 checksum
How to use checksums
5647398e8ce5a458f53e7efd07a525a2fec813a0d40c5b4b0aae75b43572c500
BLAKE2b-256 checksum
How to use checksums
03adf4890f9b7c8e4726454b49d6b6af9bc39c5345be9ae183b997c974ad8d58
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.11

Release files / llama_index_tools_praisonai-0.1.0-py3-none-any.whl

Download URL llama_index_tools_praisonai-0.1.0-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
168451012dc126dd62c3c5541d8c94607e7a83d3299685739663769b98c498fe
BLAKE2b-256 checksum
How to use checksums
767304dbdaddf73413e421b2fe3ee337a778a9ff673066314ff4d4c80ea53ac9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.11

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page