AppFactory (legacy)
AppFactory is the Python client for the older kafka runtime, imported with from integrations import AppFactory. Kafka Cloud (kafka_cloud) uses the native brainbase-apps tools and bb-apps command instead.
Legacy Kafka availability
The older kafka runtime, its AppFactory copy in kafka-lite-vm, and the legacy /pipedream/* routes remain available. Legacy Kafka agents can keep using their existing AppFactory code, including apps connected later. Kafka Cloud retirement does not disconnect accounts or change their permission rules.
Kafka Cloud integrations
Kafka Cloud images do not include AppFactory. Managed turns, synchronous code operations and generated workflow app nodes use brainbase-apps. The SDK teaches native tools by default, without selecting a mode from a recorded connection list. Explicit system prompts and custom prompt providers remain caller-owned.
Workflow app nodes send the supplied action key and configured inputs through run_action. Input expressions still resolve in the notebook. They do not fall back to AppFactory or legacy HTTP when a native call stops. Missing inputs remain missing. An agent manager connects accounts on the agent's Tools page; enabling integrations does not approve an action.
When an action needs approval, the code operation stops and the task shows the pending approval. Answering does not rerun code automatically. After Allow once, explicitly submit a new code operation with the same action inputs. Stop cancels pending approval. Reusing an outer code operation ID returns its stored result, not a second execution.
Historical saved versions and operation receipts remain evidence, not runnable replacements. Do not restore old AppFactory code into Kafka Cloud or repeat an action just to recreate a notebook variable. If an outcome is unknown, check its operation receipt and the app before submitting new work.
Native tool equivalents
| Legacy AppFactory call | Native tool |
|---|---|
factory.list_apps(), factory.get_connected_accounts() | list_apps |
app.list_actions(), app.search_actions() | search_actions |
print(action) | get_action |
action.get_options_for_prop(), action.configure() | configure_prop, reload_props |
app(...).action(...).run() | run_action |
factory.proxy_get(), other proxy_* methods, factory.custom_request() | proxy_request |
factory.proxy_upload_file() | upload_file with source.kind: workspace_path |
factory.proxy_upload_from_url() | upload_file with source.kind: public_url |
| A Python loop over app data | bb-apps from the shell or Python |
bb-apps list_apps --json '{"include":"connected"}'
Notebook restart recovery
Kafka Cloud notebooks save Python values between worker restarts. A file handle is an open or closed Python file object, not the file itself. On runtimes with the notebook checkpoint fix, disk handles are omitted from that saved state. A list, object or function that captures a handle is omitted too. The cell reports the affected variable names as "checkpoint skipped unsafe or unpicklable names". Those variables remain usable in the current worker; unrelated checkpointable values and cell numbers survive a restart.
Keep the file path and the data you need, rather than relying on a file handle to survive a restart. Reopen an existing output in read mode when inspecting it. Do not rerun an app action or recreate an export just to rebuild notebook variables: the original operation may already have completed.
Healthy saved notebooks keep their existing values, imports, functions and cell numbers after an upgrade. When an older saved notebook contains a file handle, recovery skips that handle and any values that cannot be restored safely. It keeps unrelated recoverable values and the cell number. The warning "restore skipped unsafe or unsupported names" lists omitted variables. Custom objects or functions depending on an omitted value may need to be recreated explicitly.