team9-capahub
Python SDK for Team9 agent scripts to call Capability Hub from run_command.
The client reads the environment injected by Team9 agent runtime:
TEAM9_AGENT_CAPAHUB_TEMP_TOKEN=<jwt>
TEAM9_AGENT_CAPAHUB_BASE_URL=<capability-hub-url>
TEAM9_AGENT_SESSION_ID=<sessionId>
Usage
from team9_capahub import Client
capahub = Client()
result = capahub.invoke("capahub_twitter_search", {
"query": "team9",
})
print(result)
Low-level invocation by capability id is also available:
result = capahub.invoke_by_id("capability-id", {
"query": "team9",
})
Async task helpers:
task = capahub.get_task("task-id")
completed = capahub.wait_task(
"task-id",
timeout_ms=60000,
poll_interval_ms=1000,
)
Options
import os
from team9_capahub import Client
capahub = Client(
base_url="https://gateway.capability.team9.ai",
token=os.environ["TEAM9_AGENT_CAPAHUB_TEMP_TOKEN"],
session_id=os.environ.get("TEAM9_AGENT_SESSION_ID"),
timeout_ms=15000,
)
token and base_url default to the injected environment. Token refresh is not handled inside the SDK; a later run_command receives a fresh token.
Metadata
Release files for team9-capahub 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| team9_capahub-0.0.2.tar.gz | 6.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| team9_capahub-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.1 kB
Release files / team9_capahub-0.0.2.tar.gz
| Download URL | team9_capahub-0.0.2.tar.gz |
|---|---|
| Size | 6.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
eafd078423dcf666287036ea060aaff193ae673be90e0851db8449269c399249
|
|
BLAKE2b-256 checksum How to use checksums |
ec2515c0712131be53c594eb7209ad39c1a827f5b0be8a89b5f4adbfa49d6d60
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / team9_capahub-0.0.2-py3-none-any.whl
| Download URL | team9_capahub-0.0.2-py3-none-any.whl |
|---|---|
| Size | 4.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f9d84fecc6e1724e9f610c17b6e858c973973e027bec43f35979915538ca905e
|
|
BLAKE2b-256 checksum How to use checksums |
8e5c26e9f8809148d1be4b4a69f98ac74aec5fadda3a44e56553e60ab3bf98f4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|