coinbase_agentkit.action_providers.hyperboliclabs.billing package¶
Submodules¶
coinbase_agentkit.action_providers.hyperboliclabs.billing.action_provider module¶
Hyperbolic Billing action provider.
This module provides actions for interacting with Hyperbolic billing services. It includes functionality for checking balance and spend history.
- class coinbase_agentkit.action_providers.hyperboliclabs.billing.action_provider.BillingActionProvider(api_key=None)¶
Bases:
ActionProviderProvides actions for interacting with Hyperbolic billing.
This provider enables interaction with the Hyperbolic billing services for balance and spend history. It requires an API key which can be provided directly or through the HYPERBOLIC_API_KEY environment variable.
- get_current_balance(args)¶
Retrieve current balance and purchase history from the account.
- Parameters:
args (dict[str, Any]) – Input arguments for the action.
- Returns:
A message containing the action response or error details.
- Return type:
str
- get_purchase_history(args)¶
Retrieve the purchase history of platform credits.
- Parameters:
args (dict[str, Any]) – Input arguments for the action.
- Returns:
A message containing the action response or error details.
- Return type:
str
- get_spend_history(args)¶
Retrieve GPU rental spending history from the platform.
- Parameters:
args (dict[str, Any]) – Input arguments for the action.
- Returns:
A message containing the action response or error details.
- Return type:
str
- coinbase_agentkit.action_providers.hyperboliclabs.billing.action_provider.hyperbolic_billing_action_provider(api_key=None)¶
Create a new instance of the BillingActionProvider.
- Parameters:
api_key (
Optional[str]) – Optional API key for authentication. If not provided, will attempt to read from HYPERBOLIC_API_KEY environment variable.- Return type:
- Returns:
A new Billing action provider instance.
- Raises:
ValueError – If API key is not provided and not found in environment.
coinbase_agentkit.action_providers.hyperboliclabs.billing.schemas module¶
Schemas for Hyperbolic billing actions.
This module provides simplified schemas for billing action inputs.
- class coinbase_agentkit.action_providers.hyperboliclabs.billing.schemas.GetCurrentBalanceSchema(**data)¶
Bases:
BaseModelSchema for get_current_balance action.
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class coinbase_agentkit.action_providers.hyperboliclabs.billing.schemas.GetPurchaseHistorySchema(**data)¶
Bases:
BaseModelSchema for get_purchase_history action.
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class coinbase_agentkit.action_providers.hyperboliclabs.billing.schemas.GetSpendHistorySchema(**data)¶
Bases:
BaseModelSchema for get_spend_history action.
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
coinbase_agentkit.action_providers.hyperboliclabs.billing.service module¶
Service for billing-related operations.
- class coinbase_agentkit.action_providers.hyperboliclabs.billing.service.BillingService(api_key)¶
Bases:
BaseService for billing-related operations.
- get_balance()¶
Get current balance information.
- Returns:
The balance data.
- Return type:
- get_purchase_history()¶
Get purchase history.
- Returns:
The purchase history data.
- Return type:
coinbase_agentkit.action_providers.hyperboliclabs.billing.types module¶
Types for Hyperbolic billing operations.
This module provides type definitions for billing API communication.
- class coinbase_agentkit.action_providers.hyperboliclabs.billing.types.BillingBalanceResponse(**data)¶
Bases:
BaseModelResponse model for billing balance API.
-
credits:
Any¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
credits:
- class coinbase_agentkit.action_providers.hyperboliclabs.billing.types.BillingPurchaseHistoryEntry(**data)¶
Bases:
BaseModelA single entry in the purchase history.
-
amount:
str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
source:
str¶
-
timestamp:
str¶
-
amount:
- class coinbase_agentkit.action_providers.hyperboliclabs.billing.types.BillingPurchaseHistoryResponse(**data)¶
Bases:
BaseModelResponse model for billing purchase history API.
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
purchase_history:
list[BillingPurchaseHistoryEntry]¶
- class coinbase_agentkit.action_providers.hyperboliclabs.billing.types.CpuHardware(**data)¶
Bases:
BaseModelCPU hardware information.
-
cores:
int|None¶
-
hardware_type:
str¶
-
model:
str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
virtual_cores:
int¶
-
cores:
- class coinbase_agentkit.action_providers.hyperboliclabs.billing.types.GpuHardware(**data)¶
Bases:
BaseModelGPU hardware information.
-
clock_speed:
float|None¶
-
compute_power:
float|None¶
-
hardware_type:
str¶
-
interface:
str|None¶
-
model:
str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
ram:
float|None¶
-
clock_speed:
- class coinbase_agentkit.action_providers.hyperboliclabs.billing.types.HardwareInfo(**data)¶
Bases:
BaseModelComplete hardware information.
-
cpus:
list[CpuHardware] |None¶
-
gpus:
list[GpuHardware]¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
ram:
list[RamHardware] |None¶
-
storage:
list[StorageHardware] |None¶
-
cpus:
- class coinbase_agentkit.action_providers.hyperboliclabs.billing.types.Price(**data)¶
Bases:
BaseModelPrice information.
-
agent:
str|None¶
-
amount:
float¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
period:
str¶
-
agent:
- class coinbase_agentkit.action_providers.hyperboliclabs.billing.types.RamHardware(**data)¶
Bases:
BaseModelRAM hardware information.
-
capacity:
float¶
-
hardware_type:
str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
capacity:
- class coinbase_agentkit.action_providers.hyperboliclabs.billing.types.StorageHardware(**data)¶
Bases:
BaseModelStorage hardware information.
-
capacity:
float¶
-
hardware_type:
str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
capacity:
coinbase_agentkit.action_providers.hyperboliclabs.billing.utils module¶
Utility functions for Hyperbolic billing services.
This module provides utility functions for formatting and processing billing information from Hyperbolic services.
- coinbase_agentkit.action_providers.hyperboliclabs.billing.utils.calculate_duration_seconds(start_time, end_time)¶
Calculate duration in seconds between two timestamps.
- Parameters:
start_time (
str) – ISO format timestamp string.end_time (
str) – ISO format timestamp string.
- Returns:
Duration in seconds.
- Return type:
float
- coinbase_agentkit.action_providers.hyperboliclabs.billing.utils.format_purchase_history(purchases, limit=5)¶
Format purchase history into a readable string.
- Parameters:
purchases (
BillingPurchaseHistoryResponse) – Billing purchase history response.limit (
int) – Maximum number of purchase records to include in the output.
- Returns:
Formatted purchase history string.
- Return type:
str
- coinbase_agentkit.action_providers.hyperboliclabs.billing.utils.format_spend_history(instance_history, limit=5)¶
Format spend history into a readable analysis.
- Parameters:
instance_history (
InstanceHistoryResponse) – Instance history response with rental records.limit (
int) – Maximum number of spend records to include in the output.
- Returns:
Formatted analysis string.
- Return type:
str
Module contents¶
Hyperbolic billing package.
This package provides actions for interacting with Hyperbolic billing services.
- class coinbase_agentkit.action_providers.hyperboliclabs.billing.BillingActionProvider(api_key=None)¶
Bases:
ActionProviderProvides actions for interacting with Hyperbolic billing.
This provider enables interaction with the Hyperbolic billing services for balance and spend history. It requires an API key which can be provided directly or through the HYPERBOLIC_API_KEY environment variable.
- get_current_balance(args)¶
Retrieve current balance and purchase history from the account.
- Parameters:
args (dict[str, Any]) – Input arguments for the action.
- Returns:
A message containing the action response or error details.
- Return type:
str
- get_purchase_history(args)¶
Retrieve the purchase history of platform credits.
- Parameters:
args (dict[str, Any]) – Input arguments for the action.
- Returns:
A message containing the action response or error details.
- Return type:
str
- get_spend_history(args)¶
Retrieve GPU rental spending history from the platform.
- Parameters:
args (dict[str, Any]) – Input arguments for the action.
- Returns:
A message containing the action response or error details.
- Return type:
str
- coinbase_agentkit.action_providers.hyperboliclabs.billing.hyperbolic_billing_action_provider(api_key=None)¶
Create a new instance of the BillingActionProvider.
- Parameters:
api_key (
Optional[str]) – Optional API key for authentication. If not provided, will attempt to read from HYPERBOLIC_API_KEY environment variable.- Return type:
- Returns:
A new Billing action provider instance.
- Raises:
ValueError – If API key is not provided and not found in environment.