[](https://badge.fury.io/py/base-agent)
[](https://opensource.org/licenses/MIT)
[](https://pepy.tech/project/base-agent)
# BaseAgent
`BaseAgent` is an abstract base class designed to support the development of various agent-based systems. It provides a structured approach to creating agents with initialization, execution, and cleanup phases.
## Installation
To install `BaseAgent`, you can use pip directly from GitHub:
```bash
pip install git+https://github.com/chigwell/BaseAgent.git
```
## Usage
`BaseAgent` is intended to be subclassed by other classes that implement specific agent behaviors. Here's an example of how to create a concrete agent:
```python
from base_agent import BaseAgent
class MyAgent(BaseAgent):
def initialize(self, config):
print("Initializing with config:", config)
def execute(self, task):
print("Executing task:", task)
return "Task Completed"
def finalize(self):
print("Cleaning up resources.")
# Example usage
if __name__ == "__main__":
agent = MyAgent()
agent.initialize(config={"setting": "value"})
result = agent.execute(task="Example Task")
print(result)
agent.finalize()
```
This example demonstrates the basic structure of an agent that can be built using the `BaseAgent` framework.
## Contributing
Contributions, issues, and feature requests are welcome! Feel free to check the [issues page](https://github.com/chigwell/BaseAgent/issues).
## License
This project is licensed under the [MIT License](https://choosealicense.com/licenses/mit/).
Raw data
{
"_id": null,
"home_page": "https://github.com/chigwell/BaseAgent",
"name": "base-agent",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": null,
"author": "Eugene Evstafev",
"author_email": "chigwel@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/cd/00/0d17a7231b00b3a077416280bf02d71475db3a92d7791efa552f0dc1afa0/base-agent-0.1.1.tar.gz",
"platform": null,
"description": "[](https://badge.fury.io/py/base-agent)\n[](https://opensource.org/licenses/MIT)\n[](https://pepy.tech/project/base-agent)\n\n# BaseAgent\n\n`BaseAgent` is an abstract base class designed to support the development of various agent-based systems. It provides a structured approach to creating agents with initialization, execution, and cleanup phases.\n\n## Installation\n\nTo install `BaseAgent`, you can use pip directly from GitHub:\n\n```bash\npip install git+https://github.com/chigwell/BaseAgent.git\n```\n\n## Usage\n\n`BaseAgent` is intended to be subclassed by other classes that implement specific agent behaviors. Here's an example of how to create a concrete agent:\n\n```python\nfrom base_agent import BaseAgent\n\nclass MyAgent(BaseAgent):\n def initialize(self, config):\n print(\"Initializing with config:\", config)\n\n def execute(self, task):\n print(\"Executing task:\", task)\n return \"Task Completed\"\n\n def finalize(self):\n print(\"Cleaning up resources.\")\n\n# Example usage\nif __name__ == \"__main__\":\n agent = MyAgent()\n agent.initialize(config={\"setting\": \"value\"})\n result = agent.execute(task=\"Example Task\")\n print(result)\n agent.finalize()\n```\n\nThis example demonstrates the basic structure of an agent that can be built using the `BaseAgent` framework.\n\n## Contributing\n\nContributions, issues, and feature requests are welcome! Feel free to check the [issues page](https://github.com/chigwell/BaseAgent/issues).\n\n## License\n\nThis project is licensed under the [MIT License](https://choosealicense.com/licenses/mit/).\n",
"bugtrack_url": null,
"license": null,
"summary": "An abstract base class for building various agent-based systems.",
"version": "0.1.1",
"project_urls": {
"Homepage": "https://github.com/chigwell/BaseAgent"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "832b87d093925a6d838c5a72bb87d8b5869b57ea5f6f3d53d57772513f5ed84f",
"md5": "5681ffdf3f5d93950c595de6f9fd4333",
"sha256": "69fe287a8b8bb93831ef2c1c28d0fe6b108c18246c68c1458d6aa75367edfbf9"
},
"downloads": -1,
"filename": "base_agent-0.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "5681ffdf3f5d93950c595de6f9fd4333",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 3788,
"upload_time": "2024-04-27T17:29:13",
"upload_time_iso_8601": "2024-04-27T17:29:13.215459Z",
"url": "https://files.pythonhosted.org/packages/83/2b/87d093925a6d838c5a72bb87d8b5869b57ea5f6f3d53d57772513f5ed84f/base_agent-0.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "cd000d17a7231b00b3a077416280bf02d71475db3a92d7791efa552f0dc1afa0",
"md5": "09ca83388bc6176bdf4c54b1207108ea",
"sha256": "4a00216156838c3eec173ae3cb075b0d3d268f17c404e9c6f43f25ae38ab66e0"
},
"downloads": -1,
"filename": "base-agent-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "09ca83388bc6176bdf4c54b1207108ea",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 3198,
"upload_time": "2024-04-27T17:29:15",
"upload_time_iso_8601": "2024-04-27T17:29:15.577292Z",
"url": "https://files.pythonhosted.org/packages/cd/00/0d17a7231b00b3a077416280bf02d71475db3a92d7791efa552f0dc1afa0/base-agent-0.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-27 17:29:15",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "chigwell",
"github_project": "BaseAgent",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "base-agent"
}