Skip to main content

An abstract base class for building various agent-based systems.

Project description

PyPI version License: MIT Downloads

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:

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:

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.

License

This project is licensed under the MIT License.

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

base-agent-0.1.1.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

base_agent-0.1.1-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file base-agent-0.1.1.tar.gz.

File metadata

  • Download URL: base-agent-0.1.1.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.9

File hashes

Hashes for base-agent-0.1.1.tar.gz
Algorithm Hash digest
SHA256 4a00216156838c3eec173ae3cb075b0d3d268f17c404e9c6f43f25ae38ab66e0
MD5 09ca83388bc6176bdf4c54b1207108ea
BLAKE2b-256 cd000d17a7231b00b3a077416280bf02d71475db3a92d7791efa552f0dc1afa0

See more details on using hashes here.

File details

Details for the file base_agent-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: base_agent-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.9

File hashes

Hashes for base_agent-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 69fe287a8b8bb93831ef2c1c28d0fe6b108c18246c68c1458d6aa75367edfbf9
MD5 5681ffdf3f5d93950c595de6f9fd4333
BLAKE2b-256 832b87d093925a6d838c5a72bb87d8b5869b57ea5f6f3d53d57772513f5ed84f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page