Table of Contents
Why Agentspro?
Agentspro is a powerful Python SDK that enables you to seamlessly connect your local Python functions to the Agentspro platform through elegant decorators. With just a simple @agent(name=...) decorator, you can transform any Python function into a cloud-accessible AI agent.
- Zero Configuration: Simply add decorators to your functions
- Seamless Integration: Direct connection to Agentspro platform APIs
- Type Safety: Complete type validation based on Pydantic
- Real-time Sync: Automatic function registration and updates
Quick Start
Prerequisites
- Python 3.11+
- Agentspro account (sign up at agentspro.com)
Installation
pip install agentspro
Basic Usage
from agentspro import agent, init_agentspro
# Initialize with your API credentials
init_agentspro(
api_key="your_api_key",
api_secret="your_api_secret"
)
# Transform any function into an AI agent
@agent(name="weather_checker")
def get_weather(city: str) -> str:
"""Get weather information for a specific city."""
# Your function logic here
return f"The weather in {city} is sunny and 25°C"
@agent(name="calculator")
def calculate(expression: str) -> float:
"""Calculate mathematical expressions."""
return eval(expression) # Note: Use safe_eval in production
Core Features
Decorator-Based Agent Registration
from agentspro import agent
@agent(
name="data_processor",
description="Process and analyze data",
tags=["data", "analysis"],
version="1.0.0"
)
def process_data(data: list, operation: str) -> dict:
"""Process data with specified operation."""
# Your processing logic
return {"result": "processed", "count": len(data)}
Automatic Type Validation
from typing import List, Dict
from agentspro import agent
@agent(name="user_manager")
def create_user(
name: str,
age: int,
skills: List[str],
metadata: Dict[str, str] = None
) -> Dict[str, any]:
"""Create a new user with validation."""
return {
"id": "user_123",
"name": name,
"age": age,
"skills": skills,
"metadata": metadata or {}
}
Configuration Options
from agentspro import agent, AgentConfig
@agent(
name="advanced_agent",
config=AgentConfig(
timeout=30,
retry_attempts=3,
cache_enabled=True,
rate_limit=100
)
)
def advanced_function(param: str) -> str:
"""An advanced agent with custom configuration."""
return f"Processed: {param}"
Examples
Data Processing Agent
from agentspro import agent
import pandas as pd
@agent(name="csv_analyzer")
def analyze_csv(file_path: str) -> dict:
"""Analyze CSV file and return statistics."""
df = pd.read_csv(file_path)
return {
"rows": len(df),
"columns": len(df.columns),
"summary": df.describe().to_dict()
}
Web Scraping Agent
from agentspro import agent
import requests
from bs4 import BeautifulSoup
@agent(name="web_scraper")
def scrape_title(url: str) -> str:
"""Extract title from a webpage."""
response = requests.get(url)
soup = BeautifulSoup(response.content, 'html.parser')
return soup.title.string if soup.title else "No title found"
AI Integration Agent
from agentspro import agent
from openai import OpenAI
client = OpenAI()
@agent(name="text_summarizer")
def summarize_text(text: str, max_length: int = 100) -> str:
"""Summarize text using AI."""
response = client.chat.completions.create(
model="gpt-3.5-turbo",
messages=[
{"role": "system", "content": "Summarize the following text concisely."},
{"role": "user", "content": text}
],
max_tokens=max_length
)
return response.choices[0].message.content
Platform Integration
Once you've decorated your functions with @agent, they automatically become available on the Agentspro platform where you can:
- Monitor Usage: Track function calls and performance
- Manage Versions: Deploy and rollback different versions
- Configure Access: Set permissions and rate limits
- View Analytics: Analyze usage patterns and optimization opportunities
Contributing
We welcome community contributions! Please check the contribution guidelines for detailed processes.
Development Workflow
- Fork this project
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Create a Pull Request
Contribution Types
- Bug fixes
- New feature development
- Documentation improvements
- Test cases
- Platform integrations
License
This project is licensed under the MIT License - see the LICENSE file for details.
Metadata
Release files for agentspro 0.1.1
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 |
|---|---|---|---|---|
| agentspro-0.1.1.tar.gz | 44.6 kB | Without provenance | Details for agentspro-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| agentspro-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for agentspro-0.1.1-py3-none-any.whl |
Total release size: 90.5 kB
Release files / agentspro-0.1.1.tar.gz
| Download URL | agentspro-0.1.1.tar.gz |
|---|---|
| Size | 44.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
726ba23b260d038526a2c86002939aa66d9a1d7113ac9782fbbe54d32dee9e2a
|
|
BLAKE2b-256 checksum How to use checksums |
ef31dc6836cf251c325d84bd387cc0f127aa9fe926342ce440df7165fe99d99f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.9
|
Release files / agentspro-0.1.1-py3-none-any.whl
| Download URL | agentspro-0.1.1-py3-none-any.whl |
|---|---|
| Size | 45.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
725c00d1d808ee2bc2f4b98a26c56397365b83e75a90f03ed590aad528da11d9
|
|
BLAKE2b-256 checksum How to use checksums |
5b11edceb9d988ea5f2598b6ae1e85e4b8c158e37c963e6aaefabe124e83d52d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.9
|
Security for agentspro 0.1.1
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.