Skip to main content

SDK for connecting a Funky workspace to agents

Project description

funky-sdk

Python SDK for creating and talking to Funky pi-agent subagents.

Install

uv sync

Usage

from funky import SubAgent

agent = SubAgent.create(
    name="Coding Assistant",
    model="claude-opus-4-7",
    system="You are a helpful coding assistant. Write clean, well-documented code.",
)

messages = agent.send_message("Create a small Python CLI that prints hello.")
for message in messages:
    print(message.text)

Streaming

for event_type, event in agent.stream_message("Add tests for that CLI."):
    if event_type == "message_update":
        message = event.get("message", {})
        content = message.get("content", [])
        for item in content:
            if isinstance(item, dict) and item.get("type") == "text":
                print(item.get("text", ""), end="")

API Behavior

  • SubAgent.create(...) creates a pi-agent workspace, sets the global model and appended system prompt for that workspace, then creates one session.
  • agent.send_message(text) waits for the subagent to finish and returns completed assistant messages.
  • agent.stream_message(text) yields raw SSE events for live UI and progress output.
  • Returned SubAgentMessage objects expose role, text, and raw.
  • The subagent exposes name, model, system, session_id, claim_name, namespace, and pod_name.

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.11.tar.gz (30.8 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.11-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: funky_sdk-0.2.11.tar.gz
  • Upload date:
  • Size: 30.8 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.11.tar.gz
Algorithm Hash digest
SHA256 00960ce7ff3a0c9b4eab908b602659d34aa50f9319baaec5556fba2a505e7f2e
MD5 17cc7e00422c699abcbb2f66b69220d5
BLAKE2b-256 a37bfaf7a1f171db08d9e78d002a96928a731ce9689e4d1c1e59d7e524454f76

See more details on using hashes here.

File details

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

File metadata

  • Download URL: funky_sdk-0.2.11-py3-none-any.whl
  • Upload date:
  • Size: 11.5 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.11-py3-none-any.whl
Algorithm Hash digest
SHA256 46a61dde02a5d81ee586b428404b811c3ce62f7362a3895b3fde360541ba0d46
MD5 21307098eac557bab1daaa15593e0442
BLAKE2b-256 df6a5222405d2e245496fd6ef56b29fdc73367b998bd37f0536a9698f28f7438

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