Skip to main content

CoffeeBlack SDK

Python client for interacting with the CoffeeBlack visual reasoning API.

Installation

You can install the package using pip:

# Install from PyPI
pip install coffeeblack

# Install from local directory
pip install -e .

# Or install from GitHub
pip install git+https://github.com/coffeeblack/sdk.git

Features

  • Find and interact with windows on your system
  • Take screenshots and send them to the CoffeeBlack API
  • Execute actions based on natural language queries
  • Reason about UI elements without executing actions
  • Find and launch applications with semantic search

Quick Start

import asyncio
import os
from coffeeblack import Argus

async def main():
    # Initialize the SDK with API key for authentication
    # You can provide your API key directly or through an environment variable
    api_key = os.environ.get("COFFEEBLACK_API_KEY")
    sdk = Argus(
        api_key=api_key,  # API key for authentication
        verbose=True,
        debug_enabled=True,
        elements_conf=0.2,
        rows_conf=0.4,
        model="ui-detect"  # Set the UI detection model to use (cua, ui-detect, or ui-tars)
    )
    
    # Define the browser name
    browser_name = "Safari" 
    
    try:
        # Open and attach to the browser
        await sdk.open_and_attach_to_app(browser_name, wait_time=2.0)

        # Execute an action based on a natural language query
        await sdk.execute_action("Type https://www.google.com into the url bar")
        
        # Press enter key
        await sdk.press_key("enter")
    
    except Exception as e:
        print(f"Error: {e}")

if __name__ == "__main__":
    asyncio.run(main())

License

MIT

Documentation

For more detailed documentation, please visit https://docs.coffeeblack.ai

Metadata

Release files for coffeeblack 0.1.12

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for coffeeblack 0.1.12
File Size Uploaded Provenance Actions
coffeeblack-0.1.12.tar.gz 46.8 kB Without provenance Details for coffeeblack-0.1.12.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for coffeeblack 0.1.12
File Interpreter ABI Platform Actions
coffeeblack-0.1.12-py3-none-any.whl Python 3 none any Details for coffeeblack-0.1.12-py3-none-any.whl

Total release size: 97.5 kB

Release files / coffeeblack-0.1.12.tar.gz

Download URL coffeeblack-0.1.12.tar.gz
Size 46.8 kB
Tags Source
SHA-256 checksum
How to use checksums
47ab0c79300179b0e34c38f0ad7b17448eb440f80d29195c1494c95806604fb4
BLAKE2b-256 checksum
How to use checksums
11c574d1cf9956f0a775b9021bddf5a8da8f7fc248c9058d7bf1ef6ac60a0f25
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.13

Release files / coffeeblack-0.1.12-py3-none-any.whl

Download URL coffeeblack-0.1.12-py3-none-any.whl
Size 50.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
729204dac05db81cdb2f2e72d4d7f41df931198f868328aa02aaeb0eb2312166
BLAKE2b-256 checksum
How to use checksums
3a155fb598ce50d0e2e893be0f59a84bdabdae1d1f1fbe93215b7936111fa0cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.13

Security for coffeeblack 0.1.12

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page