Append-only event log
Every message, tool call, and result is durably recorded. State is never lost, only appended.
Funky is the durable runtime for agent swarms.
from funky import Funky
with Funky() as client:
agent = client.agents.create(
name="Repository investigator",
system_prompt=(
"You are a careful coding agent. "
"Verify claims with tools."
),
model={
"provider": "anthropic",
"model": "claude-sonnet-5",
},
tool_policy={"max_iterations": 20},
)
environment = client.environments.create(
name="github-access",
network={
"type": "limited",
"allowed_hosts": [
"github.com",
"*.githubusercontent.com",
],
},
)
session = client.sessions.create(
agent=agent.id,
environment_id=environment.id,
title="Investigate issue 42",
)
client.sessions.wait_until_ready(
session.id,
timeout=180,
)
result = client.sessions.run_turn(
session.id,
content=(
"Inspect the repository and "
"identify the root cause."
),
)
print(result.output_text)Durable execution
Every message, tool call, and result is durably recorded. State is never lost, only appended.
Crashed agents pick up from their last event, not from zero.
One sub-agent failing never corrupts the swarm's progress.
Decoupled architecture
Same soul, fresh body — the session never dies with its sandbox.
Sessions live in the store, not in a running process. Suspend for an hour or a week; resume instantly.
Long waits cost nothing. Workers and sandboxes are reclaimed the moment an agent blocks.
Compute is spent only on active steps, so 100 agents don't need 100 live sandboxes.
Use cases
Fan a swarm out across a million-line repo. Each sub-agent reads a slice, the parent assembles the map — full-codebase context in minutes, not days.
Hundreds of sub-agents scan, qualify, and enrich prospects across social platforms in parallel, and return a deduplicated, scored lead list.
Run wide reconnaissance, log triage, and incident investigation concurrently. Durable execution means multi-hour investigations survive any single failure.