Name | agentsys JSON |
Version |
0.7.0
JSON |
| download |
home_page | None |
Summary | An educational multi-agent orchestration framework |
upload_time | 2024-11-18 04:40:57 |
maintainer | None |
docs_url | None |
author | lifsys |
requires_python | >=3.10 |
license | MIT License Copyright (c) 2024 OpenAI Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
ai
agents
orchestration
multi-agent
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
![AgentSys Logo](assets/logo.png)
# AgentSys (experimental, educational)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
> AgentSys is currently an experimental sample framework intended to explore ergonomic interfaces for multi-agent systems. It is not intended to be used in production, and therefore has no official support. (This also means we will not be reviewing PRs or issues!)
> The primary goal of AgentSys is to showcase the handoff & routines patterns explored in the [Orchestrating Agents: Handoffs & Routines](https://cookbook.openai.com/examples/orchestrating_agents) cookbook. It is not meant as a standalone library, and is primarily for educational purposes.
## Installation
### SSH
```bash
pip install git+ssh://git@github.com/lifsys/agentsys.git
```
### HTTPS
```bash
pip install git+https://github.com/lifsys/agentsys.git
```
## Project Structure
The project is organized into several key modules:
- `agentsys.orchestration`: Core orchestration functionality
- `Swarm`: Main orchestration class for managing agent interactions
- `Agent`: Base class for defining agents
- `agentsys.models`: Model interfaces and implementations
- `BaseModel`: Abstract base class for model implementations
- `OpenAIModel`: OpenAI model implementation
- `agentsys.config`: Configuration management
- `Settings`: Configuration settings and utilities
- `agentsys.types`: Type definitions and data structures
- `agentsys.util`: Utility functions and helpers
## Basic Usage
```python
from agentsys import Swarm, Agent
client = Swarm()
agent = Agent(
name="test",
instructions="You are a helpful assistant.",
model="gpt-4",
)
messages = [{"role": "user", "content": "Hello!"}]
response = client.run(agent, messages)
print(response.messages[-1]["content"])
```
## Function Calling
AgentSys supports function calling with both OpenAI's function calling and tool calling APIs:
```python
def get_weather(location: str) -> str:
"""Get the weather for a location."""
return f"The weather in {location} is sunny!"
agent = Agent(
name="weather",
instructions="You can help users check the weather.",
model="gpt-4",
functions=[get_weather],
)
messages = [{"role": "user", "content": "What's the weather in San Francisco?"}]
response = client.run(agent, messages)
print(response.messages[-1]["content"])
```
## Configuration
You can configure AgentSys using environment variables or by passing a config object:
```python
from agentsys import Settings
settings = Settings(
openai_api_key="your-api-key",
temperature=0.7,
)
```
### Swarm Client
The `Swarm` class is the main entry point for interacting with agents. It handles:
- Message routing
- Function calling
- Response streaming
- Error handling
## Contributing
This is an experimental project and we are not accepting contributions at this time.
## License
MIT
Raw data
{
"_id": null,
"home_page": null,
"name": "agentsys",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "ai, agents, orchestration, multi-agent",
"author": "lifsys",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/8a/6b/f0772b4df0accd45aaff74746f4d479495d898b4ac3fd1874b6813dd50ce/agentsys-0.7.0.tar.gz",
"platform": null,
"description": "![AgentSys Logo](assets/logo.png)\n\n# AgentSys (experimental, educational)\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n> AgentSys is currently an experimental sample framework intended to explore ergonomic interfaces for multi-agent systems. It is not intended to be used in production, and therefore has no official support. (This also means we will not be reviewing PRs or issues!)\n\n> The primary goal of AgentSys is to showcase the handoff & routines patterns explored in the [Orchestrating Agents: Handoffs & Routines](https://cookbook.openai.com/examples/orchestrating_agents) cookbook. It is not meant as a standalone library, and is primarily for educational purposes.\n\n## Installation\n\n### SSH\n\n```bash\npip install git+ssh://git@github.com/lifsys/agentsys.git\n```\n\n### HTTPS\n\n```bash\npip install git+https://github.com/lifsys/agentsys.git\n```\n\n## Project Structure\n\nThe project is organized into several key modules:\n\n- `agentsys.orchestration`: Core orchestration functionality\n - `Swarm`: Main orchestration class for managing agent interactions\n - `Agent`: Base class for defining agents\n- `agentsys.models`: Model interfaces and implementations\n - `BaseModel`: Abstract base class for model implementations\n - `OpenAIModel`: OpenAI model implementation\n- `agentsys.config`: Configuration management\n - `Settings`: Configuration settings and utilities\n- `agentsys.types`: Type definitions and data structures\n- `agentsys.util`: Utility functions and helpers\n\n## Basic Usage\n\n```python\nfrom agentsys import Swarm, Agent\n\nclient = Swarm()\nagent = Agent(\n name=\"test\",\n instructions=\"You are a helpful assistant.\",\n model=\"gpt-4\",\n)\n\nmessages = [{\"role\": \"user\", \"content\": \"Hello!\"}]\nresponse = client.run(agent, messages)\nprint(response.messages[-1][\"content\"])\n```\n\n## Function Calling\n\nAgentSys supports function calling with both OpenAI's function calling and tool calling APIs:\n\n```python\ndef get_weather(location: str) -> str:\n \"\"\"Get the weather for a location.\"\"\"\n return f\"The weather in {location} is sunny!\"\n\nagent = Agent(\n name=\"weather\",\n instructions=\"You can help users check the weather.\",\n model=\"gpt-4\",\n functions=[get_weather],\n)\n\nmessages = [{\"role\": \"user\", \"content\": \"What's the weather in San Francisco?\"}]\nresponse = client.run(agent, messages)\nprint(response.messages[-1][\"content\"])\n```\n\n## Configuration\n\nYou can configure AgentSys using environment variables or by passing a config object:\n\n```python\nfrom agentsys import Settings\n\nsettings = Settings(\n openai_api_key=\"your-api-key\",\n temperature=0.7,\n)\n```\n\n### Swarm Client\n\nThe `Swarm` class is the main entry point for interacting with agents. It handles:\n\n- Message routing\n- Function calling\n- Response streaming\n- Error handling\n\n## Contributing\n\nThis is an experimental project and we are not accepting contributions at this time.\n\n## License\n\nMIT\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2024 OpenAI Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
"summary": "An educational multi-agent orchestration framework",
"version": "0.7.0",
"project_urls": {
"Homepage": "https://github.com/lifsys/agentsys",
"Issues": "https://github.com/lifsys/agentsys/issues"
},
"split_keywords": [
"ai",
" agents",
" orchestration",
" multi-agent"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "cde53d1b837ed5080d845c1f30039ca8a5ff23117fb2898e81dd11fa203f43b3",
"md5": "fa521bf05b24ce0e612b962dfa4fd687",
"sha256": "77bdd38aeb5394fa90cd74575ae644feb7e9fb5ffcac86a7299b0571c3406a4c"
},
"downloads": -1,
"filename": "agentsys-0.7.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "fa521bf05b24ce0e612b962dfa4fd687",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 6322,
"upload_time": "2024-11-18T04:40:56",
"upload_time_iso_8601": "2024-11-18T04:40:56.164518Z",
"url": "https://files.pythonhosted.org/packages/cd/e5/3d1b837ed5080d845c1f30039ca8a5ff23117fb2898e81dd11fa203f43b3/agentsys-0.7.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "8a6bf0772b4df0accd45aaff74746f4d479495d898b4ac3fd1874b6813dd50ce",
"md5": "3c294aa82e29f9d4898787491efa946e",
"sha256": "42fd3ec05817bbee05d7837547cd7ad56e6d5a61e1ecc404a5751b910b4e8c75"
},
"downloads": -1,
"filename": "agentsys-0.7.0.tar.gz",
"has_sig": false,
"md5_digest": "3c294aa82e29f9d4898787491efa946e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 12994,
"upload_time": "2024-11-18T04:40:57",
"upload_time_iso_8601": "2024-11-18T04:40:57.680715Z",
"url": "https://files.pythonhosted.org/packages/8a/6b/f0772b4df0accd45aaff74746f4d479495d898b4ac3fd1874b6813dd50ce/agentsys-0.7.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-18 04:40:57",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "lifsys",
"github_project": "agentsys",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "agentsys"
}