Python client SDK for FireFoundry Agent Bundle services
Project description
ff-sdk-py
Python client SDK for FireFoundry Agent Bundle services.
Use this SDK to invoke entity methods, run bots, and stream responses from FireFoundry Agent Bundle microservices deployed in your environment.
Installation
pip install ff-sdk
Quick Start
from ff_sdk import RemoteAgentBundleClient
client = RemoteAgentBundleClient(
base_url="https://your-agent-bundle.example.com",
api_key="your-api-key",
)
# Invoke an entity method
result = client.invoke_entity_method("entity-uuid", "generate_report", {"format": "pdf"})
# Run a bot
output = client.run_bot("SummaryBot", {"input": "Summarize this document"})
# Stream bot responses
iterator = client.start_bot("AnalysisBot", {"input": "Analyze trends"})
for update in iterator:
print(update)
Async Usage
from ff_sdk import AsyncRemoteAgentBundleClient
async def main():
async with AsyncRemoteAgentBundleClient(
base_url="https://your-agent-bundle.example.com",
api_key="your-api-key",
) as client:
result = await client.invoke_entity_method("entity-uuid", "my_method", "arg1")
# Stream with async for
iterator = await client.start_iterator("entity-uuid", "process")
async for item in iterator:
print(item)
await iterator.cleanup()
Entity Proxy
from ff_sdk import RemoteAgentBundleClient, EntityProxy
client = RemoteAgentBundleClient(base_url="...", api_key="...")
proxy = EntityProxy(entity_id="entity-uuid", client=client)
# Property access dispatches to invoke_entity_method
result = proxy.generate_report({"format": "pdf"})
Binary Data
# Upload a file
with open("document.pdf", "rb") as f:
pdf_bytes = f.read()
result = client.invoke_entity_method_with_blobs(
entity_id="entity-uuid",
method_name="process_document",
args=[{"$blob": 0}, {"title": "My Doc"}],
files=[pdf_bytes],
)
# Download binary output efficiently (no base64 overhead)
pdf_output: bytes = client.invoke_entity_method_binary(
"entity-uuid", "generate_large_pdf", {"pages": 1000}
)
Unified invoke Dispatcher
# JSON result (default)
result = client.invoke("entity-uuid", "process", args=[{"key": "val"}])
# Binary result
pdf = client.invoke("entity-uuid", "generate_pdf", response_type="binary")
# Streaming iterator
iterator = client.invoke("entity-uuid", "start", response_type="iterator")
Configuration
| Parameter | Type | Default | Description |
|---|---|---|---|
base_url |
str |
required | Base URL of the Agent Bundle service |
api_key |
str | None |
None |
API key for authentication |
timeout |
float |
200.0 |
Request timeout in seconds |
is_external |
bool |
False |
Use gateway auth mode (plain key, no Bearer prefix) |
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ff_sdk-0.1.0.tar.gz.
File metadata
- Download URL: ff_sdk-0.1.0.tar.gz
- Upload date:
- Size: 7.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3894693b3aba6f171d5f6b887bf413e8a9801fea556b001c58bc66f0992e59e6
|
|
| MD5 |
707bc948b3d7b670cf5161ae6d64b564
|
|
| BLAKE2b-256 |
57b4d815af60febb7a0ec6e681da2c7bf29abbaf59f806e311b24a55eb874329
|
Provenance
The following attestation bundles were made for ff_sdk-0.1.0.tar.gz:
Publisher:
publish.yml on firebrandanalytics/ff-sdk-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ff_sdk-0.1.0.tar.gz -
Subject digest:
3894693b3aba6f171d5f6b887bf413e8a9801fea556b001c58bc66f0992e59e6 - Sigstore transparency entry: 1542215290
- Sigstore integration time:
-
Permalink:
firebrandanalytics/ff-sdk-py@1d252ea8010bf844af4e588cf35c14abab6667ac -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/firebrandanalytics
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1d252ea8010bf844af4e588cf35c14abab6667ac -
Trigger Event:
release
-
Statement type:
File details
Details for the file ff_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ff_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 11.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d1f0f927f51f9a23234936794ca8dddfc7fd764e90351a623a37df36ca736acd
|
|
| MD5 |
c9fd10fc2604147242b4e0519b1af72a
|
|
| BLAKE2b-256 |
0185ce60aa55988fda4030b06866d7092c8a6d5c78852acc749033ebc459d736
|
Provenance
The following attestation bundles were made for ff_sdk-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on firebrandanalytics/ff-sdk-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ff_sdk-0.1.0-py3-none-any.whl -
Subject digest:
d1f0f927f51f9a23234936794ca8dddfc7fd764e90351a623a37df36ca736acd - Sigstore transparency entry: 1542215407
- Sigstore integration time:
-
Permalink:
firebrandanalytics/ff-sdk-py@1d252ea8010bf844af4e588cf35c14abab6667ac -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/firebrandanalytics
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1d252ea8010bf844af4e588cf35c14abab6667ac -
Trigger Event:
release
-
Statement type: