coinbase_agentkit.action_providers.hyperboliclabs.marketplace package

Submodules

coinbase_agentkit.action_providers.hyperboliclabs.marketplace.action_provider module

Hyperbolic Marketplace action provider.

This module provides actions for interacting with Hyperbolic marketplace services. It includes functionality for managing GPU instances and SSH access.

class coinbase_agentkit.action_providers.hyperboliclabs.marketplace.action_provider.MarketplaceActionProvider(api_key=None)

Bases: ActionProvider

Provides actions for interacting with Hyperbolic marketplace.

This provider enables interaction with the Hyperbolic marketplace for GPU compute resources. It requires an API key which can be provided directly or through the HYPERBOLIC_API_KEY environment variable.

get_available_gpus(args)

Retrieve available GPU instances from the marketplace.

Parameters:

args (dict[str, Any]) – Input arguments for the action.

Returns:

A message containing the action response or error details.

Return type:

str

get_available_gpus_by_type(args)

Retrieve available GPU instances of a specific model from the marketplace.

Parameters:

args (dict[str, Any]) – Input arguments for the action.

Returns:

A message containing the action response or error details.

Return type:

str

get_available_gpus_types(args)

Retrieve available GPU types/models from the marketplace.

Parameters:

args (dict[str, Any]) – Input arguments for the action.

Returns:

A message containing the action response or error details.

Return type:

str

get_gpu_status(args)

Retrieve status and SSH commands for currently rented GPUs.

Parameters:

args (dict[str, Any]) – Input arguments for the action.

Returns:

A message containing the action response or error details.

Return type:

str

rent_compute(args)

Rents a GPU machine on 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

terminate_compute(args)

Terminates a GPU instance on 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.marketplace.action_provider.hyperbolic_marketplace_action_provider(api_key=None)

Create a new instance of the MarketplaceActionProvider.

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:

MarketplaceActionProvider

Returns:

A new Marketplace action provider instance.

Raises:

ValueError – If API key is not provided and not found in environment.

coinbase_agentkit.action_providers.hyperboliclabs.marketplace.schemas module

Schemas for Hyperbolic marketplace actions.

class coinbase_agentkit.action_providers.hyperboliclabs.marketplace.schemas.GetAvailableGpusByTypeSchema(**data)

Bases: BaseModel

Schema for get_available_gpus_by_type action.

gpu_model: str
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class coinbase_agentkit.action_providers.hyperboliclabs.marketplace.schemas.GetAvailableGpusSchema(**data)

Bases: BaseModel

Schema for get_available_gpus 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.marketplace.schemas.GetAvailableGpusTypesSchema(**data)

Bases: BaseModel

Schema for get_available_gpus_types 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.marketplace.schemas.GetGpuStatusSchema(**data)

Bases: BaseModel

Schema for get_gpu_status 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.marketplace.schemas.RentComputeSchema(**data)

Bases: BaseModel

Schema for rent_compute action.

cluster_name: str
gpu_count: str
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

node_name: str
class coinbase_agentkit.action_providers.hyperboliclabs.marketplace.schemas.TerminateComputeSchema(**data)

Bases: BaseModel

Schema for terminate_compute action.

id: str
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

coinbase_agentkit.action_providers.hyperboliclabs.marketplace.service module

Service for marketplace-related operations.

class coinbase_agentkit.action_providers.hyperboliclabs.marketplace.service.MarketplaceService(api_key)

Bases: Base

Service for marketplace-related operations.

get_available_instances()

Get available GPU instances from the marketplace.

Returns:

The marketplace instances data.

Return type:

AvailableInstancesResponse

get_instance_history()

Get GPU instance rental history.

Returns:

The instance history data.

Return type:

InstanceHistoryResponse

get_rented_instances()

Get currently rented GPU instances.

Returns:

The rented instances data.

Return type:

RentedInstancesResponse

rent_instance(request)

Rent a GPU compute instance.

Parameters:

request (RentInstanceRequest) – The RentInstanceRequest object containing rental parameters.

Returns:

The rental response data.

Return type:

RentInstanceResponse

terminate_instance(request)

Terminate a GPU compute instance.

Parameters:

request (TerminateInstanceRequest) – The TerminateInstanceRequest object containing the instance ID.

Returns:

The termination response data.

Return type:

TerminateInstanceResponse

coinbase_agentkit.action_providers.hyperboliclabs.marketplace.types module

Types for Hyperbolic marketplace operations.

This module provides type definitions for marketplace API communication.

class coinbase_agentkit.action_providers.hyperboliclabs.marketplace.types.AvailableInstance(**data)

Bases: NodeInstance

Available instance information.

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class coinbase_agentkit.action_providers.hyperboliclabs.marketplace.types.AvailableInstancesResponse(**data)

Bases: BaseModel

Response for available instances.

