Biz Agent Hub – Python SDK
The Biz Agent Hub Python SDK provides a simple way to integrate Biz Agent Hub agents (such as Support Agent) into your Python or browser applications.
With this SDK, you can:
- Initialize a
BizAgentHubclient with your credentials - Interact with Support Agent 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.support_agent import SupportAgentQuery
client = BizAgentHub("<your_user_id>", "<your_api_key>")
support_agent_query = SupportAgentQuery(message="what is the color of the flower in the image?")
response = client.support_agent.query(
support_agent_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
-
support_agent: SupportAgentInterface for interacting with the Support agent.
-
support_agent.query: SupportAgentQuery(message: str, file: Optional[File] = None, session_id: Optional[str] = None) -> AnyInterface for interacting with the Support agent.
-
SupportAgent
query(self, params: SupportAgentQuery) -> Any
Send a message to Support Agent.
@dataclass
class SupportAgentQuery:
message: str
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.support_agent import SupportAgentQuery
# 1. Prepare the query object
support_agent_query = SupportAgentQuery(
message='Help me with my issue.',
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.support_agent.query(
support_agent_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('Support Agent 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-hubversion -
A minimal code sample that reproduces the issue
-
This helps us diagnose and resolve problems quickly.
Metadata
Release files for biz-agent-hub 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| biz_agent_hub-0.0.4.tar.gz | 3.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| biz_agent_hub-0.0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.5 kB
Release files / biz_agent_hub-0.0.4.tar.gz
| Download URL | biz_agent_hub-0.0.4.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5ba23141ce5ff6670e9838c88f60cb9dc507f0f7abfecfe964250d7cd87ba7b3
|
|
BLAKE2b-256 checksum How to use checksums |
7b19faca9ec9377b1564bdf792284de3c01fedbc5c6212d53456b39d5b422fc6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Release files / biz_agent_hub-0.0.4-py3-none-any.whl
| Download URL | biz_agent_hub-0.0.4-py3-none-any.whl |
|---|---|
| Size | 5.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8eb694f5d4b9cd87f74b8a6577a7f7cd91be302ce989df3f87e3133daec16d81
|
|
BLAKE2b-256 checksum How to use checksums |
9b22457d5a60296b81eb0f1aff6b3acb17f09069010182b752a23cee989c3709
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Security for biz-agent-hub 0.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.