Skip to main content

BossNet AI Agent Toolkit - Python library for building AI-powered agents

Project description

BossNet AI Agent Toolkit

Build Status Documentation Status PyPI version

BossNet AI Agent Toolkit is a Python library for building AI-powered agents. It provides a comprehensive set of tools and utilities for building, training, and deploying AI agents. BossKit is designed to be modular and extensible, allowing users to easily add new features and functionality to their agents.

Installation

Prerequisites

  • Python 3.11 or higher
  • Git
  • pip (Python package manager)

Using pip

To install BossKit using pip:

pip install bosskit

From Source

  1. Clone the repository:
git clone https://github.com/boss-net/ai-masterclass.git
cd ai-masterclass
  1. Create a virtual environment (recommended):
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt
  1. Install in development mode:
pip install -e .

Getting Started

Basic Usage

To create a new AI agent project:

bosskit init my_agent

This will create a new project structure with:

  • Basic configuration files
  • Example agent implementation
  • Testing setup

Configuration

BossKit uses environment variables for configuration. Create a .env file based on the .env.example template:

cp .env.example .env

Edit the .env file to configure your agent's behavior:

  • AGENT_NAME: Name of your AI agent
  • MODEL_PATH: Path to your AI model
  • API_KEY: API key for external services (if needed)

Running Your Agent

To run your AI agent:

bosskit run

Or with specific configuration:

bosskit run --config path/to/config.yaml

Features

  • Modular agent architecture
  • Built-in support for popular AI models
  • Easy configuration management
  • Built-in monitoring and logging
  • Extensible plugin system
  • Development tools and utilities

Development

Setting up Development Environment

  1. Install development dependencies:

  2. Fork the repository

  3. Create your feature branch (git checkout -b feature/amazing-feature)

  4. Set up development environment:

    # Install pre-commit hooks
    pip install pre-commit
    pre-commit install
    
    # Install development dependencies
    pip install -r requirements-dev.txt
    
  5. Make your changes and ensure they follow our code style:

    • Use type hints for all public functions and classes
    • Follow PEP 8 style guidelines
    • Write clear docstrings using Google style
    • Keep lines under 88 characters
    • Use descriptive variable names
  6. Run tests and checks:

    # Run all tests
    pytest
    
    # Run type checking
    mypy .
    
    # Run linting
    flake8 .
    
  7. Commit your changes with a descriptive message

  8. Push to the branch (git push origin feature/amazing-feature)

  9. Open a Pull Request

Code Style Guidelines

  • Use type hints for all public interfaces
  • Follow Google-style docstrings:
    def function_name(param: type) -> return_type:
        """Brief description.
    
        Args:
            param: Description of the parameter
    
        Returns:
            Description of the return value
        """
    
  • Use descriptive variable names
  • Keep functions focused and single-purpose
  • Use context managers for file operations
  • Handle exceptions appropriately
  • Write unit tests for new functionality

Type Hints

All public functions and classes should have proper type hints. For example:

from typing import List, Optional, Dict

def process_data(
    data: List[str],
    config: Optional[Dict[str, Any]] = None
) -> List[str]:
    """Process input data with optional configuration.

    Args:
        data: List of input strings to process
        config: Optional configuration dictionary

    Returns:
        Processed data as list of strings
    """
    pass

Error Handling

  • Use specific exceptions rather than bare except clauses
  • Provide clear error messages
  • Use context managers for resource cleanup
  • Handle common error cases gracefully

Testing

  • Write unit tests for new functionality
  • Use pytest fixtures for test setup
  • Mock external dependencies
  • Test error conditions
  • Keep tests focused and isolated

Documentation

  • Update relevant documentation when making changes
  • Keep README.md up-to-date
  • Document new features and breaking changes
  • Include usage examples where applicable

Git Workflow

  • Use feature branches for new development
  • Keep commits focused and atomic
  • Write descriptive commit messages
  • Rebase before merging
  • Use conventional commit messages:
    • feat: for new features
    • fix: for bug fixes
    • docs: for documentation changes
    • style: for formatting changes
    • refactor: for code refactoring
    • test: for adding missing tests
    • chore: for maintenance tasks

Security

  • Never commit sensitive information
  • Use environment variables for configuration
  • Handle API keys securely
  • Follow security best practices
  • Regularly update dependencies

Contributing

We welcome contributions from the community! Please follow these guidelines:

  1. Check for existing issues before creating new ones
  2. Follow our code style and guidelines
  3. Write tests for new features
  4. Update documentation
  5. Be respectful and professional in all communications

By contributing to this project, you agree to abide by our Code of Conduct.

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

Support

For support, please open an issue on the GitHub Issues page.

Contributing

Contributions are welcome! Please read our Contributing Guidelines before submitting a pull request.

Acknowledgments

  • Thanks to all contributors who have helped make this project possible
  • Special thanks to the open source community for their support and contributions

Documentation

For more detailed documentation, visit our ReadTheDocs page

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

bosskit-0.0.1.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bosskit-0.0.1-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file bosskit-0.0.1.tar.gz.

File metadata

  • Download URL: bosskit-0.0.1.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for bosskit-0.0.1.tar.gz
Algorithm Hash digest
SHA256 a6f5f17c56b402bff820e2abb5881df272916616a7cdcaa08bb8a42aaad7e384
MD5 80ec1d4197d128f6dbbc0918013e47ca
BLAKE2b-256 259cf2eb4edfe556fe02aa9ac6a131174bf9e9752d5a396d3d7a5d8417317d27

See more details on using hashes here.

File details

Details for the file bosskit-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: bosskit-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for bosskit-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9fae8736680141359633199bc97970d3dcdfc53cafeaba40296ad46c0b0de695
MD5 8eaa36adde11b2d7f1229d64778bb2dd
BLAKE2b-256 3f357cd82a7c99ed27afef7e1d637dc3fda2479c5bcd42bc068b5264a2adfc70

See more details on using hashes here.

Supported by

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