Placeholder for the official Python SDK for the Intelligent Agents Platform (IAP). Coming soon!
Project description
๐ py-agent-client
Build powerful MCP client applications with the Intelligent Agents Platform
๐ฏ What is py-agent-client?
py-agent-client is the flagship client library for the Intelligent Agents Platform (IAP). It enables developers to build applications that interact seamlessly with Model Context Protocol (MCP) servers, making AI agent development intuitive and powerful.
โจ Key Features:
- ๐ Universal MCP Support - Connect to any MCP-compliant server
- โก High Performance - Optimized for speed and reliability
- ๐ ๏ธ Rich Tooling - Comprehensive tool discovery and execution
- ๐ Pythonic Design - Clean, intuitive API
- ๐ Enterprise Ready - Built for production environments
๐ Quick Start
Installation
pip install py-agent-client
Your First MCP Client
from py_agent_client import MCPClient
async def main():
# Connect to an MCP server
client = MCPClient()
await client.connect("ws://localhost:8080")
# Discover available tools
tools = await client.list_tools()
print(f"Found {len(tools)} tools available")
# Execute a tool
result = await client.call_tool("file_reader", {
"path": "document.txt"
})
print(f"Result: {result}")
import asyncio
asyncio.run(main())
๐๏ธ Intelligent Agents Platform Ecosystem
py-agent-client is part of the comprehensive IAP ecosystem:
๐๏ธ py-agent-core - Foundation & shared utilities
โโโ py-agent-client - โ
Client applications (You are here)
โโโ py-agent-server - ๐ง MCP server development
โโโ py-agent-tool - ๐ง Development & debugging tools
โโโ py-agent-resources - ๐ง Templates & examples
๐ง Features & Examples
Tool Discovery
# List all available tools
tools = await client.list_tools()
# Get detailed tool information
tool_info = await client.get_tool_info("web_scraper")
print(f"Parameters: {tool_info.parameters}")
Tool Execution
# Execute tools with parameters
result = await client.call_tool("calculator", {
"operation": "multiply",
"a": 15,
"b": 7
})
# Handle errors gracefully
try:
data = await client.call_tool("api_caller", {
"url": "https://api.example.com/data"
})
except MCPToolError as e:
print(f"Tool execution failed: {e}")
Advanced Connection Management
from py_agent_client import ConnectionConfig
# Custom configuration
config = ConnectionConfig(
url="wss://secure-server.com:8443",
timeout=30,
retry_attempts=5,
headers={"Authorization": "Bearer token123"}
)
client = MCPClient(config)
await client.connect()
Real-time Events
# Listen for server events
@client.on("tool_added")
async def on_new_tool(tool_info):
print(f"New tool available: {tool_info.name}")
@client.on("connection_lost")
async def on_disconnect():
await client.reconnect()
๐ Monitoring & Performance
Built-in Metrics
# Get performance statistics
stats = client.get_stats()
print(f"Tools called: {stats.tools_called}")
print(f"Average response time: {stats.avg_response_time}ms")
print(f"Success rate: {stats.success_rate}%")
Custom Logging
import logging
# Enable debug logging
logging.getLogger("py_agent_client").setLevel(logging.DEBUG)
๐ง Configuration
Environment Variables
export IAP_SERVER_URL="ws://localhost:8080"
export IAP_TIMEOUT=30
export IAP_API_KEY="your_api_key"
Configuration File
# config.py
IAP_CONFIG = {
"server_url": "ws://localhost:8080",
"timeout": 30,
"retry_attempts": 3,
"tools": {
"enabled": ["file_ops", "web_scraper", "calculator"]
}
}
๐ง Ecosystem Status
| Package | Status | Description |
|---|---|---|
| py-agent-client | โ Available Now | Full-featured MCP client |
| py-agent-core | ๐ง In Development | Foundation & shared utilities |
| py-agent-server | ๐ง In Development | Build MCP servers |
| py-agent-tool | ๐ง In Development | Development & debugging tools |
| py-agent-resources | ๐ง In Development | Templates & examples |
๐ Resources
- ๐ Documentation
- ๐ฏ Examples
- ๐ Issues
- ๐ฌ Discussions
๐ค Contributing
Contributions are welcome! Please visit our GitHub repository for contribution guidelines.
Development Setup
git clone https://github.com/fmonfasani/intelligent-agents-platform
cd intelligent-agents-platform
pip install -e .[dev,test]
pytest tests/
๐ License
Licensed under the MIT License - see LICENSE for details.
๐ Start building intelligent agents today!
Built with โค๏ธ by Federico Monfasani
Part of the Intelligent Agents Platform
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 py_agent_client-0.0.2.dev1.tar.gz.
File metadata
- Download URL: py_agent_client-0.0.2.dev1.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6fbe19ebb5d762711e2aabe3fece5a51ea08bb2814ab39da1871f264ccba417f
|
|
| MD5 |
13d88343f782459c63c5a8611fb60a4c
|
|
| BLAKE2b-256 |
dd09d6073af673ec0545241390b8c674e2f60b86f3cca302439d39f577dff6d8
|
File details
Details for the file py_agent_client-0.0.2.dev1-py3-none-any.whl.
File metadata
- Download URL: py_agent_client-0.0.2.dev1-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
983b43dd068400c8f3832429ab6564356a6acbb8c5a56af5c55b587c9e34c665
|
|
| MD5 |
fc8aedeefa1b2f5bc530e278f920da0e
|
|
| BLAKE2b-256 |
0144029af19ee1121303fca3759f3783367ad482e27fcef2b6f82a0a5e6a55ab
|