# Lyzr Agent API Python Client


[](https://opensource.org/licenses/MIT)
A Python client library for interacting with the Lyzr Agent API. This client provides a convenient and structured way to access the various functionalities offered by the API, including managing environments, agents, tools, handling inference requests, and interacting with user data and workflows.
## Table of Contents
* [Description](#description)
* [Installation](#installation)
* [Quick Start](#quick-start)
* [API Sections](#api-sections)
* [Agents (v3)](#agents-v3)
* [Providers (v3)](#providers-v3)
* [Tools (v3)](#tools-v3)
* [Inference (v3)](#inference-v3)
* [Semantic Model (v3)](#semantic-model-v3)
* [Users (v1)](#users-v1)
* [Workflows (v3)](#workflows-v3)
* [Ops (v3)](#ops-v3)
* [Authentication](#authentication)
* [Error Handling](#error-handling)
* [Contributing](#contributing)
* [License](#license)
## Description
The Lyzr Agent API is a modular, universal agent framework designed to simplify the creation of LLM-based agents. This Python client library aims to provide a seamless Python interface to interact with the API, abstracting away the HTTP request details and providing dedicated client objects for each major API section.
The framework's architecture is divided into three main components:
* **Environment:** Defines the modules, features, available tools, and other configurations for your agent.
* **Agent:** Specifies your agent's configuration, including the system prompt, name, and persona. The agent operates within an environment identified by an environment ID.
* **Inference:** Handles the processing and execution of tasks and conversations.
This client library provides specific client classes for different API versions and functionalities, organized for clarity and ease of use.
## Installation
You can install the package using pip:
```bash
pip install lyzr-python-sdk
```
### Quick Start
Here's a basic example demonstrating how to initialize the client and make a simple API call:
```python
from lyzr_python_sdk import LyzrAgentAPI
import os
# Replace with your actual API key.
# It's recommended to use environment variables for sensitive information.
api_key = os.environ.get("LYZR_AGENT_API_KEY")
if not api_key:
raise ValueError("LYZR_AGENT_API_KEY environment variable not set.")
try:
# Initialize the main client
client = LyzrAgentAPI(api_key=api_key)
# Access a specific API section (e.g., Agents)
print("Fetching agents...")
agents = client.agents.get_agents_by_api_key()
print("All Agents:", agents)
except Exception as e:
print(f"An error occurred: {e}")
```
### Contributing
We welcome contributions to this Python client library! If you find a bug, have a feature request, or want to improve the documentation, please open an issue or submit a pull request on the GitHub repository.
- Fork the repository.
- Create a new branch for your feature or bugfix.
- Make your changes and write tests.
- Ensure tests pass.
- Submit a pull request.
Raw data
{
"_id": null,
"home_page": "https://github.com/LyzrCore/lyzr-python",
"name": "lyzr-python-sdk",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "Lyzr <support@lyzr.ai>",
"keywords": "lyzr, agent, api, client, llm, artificial intelligence",
"author": "Lyzr",
"author_email": "Lyzr <support@lyzr.ai>",
"download_url": "https://files.pythonhosted.org/packages/95/13/1ae0d66c09560e697231b03f196c84a2ccb8ddfd009d421f61275294569c/lyzr_python_sdk-0.1.1.tar.gz",
"platform": null,
"description": "# Lyzr Agent API Python Client\n\n\n\n[](https://opensource.org/licenses/MIT)\n\nA Python client library for interacting with the Lyzr Agent API. This client provides a convenient and structured way to access the various functionalities offered by the API, including managing environments, agents, tools, handling inference requests, and interacting with user data and workflows.\n\n## Table of Contents\n\n* [Description](#description)\n* [Installation](#installation)\n* [Quick Start](#quick-start)\n* [API Sections](#api-sections)\n * [Agents (v3)](#agents-v3)\n * [Providers (v3)](#providers-v3)\n * [Tools (v3)](#tools-v3)\n * [Inference (v3)](#inference-v3)\n * [Semantic Model (v3)](#semantic-model-v3)\n * [Users (v1)](#users-v1)\n * [Workflows (v3)](#workflows-v3)\n * [Ops (v3)](#ops-v3)\n* [Authentication](#authentication)\n* [Error Handling](#error-handling)\n* [Contributing](#contributing)\n* [License](#license)\n\n## Description\n\nThe Lyzr Agent API is a modular, universal agent framework designed to simplify the creation of LLM-based agents. This Python client library aims to provide a seamless Python interface to interact with the API, abstracting away the HTTP request details and providing dedicated client objects for each major API section.\n\nThe framework's architecture is divided into three main components:\n\n* **Environment:** Defines the modules, features, available tools, and other configurations for your agent.\n* **Agent:** Specifies your agent's configuration, including the system prompt, name, and persona. The agent operates within an environment identified by an environment ID.\n* **Inference:** Handles the processing and execution of tasks and conversations.\n\nThis client library provides specific client classes for different API versions and functionalities, organized for clarity and ease of use.\n\n## Installation\n\nYou can install the package using pip:\n\n```bash\npip install lyzr-python-sdk\n```\n\n### Quick Start\nHere's a basic example demonstrating how to initialize the client and make a simple API call:\n\n```python\nfrom lyzr_python_sdk import LyzrAgentAPI\nimport os\n\n# Replace with your actual API key.\n# It's recommended to use environment variables for sensitive information.\napi_key = os.environ.get(\"LYZR_AGENT_API_KEY\")\nif not api_key:\n raise ValueError(\"LYZR_AGENT_API_KEY environment variable not set.\")\n\ntry:\n # Initialize the main client\n client = LyzrAgentAPI(api_key=api_key)\n\n # Access a specific API section (e.g., Agents)\n print(\"Fetching agents...\")\n agents = client.agents.get_agents_by_api_key()\n print(\"All Agents:\", agents)\n\nexcept Exception as e:\n print(f\"An error occurred: {e}\")\n```\n\n### Contributing\nWe welcome contributions to this Python client library! If you find a bug, have a feature request, or want to improve the documentation, please open an issue or submit a pull request on the GitHub repository.\n\n- Fork the repository.\n- Create a new branch for your feature or bugfix.\n- Make your changes and write tests.\n- Ensure tests pass.\n- Submit a pull request.\n",
"bugtrack_url": null,
"license": null,
"summary": "A Python client library for interacting with the Lyzr Agent API",
"version": "0.1.1",
"project_urls": {
"Bug Reports": "https://github.com/LyzrCore/lyzr-python/issues",
"Documentation": "https://docs.lyzr.ai",
"Homepage": "https://github.com/LyzrCore/lyzr-python",
"Repository": "https://github.com/LyzrCore/lyzr-python"
},
"split_keywords": [
"lyzr",
" agent",
" api",
" client",
" llm",
" artificial intelligence"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "9a64b51e37b4df6f8bba1acaf6eab85dced612a3b5f01c69236dc6ad1b72109b",
"md5": "f009216bae67dceeaba9cc3ba8887dfe",
"sha256": "ed7bb7308e80cee2bdb9acd7044761da8272c3060f450014292442bbba0b3df9"
},
"downloads": -1,
"filename": "lyzr_python_sdk-0.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f009216bae67dceeaba9cc3ba8887dfe",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 14088,
"upload_time": "2025-08-22T12:30:44",
"upload_time_iso_8601": "2025-08-22T12:30:44.045039Z",
"url": "https://files.pythonhosted.org/packages/9a/64/b51e37b4df6f8bba1acaf6eab85dced612a3b5f01c69236dc6ad1b72109b/lyzr_python_sdk-0.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "95131ae0d66c09560e697231b03f196c84a2ccb8ddfd009d421f61275294569c",
"md5": "bed63d3815801362eb1575b6d7599169",
"sha256": "91350941c0eeb13aef4a32d8e8663d84b653604fade5ca2bc55b6f4ff8ebff42"
},
"downloads": -1,
"filename": "lyzr_python_sdk-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "bed63d3815801362eb1575b6d7599169",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 12696,
"upload_time": "2025-08-22T12:30:45",
"upload_time_iso_8601": "2025-08-22T12:30:45.325347Z",
"url": "https://files.pythonhosted.org/packages/95/13/1ae0d66c09560e697231b03f196c84a2ccb8ddfd009d421f61275294569c/lyzr_python_sdk-0.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-22 12:30:45",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "LyzrCore",
"github_project": "lyzr-python",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "lyzr-python-sdk"
}