# 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
1. **Easy Agent Management**
- Create custom AI agents with unique configurations
- Support for both HTTPS and WebSocket communications
- Flexible version control for agent deployments
2. **Simple Authentication**
- Secure private key-based authentication
- Token-based API access
3. **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
![Psynova Intro](images/intro.png)
```bash
pip install psynova==1.2
```
### Basic Usage
```python
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.
```python
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
```python
client = PsynovaClient(private_key, base_url="https://api.psynova.ai", timeout=30)
```
- `private_key` (str): Private key for authentication
- `base_url` (str, optional): Base URL for API. Defaults to development environment
- `timeout` (int, optional): Request timeout in seconds. Defaults to 30
#### Methods
##### get_agent(agent_id)
Retrieves details of a specific agent.
```python
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.
```python
agents = client.list_agents()
```
Returns: List of dictionaries containing agent details
##### chat(agent_id, message)
Sends a chat message to an agent.
```python
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.
```python
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.
Raw data
{
"_id": null,
"home_page": "https://psynova.github.io/",
"name": "psynova",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "ai, agent, framework, machine learning, artificial intelligence",
"author": "psynova-dev",
"author_email": "dev@psynova.ai",
"download_url": "https://files.pythonhosted.org/packages/f2/e9/690ff379f71786f81b5e55a496d5363f0df8265ec8d9641d3561552786b4/psynova-1.4.tar.gz",
"platform": null,
"description": "# Psynova - A Powerful and Flexible AI Agent Framework\n\n\nPsynova 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.\n\n\n## Key Features\n\n\n1. **Easy Agent Management**\n\n - Create custom AI agents with unique configurations\n\n - Support for both HTTPS and WebSocket communications\n\n - Flexible version control for agent deployments\n\n2. **Simple Authentication**\n\n - Secure private key-based authentication\n\n - Token-based API access\n\n3. **Streamlined Communication**\n\n - Direct chat interface with agents\n\n - RESTful API integration\n\n - Configurable timeout settings\n\n## Technical Requirements\n\n- Python 3.10 or higher\n\n- Dependencies:\n\n - requests 2.31.0\n\n\n## Quick Start\n\n### Installation\n\n![Psynova Intro](images/intro.png)\n\n```bash\npip install psynova==1.2\n\n```\n\n\n### Basic Usage\n\n```python\nfrom psynova import PsynovaClient\n\n# Initialize the client\nclient = PsynovaClient(\n private_key=\"your_private_key\",\n base_url=\"https://api.psynova.ai\" # Optional: defaults to dev environment\n)\n\n# Create a new agent\nagent_id = client.create_agent(\n name=\"My AI Agent\",\n version_id=1,\n using_https=True,\n using_socket=True\n)\n\n# Chat with the agent\nresponse = client.chat(\n agent_id=agent_id,\n message=\"Hello, AI agent!\"\n)\nprint(response)\n```\n\n\n## Error Handling\n\nThe framework includes robust error handling through the `PsynovaAPIError` class, which provides detailed error messages and optional additional error context when API requests fail.\n\n```python\ntry:\n response = client.chat(agent_id=1, message=\"Hello\")\nexcept PsynovaAPIError as e:\n print(f\"Error: {str(e)}\")\n if e.errors:\n print(f\"Additional details: {e.errors}\")\n```\n\n## API Reference\n\n### PsynovaClient\n\n#### Constructor\n\n```python\nclient = PsynovaClient(private_key, base_url=\"https://api.psynova.ai\", timeout=30)\n```\n\n- `private_key` (str): Private key for authentication\n- `base_url` (str, optional): Base URL for API. Defaults to development environment\n- `timeout` (int, optional): Request timeout in seconds. Defaults to 30\n\n#### Methods\n\n##### get_agent(agent_id)\nRetrieves details of a specific agent.\n\n```python\nagent = client.get_agent(agent_id=1)\n```\n\nReturns: Dictionary containing agent details (id, name, version_id, status)\n\n##### list_agents()\nLists all agents associated with the account.\n\n```python\nagents = client.list_agents()\n```\n\nReturns: List of dictionaries containing agent details\n\n##### chat(agent_id, message)\nSends a chat message to an agent.\n\n```python\nresponse = client.chat(agent_id=1, message=\"Hello!\")\n```\n\nReturns: String containing the agent's response\n\n##### create_agent(name, version_id, using_https=True, using_socket=True)\nCreates a new agent with specified configuration.\n\n```python\nagent_id = client.create_agent(\n name=\"My Agent\",\n version_id=1,\n using_https=True,\n using_socket=True\n)\n```\n\nReturns: Integer ID of the newly created agent\n\n## Current Version\n\nThe current version of Psynova is v1.0, indicating a stable release ready for production use.\n\nThis 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.\n",
"bugtrack_url": null,
"license": null,
"summary": "A powerful and flexible AI agent framework in Python",
"version": "1.4",
"project_urls": {
"Homepage": "https://psynova.github.io/"
},
"split_keywords": [
"ai",
" agent",
" framework",
" machine learning",
" artificial intelligence"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "6c3e64a16b977a48a912009cbcfab7cd2a203beb4545948097301caca4e02ffd",
"md5": "ab90cf154dc95e69263766117e6c6901",
"sha256": "3fec5a870ea76a22cfb82026a63a3472c985bb87dfdc6ed21b2461a70db0eff6"
},
"downloads": -1,
"filename": "psynova-1.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ab90cf154dc95e69263766117e6c6901",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 7809,
"upload_time": "2025-01-09T11:24:17",
"upload_time_iso_8601": "2025-01-09T11:24:17.044746Z",
"url": "https://files.pythonhosted.org/packages/6c/3e/64a16b977a48a912009cbcfab7cd2a203beb4545948097301caca4e02ffd/psynova-1.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "f2e9690ff379f71786f81b5e55a496d5363f0df8265ec8d9641d3561552786b4",
"md5": "b7ae2e663fe40b9b6bd65cdbcaf952fa",
"sha256": "7cdc9c9a467d75673bca4b2b85b31dd7f72ac1a431f968e62226dbb50c43a99e"
},
"downloads": -1,
"filename": "psynova-1.4.tar.gz",
"has_sig": false,
"md5_digest": "b7ae2e663fe40b9b6bd65cdbcaf952fa",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 7366,
"upload_time": "2025-01-09T11:24:20",
"upload_time_iso_8601": "2025-01-09T11:24:20.384472Z",
"url": "https://files.pythonhosted.org/packages/f2/e9/690ff379f71786f81b5e55a496d5363f0df8265ec8d9641d3561552786b4/psynova-1.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-09 11:24:20",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "psynova"
}