A powerful and flexible AI agent framework in Python
Project description
Psynova - A Powerful and Flexible AI Agent Framework
Psynova is a Python-based AI agent framework that enables developers to create, manage, and interact with AI agents through a simple yet powerful API interface.
Key Features
-
Easy Agent Management
-
Create custom AI agents with unique configurations
-
Support for both HTTPS and WebSocket communications
-
Flexible version control for agent deployments
-
-
Simple Authentication
-
Secure private key-based authentication
-
Token-based API access
-
-
Streamlined Communication
-
Direct chat interface with agents
-
RESTful API integration
-
Configurable timeout settings
-
Technical Requirements
-
Python 3.10 or higher
-
Dependencies:
- requests 2.31.0
Quick Start
Installation
pip install psynova==1.2
Basic Usage
from psynova import PsynovaClient
# Initialize the client
client = PsynovaClient(
private_key="your_private_key",
base_url="https://api.psynova.ai" # Optional: defaults to dev environment
)
# Create a new agent
agent_id = client.create_agent(
name="My AI Agent",
version_id=1,
using_https=True,
using_socket=True
)
# Chat with the agent
response = client.chat(
agent_id=agent_id,
message="Hello, AI agent!"
)
print(response)
Error Handling
The framework includes robust error handling through the PsynovaAPIError class, which provides detailed error messages and optional additional error context when API requests fail.
try:
response = client.chat(agent_id=1, message="Hello")
except PsynovaAPIError as e:
print(f"Error: {str(e)}")
if e.errors:
print(f"Additional details: {e.errors}")
API Reference
PsynovaClient
Constructor
client = PsynovaClient(private_key, base_url="https://api.psynova.ai", timeout=30)
private_key(str): Private key for authenticationbase_url(str, optional): Base URL for API. Defaults to development environmenttimeout(int, optional): Request timeout in seconds. Defaults to 30
Methods
get_agent(agent_id)
Retrieves details of a specific agent.
agent = client.get_agent(agent_id=1)
Returns: Dictionary containing agent details (id, name, version_id, status)
list_agents()
Lists all agents associated with the account.
agents = client.list_agents()
Returns: List of dictionaries containing agent details
chat(agent_id, message)
Sends a chat message to an agent.
response = client.chat(agent_id=1, message="Hello!")
Returns: String containing the agent's response
create_agent(name, version_id, using_https=True, using_socket=True)
Creates a new agent with specified configuration.
agent_id = client.create_agent(
name="My Agent",
version_id=1,
using_https=True,
using_socket=True
)
Returns: Integer ID of the newly created agent
Current Version
The current version of Psynova is v1.0, indicating a stable release ready for production use.
This framework appears to be designed for developers who need to integrate AI agents into their applications with minimal setup while maintaining flexibility for various use cases. The API design follows RESTful principles and provides a clean, intuitive interface for agent interactions.
Project details
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 psynova-1.4.tar.gz.
File metadata
- Download URL: psynova-1.4.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.10.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7cdc9c9a467d75673bca4b2b85b31dd7f72ac1a431f968e62226dbb50c43a99e
|
|
| MD5 |
b7ae2e663fe40b9b6bd65cdbcaf952fa
|
|
| BLAKE2b-256 |
f2e9690ff379f71786f81b5e55a496d5363f0df8265ec8d9641d3561552786b4
|
File details
Details for the file psynova-1.4-py3-none-any.whl.
File metadata
- Download URL: psynova-1.4-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.10.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3fec5a870ea76a22cfb82026a63a3472c985bb87dfdc6ed21b2461a70db0eff6
|
|
| MD5 |
ab90cf154dc95e69263766117e6c6901
|
|
| BLAKE2b-256 |
6c3e64a16b977a48a912009cbcfab7cd2a203beb4545948097301caca4e02ffd
|