Skip to main content

Biz Agent Hub Python SDK

Project description

Biz Agent Hub – Python SDK

The Biz Agent Hub Python SDK provides a simple way to integrate Biz Agent Hub agents (such as Supportbot Elite) into your Python or browser applications.

With this SDK, you can:

  • Initialize a BizAgentHub client with your credentials
  • Interact with Supportbot Elite via a simple query() API
  • Send messages and optional files (for example, images) to the bot
  • Use the SDK from Python

Installation

pip install biz-agent-hub

Quick Start

ES Modules / TypeScript

from biz_agent_hub.biz_agent_hub import BizAgentHub
from biz_agent_hub.supportbot_elite import SupportbotEliteQuery

client = BizAgentHub("<your_user_id>", "<your_api_key>")

supportbot_elite_query = SupportbotEliteQuery(message="what is the color of the flower in the image?")
response = client.supportbot_elite.query(
    supportbot_elite_query
)

print(response.status_code)
print(response.json())

API Reference

BizAgentHub

BizAgentHub("<your_user_id>", "<your_api_key>")

Creates an instance of the Biz Agent Hub client.

  • userId – Your Biz Agent Hub user identifier.

  • apiKey – Your API key for authentication.

Properties

  • supportbot_elite: SupportbotElite

    Interface for interacting with the Supportbot Elite agent.

    • supportbot_elite.query: SupportbotEliteQuery(message: str, file: Optional[File] = None, session_id: Optional[str] = None) -> Any

      Interface for interacting with the Supportbot Elite agent.


SupportbotElite

query(self, params: SupportbotEliteQuery) -> Any

Send a message (and optional file) to Supportbot Elite.

@dataclass
class SupportbotEliteQuery:
    message: str
    file: Optional[BinaryIO] = None  # e.g. an open file object
    session_id: Optional[str] = None

Error Handling

The query() method throws an error when the underlying HTTP request fails or the server responds with an error status.

from biz_agent_hub.supportbot_elite import SupportbotEliteQuery

# 1. Prepare the query object
supportbot_elite_query = SupportbotEliteQuery(
    message='Help me with my issue.',
    # Note: In Python, you typically omit optional fields if they are 
    # None/undefined, or explicitly set them to None.
    file=None,
    sessionId=None,
)

# 2. Execute the API call within a try-except block
try:
    # Synchronous call (standard Python practice unless async is explicitly used)
    response = client.supportbot_elite.query(
        supportbot_elite_query
    )
    
    # Print the response (equivalent to console.log)
    print('Response:', response)
    
except Exception as err:
    # Catch any error during the API call (equivalent to catch(err))
    # Print the error (equivalent to console.error)
    print('Supportbot Elite query failed:', err)

Building From Source

If you are working on the SDK locally:

# Install dependencies (install uv only once)
pip install uv
uv pip install -r pyproject.toml
# Build project -> dist/ (install twine only once)
pip install twine
twine upload dist/*

The compiled Python code will be emitted into the dist directory.


Support

If you encounter problems or have questions:

  • Open an issue in the GitHub repository

  • Include:

    • Your Python version

    • The biz-agent-hub version

    • A minimal code sample that reproduces the issue

This helps us diagnose and resolve problems quickly.

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

biz_agent_hub-0.0.2.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

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

biz_agent_hub-0.0.2-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file biz_agent_hub-0.0.2.tar.gz.

File metadata

  • Download URL: biz_agent_hub-0.0.2.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for biz_agent_hub-0.0.2.tar.gz
Algorithm Hash digest
SHA256 10deeb6c95942cb9bf5e699ad2570c7b568305abd1f85cf73552bf908ec80c7c
MD5 b5583af1e9e774590bb4b544646a2b58
BLAKE2b-256 3322f4bced47d4958fa037b8c24e89bf6766103575e92680e462a38eef7291ea

See more details on using hashes here.

File details

Details for the file biz_agent_hub-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: biz_agent_hub-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for biz_agent_hub-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9c4a5b22d4e7814d0f4500b67459a7fdfc71977297df639958032e2ac79816f9
MD5 de3600fcdb4773773aa6b3c3d3a0d611
BLAKE2b-256 6647419bfcba827e7fe5dc8a4835b3b2090ad2672f0d60abaea51f59b5907bca

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