langchain-praisonai
LangChain integration for PraisonAI multi-agent framework.
Installation
pip install langchain-praisonai
Prerequisites
- Install and start PraisonAI server:
pip install praisonai
praisonai serve agents.yaml --port 8080
Usage
Basic Usage
from langchain_praisonai import PraisonAITool
from langchain_openai import ChatOpenAI
from langchain.agents import initialize_agent, AgentType
# Create the PraisonAI tool
praisonai_tool = PraisonAITool(api_url="http://localhost:8080")
# Use with LangChain agent
llm = ChatOpenAI(model="gpt-4o-mini")
agent = initialize_agent(
tools=[praisonai_tool],
llm=llm,
agent=AgentType.ZERO_SHOT_REACT_DESCRIPTION,
verbose=True
)
result = agent.run("Research the latest trends in AI and summarize them")
print(result)
Using Specific Agents
from langchain_praisonai import PraisonAIAgentTool
# Create tools for specific agents
researcher = PraisonAIAgentTool(agent_name="researcher")
writer = PraisonAIAgentTool(agent_name="writer")
# Use multiple agent tools
tools = [researcher, writer]
List Available Agents
from langchain_praisonai import PraisonAIListAgentsTool
list_tool = PraisonAIListAgentsTool()
agents = list_tool.run({})
print(agents)
Direct Tool Usage
from langchain_praisonai import PraisonAITool
tool = PraisonAITool()
# Run with default workflow
result = tool.run({"query": "What are the benefits of AI?"})
# Run with specific agent
result = tool.run({"query": "Research quantum computing", "agent": "researcher"})
Async Usage
import asyncio
from langchain_praisonai import PraisonAITool
async def main():
tool = PraisonAITool()
result = await tool.arun({"query": "Analyze market trends"})
print(result)
asyncio.run(main())
Configuration
| Parameter | Default | Description |
|---|---|---|
api_url |
http://localhost:8080 |
PraisonAI server URL |
timeout |
300 |
Request timeout in seconds |
Available Tools
| Tool | Description |
|---|---|
PraisonAITool |
General-purpose tool for running PraisonAI workflows |
PraisonAIAgentTool |
Tool for running a specific named agent |
PraisonAIListAgentsTool |
Tool for listing available agents |
Links
License
MIT
Metadata
Release files for langchain-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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| langchain_praisonai-0.1.0.tar.gz | 6.6 kB | Without provenance | Details for langchain_praisonai-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| langchain_praisonai-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for langchain_praisonai-0.1.0-py3-none-any.whl |
Total release size: 12.1 kB
Release files / langchain_praisonai-0.1.0.tar.gz
| Download URL | langchain_praisonai-0.1.0.tar.gz |
|---|---|
| Size | 6.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
351c3ee7326725b3d7f31dc9cde24d0381232b8bfae2513d8f6f5c3929081d44
|
|
BLAKE2b-256 checksum How to use checksums |
37e1d1243faea8e24ffda12bc2836e2de85d28bd15108227b11a0506eb1fe71d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.11
|
Release files / langchain_praisonai-0.1.0-py3-none-any.whl
| Download URL | langchain_praisonai-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
14cb8a1fee49f6d477d30fb9dc45d594de97206c3fff6c7577b22a1a98cfda82
|
|
BLAKE2b-256 checksum How to use checksums |
fcc7ef0b39f852ff9ceaf7fd3d6371c5ce6963ff653520dd783750e2f56f911a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.11
|
Security for langchain-praisonai 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.