instances: list[AvailableInstance]
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class coinbase_agentkit.action_providers.hyperboliclabs.marketplace.types.ContainerImage(**data)

Bases: BaseModel

Container image configuration.

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str
port: int
tag: str
class coinbase_agentkit.action_providers.hyperboliclabs.marketplace.types.CpuHardware(**data)

Bases: BaseModel

CPU 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
class coinbase_agentkit.action_providers.hyperboliclabs.marketplace.types.GpuHardware(**data)

Bases: BaseModel

GPU 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
class coinbase_agentkit.action_providers.hyperboliclabs.marketplace.types.HardwareInfo(**data)

Bases: BaseModel

Complete 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
class coinbase_agentkit.action_providers.hyperboliclabs.marketplace.types.InstanceHistoryEntry(**data)

Bases: BaseModel

Instance history entry.

gpu_count: int
hardware: HardwareInfo
instance_name: str
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

price: Price
started_at: str | None
terminated_at: str | None
class coinbase_agentkit.action_providers.hyperboliclabs.marketplace.types.InstanceHistoryResponse(**data)

Bases: BaseModel

Response for instance history.

instance_history: list[InstanceHistoryEntry]
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class coinbase_agentkit.action_providers.hyperboliclabs.marketplace.types.Location(**data)

Bases: BaseModel

Location information.

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

region: str | None
class coinbase_agentkit.action_providers.hyperboliclabs.marketplace.types.NestedGpuHardware(**data)

Bases: BaseModel

GPU hardware information for nested instances.

hardware_type: str
model: str
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

ram: float | None
class coinbase_agentkit.action_providers.hyperboliclabs.marketplace.types.NestedHardwareComponent(**data)

Bases: BaseModel

A single hardware component in the nested structure.

gpu: NestedGpuHardware | None
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

storage: NestedStorageHardware | None
class coinbase_agentkit.action_providers.hyperboliclabs.marketplace.types.NestedInstance(**data)

Bases: BaseModel

Instance information in nested format.

hardware: list[NestedHardwareComponent]
id: str
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

status: str
class coinbase_agentkit.action_providers.hyperboliclabs.marketplace.types.NestedStorageHardware(**data)

Bases: BaseModel

Storage hardware information for nested instances.

capacity: float
hardware_type: str
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class coinbase_agentkit.action_providers.hyperboliclabs.marketplace.types.NodeInstance(**data)

Bases: BaseModel

Top-level node information.

cluster_name: str | None
gpu_count: int | None
gpus_reserved: int | None
gpus_total: int | None
hardware: HardwareInfo
has_persistent_storage: bool | None
id: str
instances: list[NestedInstance]
location: Location | None
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

network: dict[str, Any]
owner: str | None
pricing: PricingInfo | None
reserved: bool | None
status: str
supplier_id: str | None
class coinbase_agentkit.action_providers.hyperboliclabs.marketplace.types.NodeRental(**data)

Bases: BaseModel

Record of a rented compute node.

end: str | None
id: str
instance: NodeInstance
model_config: ClassVar[ConfigDict] = {'populate_by_name': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

ssh_access: SSHAccess | None
ssh_command: str | None
start: str | None
property status: str

Get the node status from the nested instance.

class coinbase_agentkit.action_providers.hyperboliclabs.marketplace.types.Price(**data)

Bases: BaseModel

Price 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
class coinbase_agentkit.action_providers.hyperboliclabs.marketplace.types.PricingInfo(**data)

Bases: BaseModel

Pricing information for an instance.

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

price: Price
class coinbase_agentkit.action_providers.hyperboliclabs.marketplace.types.RamHardware(**data)

Bases: BaseModel

RAM 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].

class coinbase_agentkit.action_providers.hyperboliclabs.marketplace.types.RentInstanceRequest(**data)

Bases: BaseModel

Request to rent an instance.

cluster_name: str
gpu_count: int
image: ContainerImage | None
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

node_name: str
class coinbase_agentkit.action_providers.hyperboliclabs.marketplace.types.RentInstanceResponse(**data)

Bases: BaseModel

Response from rent instance API endpoint.

instance_name: str | None
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

status: str
class coinbase_agentkit.action_providers.hyperboliclabs.marketplace.types.RentedInstancesResponse(**data)

Bases: BaseModel

Response for rented instances.

instances: list[NodeRental]
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class coinbase_agentkit.action_providers.hyperboliclabs.marketplace.types.SSHAccess(**data)

Bases: BaseModel

SSH access information for connecting to a remote instance.

host: str
key_path: str | None
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

ssh_command: str | None
username: str
class coinbase_agentkit.action_providers.hyperboliclabs.marketplace.types.StorageHardware(**data)

Bases: BaseModel

Storage 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].

class coinbase_agentkit.action_providers.hyperboliclabs.marketplace.types.TerminateInstanceRequest(**data)

