Skip to main content

SDK for connecting a Funky workspace to agents

Project description

funky-sdk

SDK for connecting a Funky workspace to agents through the backend API.

Install (uv)

uv sync --group dev

Usage

from google.adk.agents import Agent
from funky import Workspace

# Create a workspace (blocks until ready)
ws = Workspace.create()

# Define the tool using your simple API
def run_remote_code(command: str):
    """Executes bash commands in the secure Funky workspace."""
    result = ws.execute(command)
    return result.stdout

# Attach to Agent
agent = Agent(tools=[run_remote_code])

# Delete workspace when done
message = ws.delete()
print(message)

API behavior

  • Workspace.create(...) calls POST /workspace, then streams GET /workspace/{claim_name}/events via SSE until the workspace is ready.
  • Workspace.execute(command) calls POST /workspaces/{claim_name}/exec?command=....
  • Workspace.delete() calls DELETE /workspaces/{claim_name} and returns the backend response string.
  • The workspace exposes claim_name, namespace, and pod_name after creation.
  • Responses are exposed via ExecutionResult:
    • stdout: command output from backend
    • stderr: currently empty string
    • exit_code: currently 0 on successful API response

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

funky_sdk-0.2.3.tar.gz (24.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

funky_sdk-0.2.3-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file funky_sdk-0.2.3.tar.gz.

File metadata

  • Download URL: funky_sdk-0.2.3.tar.gz
  • Upload date:
  • Size: 24.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for funky_sdk-0.2.3.tar.gz
Algorithm Hash digest
SHA256 84b5bbd444cb0bfefb0cdc3861b53f453db95a9c566e8b9ced8946536bf87386
MD5 f33fae0314ac3c72c55f91fa5b237375
BLAKE2b-256 e1d44403cc301074571eaed3671c191c62bc3e19f4c24c892264dc2b3dfe23c7

See more details on using hashes here.

File details

Details for the file funky_sdk-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: funky_sdk-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 6.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for funky_sdk-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 87ab3eaeb41dfbc3505f97a96dd02067e954ce9eacd7f6544dbe2b40dcb87cb6
MD5 07ca080fdc5e1ee1c645069e029b519c
BLAKE2b-256 684618b2a9566db4990347b616bf81ca7fa13832658c1e3d95335a3208062657

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page