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
SubAgentMessageobjects exposerole,text, andraw. - The subagent exposes
name,model,system,session_id,claim_name,namespace, andpod_name.
Project details
Release history Release notifications | RSS feed
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.10.tar.gz
(30.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file funky_sdk-0.2.10.tar.gz.
File metadata
- Download URL: funky_sdk-0.2.10.tar.gz
- Upload date:
- Size: 30.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
11d0ad2a90b4d5ad423b9893d1a9e18192430995a440a72d3a3e3021afc967fc
|
|
| MD5 |
5c3c76b716c50f236a4f81b0bf51063a
|
|
| BLAKE2b-256 |
2e4e8eb8c62935ab6452f10e44a76aa08ca498c18aeca2d18a660822607a52b8
|
File details
Details for the file funky_sdk-0.2.10-py3-none-any.whl.
File metadata
- Download URL: funky_sdk-0.2.10-py3-none-any.whl
- Upload date:
- Size: 11.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
59ef15896958aca794162348507efc25392f0ed6d50fe5ff2c525aaac7b75f6b
|
|
| MD5 |
95afd107af36ede1bdfa0b2c2297513e
|
|
| BLAKE2b-256 |
958e97d439a7e0c8ca0a379f160a3a882efebaf45c7721ae3b1a1da4b9a499a3
|