Bases: BaseModel

Request to terminate an instance.

id: str
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class coinbase_agentkit.action_providers.hyperboliclabs.marketplace.types.TerminateInstanceResponse(**data)

Bases: BaseModel

Response from terminate instance API endpoint.

error_code: int | None
property get_status: str

Return status string based on fields for backward compatibility.

message: str | None
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

status: str | None

coinbase_agentkit.action_providers.hyperboliclabs.marketplace.utils module

Utility functions for Hyperbolic Marketplace action provider.

coinbase_agentkit.action_providers.hyperboliclabs.marketplace.utils.format_all_gpu_instances(instances)

Format a list of all available GPU instances.

Parameters:

instances (list[AvailableInstance]) – List of AvailableInstance objects.

Returns:

Formatted string with all available GPU instances.

Return type:

str

coinbase_agentkit.action_providers.hyperboliclabs.marketplace.utils.format_gpu_instance(instance)

Format a single GPU instance into a readable string.

Parameters:

instance (AvailableInstance) – AvailableInstance object containing instance details.

Returns:

Formatted string if instance has available GPUs, None otherwise.

Return type:

str | None

coinbase_agentkit.action_providers.hyperboliclabs.marketplace.utils.format_gpu_instances_by_type(instances, gpu_model)

Format a list of available GPU instances of a specific model.

Parameters:
  • instances (list[AvailableInstance]) – List of AvailableInstance objects.

  • gpu_model (str) – The specific GPU model to filter by.

Returns:

Formatted string with available GPU instances of the specified model.

Return type:

str

coinbase_agentkit.action_providers.hyperboliclabs.marketplace.utils.format_gpu_status(instance)

Format a rented GPU instance status into a readable string.

Parameters:

instance (NodeRental) – NodeRental object containing instance details.

Returns:

Formatted status string.

Return type:

str

coinbase_agentkit.action_providers.hyperboliclabs.marketplace.utils.format_gpu_types(instances)

Format a list of available GPU types/models.

Parameters:

instances (list[AvailableInstance]) – List of AvailableInstance objects.

Returns:

Formatted string with available GPU types.

Return type:

str

coinbase_agentkit.action_providers.hyperboliclabs.marketplace.utils.format_rent_compute_response(response_data)

Format compute rental response into a readable string.

Parameters:

response_data (RentInstanceResponse) – RentInstanceResponse object from compute rental API.

Returns:

Formatted response string with next steps.

Return type:

str

coinbase_agentkit.action_providers.hyperboliclabs.marketplace.utils.format_terminate_compute_response(response_data)

Format compute termination response into a readable string.

Parameters:

response_data (TerminateInstanceResponse) – TerminateInstanceResponse object from compute termination API.

Returns:

Formatted response string with next steps.

Return type:

str

coinbase_agentkit.action_providers.hyperboliclabs.marketplace.utils.get_api_key()

Get Hyperbolic API key from environment variables.

Returns:

The API key.

Return type:

str

Raises:

ValueError – If API key is not configured.

Module contents

Hyperbolic Marketplace action provider.

This package contains functionality for interacting with Hyperbolic’s marketplace services, including managing GPU instances and SSH access.

class coinbase_agentkit.action_providers.hyperboliclabs.marketplace.MarketplaceActionProvider(api_key=None)

Bases: ActionProvider

Provides actions for interacting with Hyperbolic marketplace.

This provider enables interaction with the Hyperbolic marketplace for GPU compute resources. It requires an API key which can be provided directly or through the HYPERBOLIC_API_KEY environment variable.

get_available_gpus(args)

Retrieve available GPU instances from the marketplace.

Parameters:

args (dict[str, Any]) – Input arguments for the action.

Returns:

A message containing the action response or error details.

Return type:

str

get_available_gpus_by_type(args)

Retrieve available GPU instances of a specific model from the marketplace.

Parameters:

args (dict[str, Any]) – Input arguments for the action.

Returns:

A message containing the action response or error details.

Return type:

str

get_available_gpus_types(args)

Retrieve available GPU types/models from the marketplace.

Parameters:

args (dict[str, Any]) – Input arguments for the action.

Returns:

A message containing the action response or error details.

Return type:

str

get_gpu_status(args)

Retrieve status and SSH commands for currently rented GPUs.

Parameters:

args (dict[str, Any]) – Input arguments for the action.

Returns:

A message containing the action response or error details.

Return type:

str

rent_compute(args)

Rents a GPU machine on 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

terminate_compute(args)

Terminates a GPU instance on 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.marketplace.hyperbolic_marketplace_action_provider(api_key=None)

Create a new instance of the MarketplaceActionProvider.

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:

MarketplaceActionProvider

Returns:

A new Marketplace action provider instance.

Raises:

ValueError – If API key is not provided and not found in environment.