praisonAI 2.3.82__tar.gz → 2.3.83__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {praisonai-2.3.82 → praisonai-2.3.83}/PKG-INFO +119 -119
- {praisonai-2.3.82 → praisonai-2.3.83}/PraisonAI.egg-info/PKG-INFO +119 -119
- {praisonai-2.3.82 → praisonai-2.3.83}/README.md +118 -118
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/auto.py +7 -4
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/cli/features/image.py +1 -1
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/cli/main.py +1 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/deploy.py +1 -1
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/integrations/gemini_cli.py +2 -2
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/scheduler/__init__.py +13 -4
- praisonai-2.3.83/praisonai/version.py +1 -0
- praisonai-2.3.82/praisonai/version.py +0 -1
- {praisonai-2.3.82 → praisonai-2.3.83}/PraisonAI.egg-info/SOURCES.txt +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/PraisonAI.egg-info/dependency_links.txt +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/PraisonAI.egg-info/entry_points.txt +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/PraisonAI.egg-info/requires.txt +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/PraisonAI.egg-info/top_level.txt +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/__init__.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/__main__.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/agent_scheduler.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/agents_generator.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/api/call.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/chainlit_ui.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/cli/__init__.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/cli/features/__init__.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/cli/features/agent_scheduler.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/cli/features/agents.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/cli/features/at_mentions.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/cli/features/auto_memory.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/cli/features/autonomy_mode.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/cli/features/base.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/cli/features/compare.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/cli/features/cost_tracker.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/cli/features/eval.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/cli/features/external_agents.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/cli/features/fast_context.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/cli/features/flow_display.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/cli/features/git_integration.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/cli/features/guardrail.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/cli/features/handoff.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/cli/features/interactive_tui.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/cli/features/knowledge.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/cli/features/mcp.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/cli/features/message_queue.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/cli/features/metrics.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/cli/features/n8n.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/cli/features/profile.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/cli/features/profiling.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/cli/features/repo_map.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/cli/features/router.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/cli/features/sandbox_executor.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/cli/features/session.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/cli/features/skills.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/cli/features/slash_commands.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/cli/features/telemetry.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/cli/features/todo.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/cli/features/tools.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/cli/features/workflow.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/cli/schedule_cli.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/code/__init__.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/code/agent_tools.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/code/diff/__init__.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/code/diff/diff_strategy.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/code/tools/__init__.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/code/tools/apply_diff.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/code/tools/execute_command.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/code/tools/list_files.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/code/tools/read_file.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/code/tools/search_replace.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/code/tools/write_file.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/code/utils/__init__.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/code/utils/file_utils.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/code/utils/ignore_utils.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/code/utils/text_utils.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/inbuilt_tools/__init__.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/inbuilt_tools/autogen_tools.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/inc/__init__.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/inc/config.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/inc/models.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/integrations/__init__.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/integrations/base.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/integrations/claude_code.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/integrations/codex_cli.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/integrations/cursor_cli.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/profiler.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/scheduler/agent_scheduler.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/scheduler/base.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/scheduler/daemon_manager.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/scheduler/state_manager.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/scheduler/yaml_loader.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/scheduler.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/setup/__init__.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/setup/build.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/setup/post_install.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/setup/setup_conda_env.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/setup.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/test.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/train.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/train_vision.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/ui/agents.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/ui/callbacks.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/ui/chat.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/ui/code.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/ui/colab.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/ui/colab_chainlit.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/ui/components/aicoder.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/ui/context.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/ui/database_config.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/ui/db.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/ui/realtime.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/ui/realtimeclient/__init__.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/ui/realtimeclient/tools.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/ui/sql_alchemy.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/praisonai/upload_vision.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/pyproject.toml +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/setup.cfg +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/tests/test.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/tests/test_agents_playbook.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/tests/test_approval_system.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/tests/test_basic.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/tests/test_cli_features.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/tests/test_custom_tools_fix.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/tests/test_double_api_fix.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/tests/test_n8n_integration.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/tests/test_phase2_refactor.py +0 -0
- {praisonai-2.3.82 → praisonai-2.3.83}/tests/test_runner.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: PraisonAI
|
|
3
|
-
Version: 2.3.
|
|
3
|
+
Version: 2.3.83
|
|
4
4
|
Summary: PraisonAI is an AI Agents Framework with Self Reflection. PraisonAI application combines PraisonAI Agents, AutoGen, and CrewAI into a low-code solution for building and managing multi-agent LLM systems, focusing on simplicity, customisation, and efficient human-agent collaboration.
|
|
5
5
|
Author: Mervin Praison
|
|
6
6
|
License: MIT
|
|
@@ -1084,6 +1084,124 @@ Run with the same simple command:
|
|
|
1084
1084
|
praisonai agents.yaml
|
|
1085
1085
|
```
|
|
1086
1086
|
|
|
1087
|
+
### 12. MCP (Model Context Protocol)
|
|
1088
|
+
|
|
1089
|
+
PraisonAI supports MCP Protocol Revision 2025-11-25 with multiple transports.
|
|
1090
|
+
|
|
1091
|
+
#### MCP Client (Consume MCP Servers)
|
|
1092
|
+
```python
|
|
1093
|
+
from praisonaiagents import Agent, MCP
|
|
1094
|
+
|
|
1095
|
+
# stdio - Local NPX/Python servers
|
|
1096
|
+
agent = Agent(tools=MCP("npx @modelcontextprotocol/server-memory"))
|
|
1097
|
+
|
|
1098
|
+
# Streamable HTTP - Production servers
|
|
1099
|
+
agent = Agent(tools=MCP("https://api.example.com/mcp"))
|
|
1100
|
+
|
|
1101
|
+
# WebSocket - Real-time bidirectional
|
|
1102
|
+
agent = Agent(tools=MCP("wss://api.example.com/mcp", auth_token="token"))
|
|
1103
|
+
|
|
1104
|
+
# SSE (Legacy) - Backward compatibility
|
|
1105
|
+
agent = Agent(tools=MCP("http://localhost:8080/sse"))
|
|
1106
|
+
|
|
1107
|
+
# With environment variables
|
|
1108
|
+
agent = Agent(
|
|
1109
|
+
tools=MCP(
|
|
1110
|
+
command="npx",
|
|
1111
|
+
args=["-y", "@modelcontextprotocol/server-brave-search"],
|
|
1112
|
+
env={"BRAVE_API_KEY": "your-key"}
|
|
1113
|
+
)
|
|
1114
|
+
)
|
|
1115
|
+
|
|
1116
|
+
# Multiple MCP servers + regular functions
|
|
1117
|
+
def my_custom_tool(query: str) -> str:
|
|
1118
|
+
"""Custom tool function."""
|
|
1119
|
+
return f"Result: {query}"
|
|
1120
|
+
|
|
1121
|
+
agent = Agent(
|
|
1122
|
+
name="MultiToolAgent",
|
|
1123
|
+
instructions="Agent with multiple MCP servers",
|
|
1124
|
+
tools=[
|
|
1125
|
+
MCP("uvx mcp-server-time"), # Time tools
|
|
1126
|
+
MCP("npx @modelcontextprotocol/server-memory"), # Memory tools
|
|
1127
|
+
my_custom_tool # Regular function
|
|
1128
|
+
]
|
|
1129
|
+
)
|
|
1130
|
+
```
|
|
1131
|
+
|
|
1132
|
+
#### MCP Server (Expose Tools as MCP Server)
|
|
1133
|
+
|
|
1134
|
+
Expose your Python functions as MCP tools for Claude Desktop, Cursor, and other MCP clients:
|
|
1135
|
+
|
|
1136
|
+
```python
|
|
1137
|
+
from praisonaiagents.mcp import ToolsMCPServer
|
|
1138
|
+
|
|
1139
|
+
def search_web(query: str, max_results: int = 5) -> dict:
|
|
1140
|
+
"""Search the web for information."""
|
|
1141
|
+
return {"results": [f"Result for {query}"]}
|
|
1142
|
+
|
|
1143
|
+
def calculate(expression: str) -> dict:
|
|
1144
|
+
"""Evaluate a mathematical expression."""
|
|
1145
|
+
return {"result": eval(expression)}
|
|
1146
|
+
|
|
1147
|
+
# Create and run MCP server
|
|
1148
|
+
server = ToolsMCPServer(name="my-tools")
|
|
1149
|
+
server.register_tools([search_web, calculate])
|
|
1150
|
+
server.run() # stdio for Claude Desktop
|
|
1151
|
+
# server.run_sse(host="0.0.0.0", port=8080) # SSE for web clients
|
|
1152
|
+
```
|
|
1153
|
+
|
|
1154
|
+
#### MCP Features
|
|
1155
|
+
| Feature | Description |
|
|
1156
|
+
|---------|-------------|
|
|
1157
|
+
| Session Management | Automatic Mcp-Session-Id handling |
|
|
1158
|
+
| Protocol Versioning | Mcp-Protocol-Version header |
|
|
1159
|
+
| Resumability | SSE stream recovery via Last-Event-ID |
|
|
1160
|
+
| Security | Origin validation, DNS rebinding prevention |
|
|
1161
|
+
| WebSocket | Auto-reconnect with exponential backoff |
|
|
1162
|
+
|
|
1163
|
+
### 13. A2A (Agent2Agent Protocol)
|
|
1164
|
+
|
|
1165
|
+
PraisonAI supports the [A2A Protocol](https://a2a-protocol.org) for agent-to-agent communication, enabling your agents to be discovered and collaborate with other AI agents.
|
|
1166
|
+
|
|
1167
|
+
#### A2A Server (Expose Agent as A2A Server)
|
|
1168
|
+
```python
|
|
1169
|
+
from praisonaiagents import Agent, A2A
|
|
1170
|
+
from fastapi import FastAPI
|
|
1171
|
+
|
|
1172
|
+
# Create an agent with tools
|
|
1173
|
+
def search_web(query: str) -> str:
|
|
1174
|
+
"""Search the web for information."""
|
|
1175
|
+
return f"Results for: {query}"
|
|
1176
|
+
|
|
1177
|
+
agent = Agent(
|
|
1178
|
+
name="Research Assistant",
|
|
1179
|
+
role="Research Analyst",
|
|
1180
|
+
goal="Help users research topics",
|
|
1181
|
+
tools=[search_web]
|
|
1182
|
+
)
|
|
1183
|
+
|
|
1184
|
+
# Expose as A2A Server
|
|
1185
|
+
a2a = A2A(agent=agent, url="http://localhost:8000/a2a")
|
|
1186
|
+
|
|
1187
|
+
app = FastAPI()
|
|
1188
|
+
app.include_router(a2a.get_router())
|
|
1189
|
+
|
|
1190
|
+
# Run: uvicorn app:app --reload
|
|
1191
|
+
# Agent Card: GET /.well-known/agent.json
|
|
1192
|
+
# Status: GET /status
|
|
1193
|
+
```
|
|
1194
|
+
|
|
1195
|
+
#### A2A Features
|
|
1196
|
+
| Feature | Description |
|
|
1197
|
+
|---------|-------------|
|
|
1198
|
+
| Agent Card | JSON metadata for agent discovery |
|
|
1199
|
+
| Skills Extraction | Auto-generate skills from tools |
|
|
1200
|
+
| Task Management | Stateful task lifecycle |
|
|
1201
|
+
| Streaming | SSE streaming for real-time updates |
|
|
1202
|
+
|
|
1203
|
+
> **Documentation**: [docs.praison.ai/a2a](https://docs.praison.ai/a2a) | **Examples**: [examples/python/a2a](https://github.com/MervinPraison/PraisonAI/tree/main/examples/python/a2a)
|
|
1204
|
+
|
|
1087
1205
|
---
|
|
1088
1206
|
|
|
1089
1207
|
## 🎯 CLI / No-Code Interface
|
|
@@ -1833,124 +1951,6 @@ agent = Agent(
|
|
|
1833
1951
|
| Web Fetch | Anthropic |
|
|
1834
1952
|
| Prompt Caching | OpenAI (auto), Anthropic, Bedrock, Deepseek |
|
|
1835
1953
|
|
|
1836
|
-
## MCP (Model Context Protocol)
|
|
1837
|
-
|
|
1838
|
-
PraisonAI supports MCP Protocol Revision 2025-11-25 with multiple transports.
|
|
1839
|
-
|
|
1840
|
-
### MCP Client (Consume MCP Servers)
|
|
1841
|
-
```python
|
|
1842
|
-
from praisonaiagents import Agent, MCP
|
|
1843
|
-
|
|
1844
|
-
# stdio - Local NPX/Python servers
|
|
1845
|
-
agent = Agent(tools=MCP("npx @modelcontextprotocol/server-memory"))
|
|
1846
|
-
|
|
1847
|
-
# Streamable HTTP - Production servers
|
|
1848
|
-
agent = Agent(tools=MCP("https://api.example.com/mcp"))
|
|
1849
|
-
|
|
1850
|
-
# WebSocket - Real-time bidirectional
|
|
1851
|
-
agent = Agent(tools=MCP("wss://api.example.com/mcp", auth_token="token"))
|
|
1852
|
-
|
|
1853
|
-
# SSE (Legacy) - Backward compatibility
|
|
1854
|
-
agent = Agent(tools=MCP("http://localhost:8080/sse"))
|
|
1855
|
-
|
|
1856
|
-
# With environment variables
|
|
1857
|
-
agent = Agent(
|
|
1858
|
-
tools=MCP(
|
|
1859
|
-
command="npx",
|
|
1860
|
-
args=["-y", "@modelcontextprotocol/server-brave-search"],
|
|
1861
|
-
env={"BRAVE_API_KEY": "your-key"}
|
|
1862
|
-
)
|
|
1863
|
-
)
|
|
1864
|
-
|
|
1865
|
-
# Multiple MCP servers + regular functions
|
|
1866
|
-
def my_custom_tool(query: str) -> str:
|
|
1867
|
-
"""Custom tool function."""
|
|
1868
|
-
return f"Result: {query}"
|
|
1869
|
-
|
|
1870
|
-
agent = Agent(
|
|
1871
|
-
name="MultiToolAgent",
|
|
1872
|
-
instructions="Agent with multiple MCP servers",
|
|
1873
|
-
tools=[
|
|
1874
|
-
MCP("uvx mcp-server-time"), # Time tools
|
|
1875
|
-
MCP("npx @modelcontextprotocol/server-memory"), # Memory tools
|
|
1876
|
-
my_custom_tool # Regular function
|
|
1877
|
-
]
|
|
1878
|
-
)
|
|
1879
|
-
```
|
|
1880
|
-
|
|
1881
|
-
### MCP Server (Expose Tools as MCP Server)
|
|
1882
|
-
|
|
1883
|
-
Expose your Python functions as MCP tools for Claude Desktop, Cursor, and other MCP clients:
|
|
1884
|
-
|
|
1885
|
-
```python
|
|
1886
|
-
from praisonaiagents.mcp import ToolsMCPServer
|
|
1887
|
-
|
|
1888
|
-
def search_web(query: str, max_results: int = 5) -> dict:
|
|
1889
|
-
"""Search the web for information."""
|
|
1890
|
-
return {"results": [f"Result for {query}"]}
|
|
1891
|
-
|
|
1892
|
-
def calculate(expression: str) -> dict:
|
|
1893
|
-
"""Evaluate a mathematical expression."""
|
|
1894
|
-
return {"result": eval(expression)}
|
|
1895
|
-
|
|
1896
|
-
# Create and run MCP server
|
|
1897
|
-
server = ToolsMCPServer(name="my-tools")
|
|
1898
|
-
server.register_tools([search_web, calculate])
|
|
1899
|
-
server.run() # stdio for Claude Desktop
|
|
1900
|
-
# server.run_sse(host="0.0.0.0", port=8080) # SSE for web clients
|
|
1901
|
-
```
|
|
1902
|
-
|
|
1903
|
-
### MCP Features
|
|
1904
|
-
| Feature | Description |
|
|
1905
|
-
|---------|-------------|
|
|
1906
|
-
| Session Management | Automatic Mcp-Session-Id handling |
|
|
1907
|
-
| Protocol Versioning | Mcp-Protocol-Version header |
|
|
1908
|
-
| Resumability | SSE stream recovery via Last-Event-ID |
|
|
1909
|
-
| Security | Origin validation, DNS rebinding prevention |
|
|
1910
|
-
| WebSocket | Auto-reconnect with exponential backoff |
|
|
1911
|
-
|
|
1912
|
-
## A2A (Agent2Agent Protocol)
|
|
1913
|
-
|
|
1914
|
-
PraisonAI supports the [A2A Protocol](https://a2a-protocol.org) for agent-to-agent communication, enabling your agents to be discovered and collaborate with other AI agents.
|
|
1915
|
-
|
|
1916
|
-
### A2A Server (Expose Agent as A2A Server)
|
|
1917
|
-
```python
|
|
1918
|
-
from praisonaiagents import Agent, A2A
|
|
1919
|
-
from fastapi import FastAPI
|
|
1920
|
-
|
|
1921
|
-
# Create an agent with tools
|
|
1922
|
-
def search_web(query: str) -> str:
|
|
1923
|
-
"""Search the web for information."""
|
|
1924
|
-
return f"Results for: {query}"
|
|
1925
|
-
|
|
1926
|
-
agent = Agent(
|
|
1927
|
-
name="Research Assistant",
|
|
1928
|
-
role="Research Analyst",
|
|
1929
|
-
goal="Help users research topics",
|
|
1930
|
-
tools=[search_web]
|
|
1931
|
-
)
|
|
1932
|
-
|
|
1933
|
-
# Expose as A2A Server
|
|
1934
|
-
a2a = A2A(agent=agent, url="http://localhost:8000/a2a")
|
|
1935
|
-
|
|
1936
|
-
app = FastAPI()
|
|
1937
|
-
app.include_router(a2a.get_router())
|
|
1938
|
-
|
|
1939
|
-
# Run: uvicorn app:app --reload
|
|
1940
|
-
# Agent Card: GET /.well-known/agent.json
|
|
1941
|
-
# Status: GET /status
|
|
1942
|
-
```
|
|
1943
|
-
|
|
1944
|
-
### A2A Features
|
|
1945
|
-
| Feature | Description |
|
|
1946
|
-
|---------|-------------|
|
|
1947
|
-
| Agent Card | JSON metadata for agent discovery |
|
|
1948
|
-
| Skills Extraction | Auto-generate skills from tools |
|
|
1949
|
-
| Task Management | Stateful task lifecycle |
|
|
1950
|
-
| Streaming | SSE streaming for real-time updates |
|
|
1951
|
-
|
|
1952
|
-
> **Documentation**: [docs.praison.ai/a2a](https://docs.praison.ai/a2a) | **Examples**: [examples/python/a2a](https://github.com/MervinPraison/PraisonAI/tree/main/examples/python/a2a)
|
|
1953
|
-
|
|
1954
1954
|
## CLI Features
|
|
1955
1955
|
|
|
1956
1956
|
| Feature | Docs |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: PraisonAI
|
|
3
|
-
Version: 2.3.
|
|
3
|
+
Version: 2.3.83
|
|
4
4
|
Summary: PraisonAI is an AI Agents Framework with Self Reflection. PraisonAI application combines PraisonAI Agents, AutoGen, and CrewAI into a low-code solution for building and managing multi-agent LLM systems, focusing on simplicity, customisation, and efficient human-agent collaboration.
|
|
5
5
|
Author: Mervin Praison
|
|
6
6
|
License: MIT
|
|
@@ -1084,6 +1084,124 @@ Run with the same simple command:
|
|
|
1084
1084
|
praisonai agents.yaml
|
|
1085
1085
|
```
|
|
1086
1086
|
|
|
1087
|
+
### 12. MCP (Model Context Protocol)
|
|
1088
|
+
|
|
1089
|
+
PraisonAI supports MCP Protocol Revision 2025-11-25 with multiple transports.
|
|
1090
|
+
|
|
1091
|
+
#### MCP Client (Consume MCP Servers)
|
|
1092
|
+
```python
|
|
1093
|
+
from praisonaiagents import Agent, MCP
|
|
1094
|
+
|
|
1095
|
+
# stdio - Local NPX/Python servers
|
|
1096
|
+
agent = Agent(tools=MCP("npx @modelcontextprotocol/server-memory"))
|
|
1097
|
+
|
|
1098
|
+
# Streamable HTTP - Production servers
|
|
1099
|
+
agent = Agent(tools=MCP("https://api.example.com/mcp"))
|
|
1100
|
+
|
|
1101
|
+
# WebSocket - Real-time bidirectional
|
|
1102
|
+
agent = Agent(tools=MCP("wss://api.example.com/mcp", auth_token="token"))
|
|
1103
|
+
|
|
1104
|
+
# SSE (Legacy) - Backward compatibility
|
|
1105
|
+
agent = Agent(tools=MCP("http://localhost:8080/sse"))
|
|
1106
|
+
|
|
1107
|
+
# With environment variables
|
|
1108
|
+
agent = Agent(
|
|
1109
|
+
tools=MCP(
|
|
1110
|
+
command="npx",
|
|
1111
|
+
args=["-y", "@modelcontextprotocol/server-brave-search"],
|
|
1112
|
+
env={"BRAVE_API_KEY": "your-key"}
|
|
1113
|
+
)
|
|
1114
|
+
)
|
|
1115
|
+
|
|
1116
|
+
# Multiple MCP servers + regular functions
|
|
1117
|
+
def my_custom_tool(query: str) -> str:
|
|
1118
|
+
"""Custom tool function."""
|
|
1119
|
+
return f"Result: {query}"
|
|
1120
|
+
|
|
1121
|
+
agent = Agent(
|
|
1122
|
+
name="MultiToolAgent",
|
|
1123
|
+
instructions="Agent with multiple MCP servers",
|
|
1124
|
+
tools=[
|
|
1125
|
+
MCP("uvx mcp-server-time"), # Time tools
|
|
1126
|
+
MCP("npx @modelcontextprotocol/server-memory"), # Memory tools
|
|
1127
|
+
my_custom_tool # Regular function
|
|
1128
|
+
]
|
|
1129
|
+
)
|
|
1130
|
+
```
|
|
1131
|
+
|
|
1132
|
+
#### MCP Server (Expose Tools as MCP Server)
|
|
1133
|
+
|
|
1134
|
+
Expose your Python functions as MCP tools for Claude Desktop, Cursor, and other MCP clients:
|
|
1135
|
+
|
|
1136
|
+
```python
|
|
1137
|
+
from praisonaiagents.mcp import ToolsMCPServer
|
|
1138
|
+
|
|
1139
|
+
def search_web(query: str, max_results: int = 5) -> dict:
|
|
1140
|
+
"""Search the web for information."""
|
|
1141
|
+
return {"results": [f"Result for {query}"]}
|
|
1142
|
+
|
|
1143
|
+
def calculate(expression: str) -> dict:
|
|
1144
|
+
"""Evaluate a mathematical expression."""
|
|
1145
|
+
return {"result": eval(expression)}
|
|
1146
|
+
|
|
1147
|
+
# Create and run MCP server
|
|
1148
|
+
server = ToolsMCPServer(name="my-tools")
|
|
1149
|
+
server.register_tools([search_web, calculate])
|
|
1150
|
+
server.run() # stdio for Claude Desktop
|
|
1151
|
+
# server.run_sse(host="0.0.0.0", port=8080) # SSE for web clients
|
|
1152
|
+
```
|
|
1153
|
+
|
|
1154
|
+
#### MCP Features
|
|
1155
|
+
| Feature | Description |
|
|
1156
|
+
|---------|-------------|
|
|
1157
|
+
| Session Management | Automatic Mcp-Session-Id handling |
|
|
1158
|
+
| Protocol Versioning | Mcp-Protocol-Version header |
|
|
1159
|
+
| Resumability | SSE stream recovery via Last-Event-ID |
|
|
1160
|
+
| Security | Origin validation, DNS rebinding prevention |
|
|
1161
|
+
| WebSocket | Auto-reconnect with exponential backoff |
|
|
1162
|
+
|
|
1163
|
+
### 13. A2A (Agent2Agent Protocol)
|
|
1164
|
+
|
|
1165
|
+
PraisonAI supports the [A2A Protocol](https://a2a-protocol.org) for agent-to-agent communication, enabling your agents to be discovered and collaborate with other AI agents.
|
|
1166
|
+
|
|
1167
|
+
#### A2A Server (Expose Agent as A2A Server)
|
|
1168
|
+
```python
|
|
1169
|
+
from praisonaiagents import Agent, A2A
|
|
1170
|
+
from fastapi import FastAPI
|
|
1171
|
+
|
|
1172
|
+
# Create an agent with tools
|
|
1173
|
+
def search_web(query: str) -> str:
|
|
1174
|
+
"""Search the web for information."""
|
|
1175
|
+
return f"Results for: {query}"
|
|
1176
|
+
|
|
1177
|
+
agent = Agent(
|
|
1178
|
+
name="Research Assistant",
|
|
1179
|
+
role="Research Analyst",
|
|
1180
|
+
goal="Help users research topics",
|
|
1181
|
+
tools=[search_web]
|
|
1182
|
+
)
|
|
1183
|
+
|
|
1184
|
+
# Expose as A2A Server
|
|
1185
|
+
a2a = A2A(agent=agent, url="http://localhost:8000/a2a")
|
|
1186
|
+
|
|
1187
|
+
app = FastAPI()
|
|
1188
|
+
app.include_router(a2a.get_router())
|
|
1189
|
+
|
|
1190
|
+
# Run: uvicorn app:app --reload
|
|
1191
|
+
# Agent Card: GET /.well-known/agent.json
|
|
1192
|
+
# Status: GET /status
|
|
1193
|
+
```
|
|
1194
|
+
|
|
1195
|
+
#### A2A Features
|
|
1196
|
+
| Feature | Description |
|
|
1197
|
+
|---------|-------------|
|
|
1198
|
+
| Agent Card | JSON metadata for agent discovery |
|
|
1199
|
+
| Skills Extraction | Auto-generate skills from tools |
|
|
1200
|
+
| Task Management | Stateful task lifecycle |
|
|
1201
|
+
| Streaming | SSE streaming for real-time updates |
|
|
1202
|
+
|
|
1203
|
+
> **Documentation**: [docs.praison.ai/a2a](https://docs.praison.ai/a2a) | **Examples**: [examples/python/a2a](https://github.com/MervinPraison/PraisonAI/tree/main/examples/python/a2a)
|
|
1204
|
+
|
|
1087
1205
|
---
|
|
1088
1206
|
|
|
1089
1207
|
## 🎯 CLI / No-Code Interface
|
|
@@ -1833,124 +1951,6 @@ agent = Agent(
|
|
|
1833
1951
|
| Web Fetch | Anthropic |
|
|
1834
1952
|
| Prompt Caching | OpenAI (auto), Anthropic, Bedrock, Deepseek |
|
|
1835
1953
|
|
|
1836
|
-
## MCP (Model Context Protocol)
|
|
1837
|
-
|
|
1838
|
-
PraisonAI supports MCP Protocol Revision 2025-11-25 with multiple transports.
|
|
1839
|
-
|
|
1840
|
-
### MCP Client (Consume MCP Servers)
|
|
1841
|
-
```python
|
|
1842
|
-
from praisonaiagents import Agent, MCP
|
|
1843
|
-
|
|
1844
|
-
# stdio - Local NPX/Python servers
|
|
1845
|
-
agent = Agent(tools=MCP("npx @modelcontextprotocol/server-memory"))
|
|
1846
|
-
|
|
1847
|
-
# Streamable HTTP - Production servers
|
|
1848
|
-
agent = Agent(tools=MCP("https://api.example.com/mcp"))
|
|
1849
|
-
|
|
1850
|
-
# WebSocket - Real-time bidirectional
|
|
1851
|
-
agent = Agent(tools=MCP("wss://api.example.com/mcp", auth_token="token"))
|
|
1852
|
-
|
|
1853
|
-
# SSE (Legacy) - Backward compatibility
|
|
1854
|
-
agent = Agent(tools=MCP("http://localhost:8080/sse"))
|
|
1855
|
-
|
|
1856
|
-
# With environment variables
|
|
1857
|
-
agent = Agent(
|
|
1858
|
-
tools=MCP(
|
|
1859
|
-
command="npx",
|
|
1860
|
-
args=["-y", "@modelcontextprotocol/server-brave-search"],
|
|
1861
|
-
env={"BRAVE_API_KEY": "your-key"}
|
|
1862
|
-
)
|
|
1863
|
-
)
|
|
1864
|
-
|
|
1865
|
-
# Multiple MCP servers + regular functions
|
|
1866
|
-
def my_custom_tool(query: str) -> str:
|
|
1867
|
-
"""Custom tool function."""
|
|
1868
|
-
return f"Result: {query}"
|
|
1869
|
-
|
|
1870
|
-
agent = Agent(
|
|
1871
|
-
name="MultiToolAgent",
|
|
1872
|
-
instructions="Agent with multiple MCP servers",
|
|
1873
|
-
tools=[
|
|
1874
|
-
MCP("uvx mcp-server-time"), # Time tools
|
|
1875
|
-
MCP("npx @modelcontextprotocol/server-memory"), # Memory tools
|
|
1876
|
-
my_custom_tool # Regular function
|
|
1877
|
-
]
|
|
1878
|
-
)
|
|
1879
|
-
```
|
|
1880
|
-
|
|
1881
|
-
### MCP Server (Expose Tools as MCP Server)
|
|
1882
|
-
|
|
1883
|
-
Expose your Python functions as MCP tools for Claude Desktop, Cursor, and other MCP clients:
|
|
1884
|
-
|
|
1885
|
-
```python
|
|
1886
|
-
from praisonaiagents.mcp import ToolsMCPServer
|
|
1887
|
-
|
|
1888
|
-
def search_web(query: str, max_results: int = 5) -> dict:
|
|
1889
|
-
"""Search the web for information."""
|
|
1890
|
-
return {"results": [f"Result for {query}"]}
|
|
1891
|
-
|
|
1892
|
-
def calculate(expression: str) -> dict:
|
|
1893
|
-
"""Evaluate a mathematical expression."""
|
|
1894
|
-
return {"result": eval(expression)}
|
|
1895
|
-
|
|
1896
|
-
# Create and run MCP server
|
|
1897
|
-
server = ToolsMCPServer(name="my-tools")
|
|
1898
|
-
server.register_tools([search_web, calculate])
|
|
1899
|
-
server.run() # stdio for Claude Desktop
|
|
1900
|
-
# server.run_sse(host="0.0.0.0", port=8080) # SSE for web clients
|
|
1901
|
-
```
|
|
1902
|
-
|
|
1903
|
-
### MCP Features
|
|
1904
|
-
| Feature | Description |
|
|
1905
|
-
|---------|-------------|
|
|
1906
|
-
| Session Management | Automatic Mcp-Session-Id handling |
|
|
1907
|
-
| Protocol Versioning | Mcp-Protocol-Version header |
|
|
1908
|
-
| Resumability | SSE stream recovery via Last-Event-ID |
|
|
1909
|
-
| Security | Origin validation, DNS rebinding prevention |
|
|
1910
|
-
| WebSocket | Auto-reconnect with exponential backoff |
|
|
1911
|
-
|
|
1912
|
-
## A2A (Agent2Agent Protocol)
|
|
1913
|
-
|
|
1914
|
-
PraisonAI supports the [A2A Protocol](https://a2a-protocol.org) for agent-to-agent communication, enabling your agents to be discovered and collaborate with other AI agents.
|
|
1915
|
-
|
|
1916
|
-
### A2A Server (Expose Agent as A2A Server)
|
|
1917
|
-
```python
|
|
1918
|
-
from praisonaiagents import Agent, A2A
|
|
1919
|
-
from fastapi import FastAPI
|
|
1920
|
-
|
|
1921
|
-
# Create an agent with tools
|
|
1922
|
-
def search_web(query: str) -> str:
|
|
1923
|
-
"""Search the web for information."""
|
|
1924
|
-
return f"Results for: {query}"
|
|
1925
|
-
|
|
1926
|
-
agent = Agent(
|
|
1927
|
-
name="Research Assistant",
|
|
1928
|
-
role="Research Analyst",
|
|
1929
|
-
goal="Help users research topics",
|
|
1930
|
-
tools=[search_web]
|
|
1931
|
-
)
|
|
1932
|
-
|
|
1933
|
-
# Expose as A2A Server
|
|
1934
|
-
a2a = A2A(agent=agent, url="http://localhost:8000/a2a")
|
|
1935
|
-
|
|
1936
|
-
app = FastAPI()
|
|
1937
|
-
app.include_router(a2a.get_router())
|
|
1938
|
-
|
|
1939
|
-
# Run: uvicorn app:app --reload
|
|
1940
|
-
# Agent Card: GET /.well-known/agent.json
|
|
1941
|
-
# Status: GET /status
|
|
1942
|
-
```
|
|
1943
|
-
|
|
1944
|
-
### A2A Features
|
|
1945
|
-
| Feature | Description |
|
|
1946
|
-
|---------|-------------|
|
|
1947
|
-
| Agent Card | JSON metadata for agent discovery |
|
|
1948
|
-
| Skills Extraction | Auto-generate skills from tools |
|
|
1949
|
-
| Task Management | Stateful task lifecycle |
|
|
1950
|
-
| Streaming | SSE streaming for real-time updates |
|
|
1951
|
-
|
|
1952
|
-
> **Documentation**: [docs.praison.ai/a2a](https://docs.praison.ai/a2a) | **Examples**: [examples/python/a2a](https://github.com/MervinPraison/PraisonAI/tree/main/examples/python/a2a)
|
|
1953
|
-
|
|
1954
1954
|
## CLI Features
|
|
1955
1955
|
|
|
1956
1956
|
| Feature | Docs |
|