Flow-Making
Related (2026-07-22): FlowCreator is now ALSO a plain wrapped chat-agent,
chat_agent_flowcreator— a Multi-Turn tool (no ACPX needed) that takesprompt=+flow_filename=and writes the.flwitself. This skill is the heavier, ACPX/invoke_skill-surface path that shells out toscripts/make_flow.py; the wrapped tool is the lighter one-call path. Both convertflow_result.json→.flwwith the SAMEresult_to_flw.pylogic — this skill'sscripts/result_to_flw.pyand the copy vendored atagent/agents/flowcreator/result_to_flw.py(so the pool subprocess can carry it) must be kept in sync. For a simple "make me a .flw from this sentence" ask, preferchat_agent_flowcreator; use this skill when you need the scripted pipeline.
Produce a canvas-loadable .flw from ${input.objective} by wrapping the
FlowCreator engine — which already encodes the full 89-agent catalog,
connection contracts, and design rules in agentic_skill.md. Do NOT hand-author
the .flw JSON yourself: you do not carry the agent catalog/config-key contracts
in context, so a hand-written flow hallucinates agent types and will not load.
Primary path — one deterministic call
Run the shipped driver with execute_command. It copies the FlowCreator
template to an isolated runtime dir, writes its config.yaml, runs FlowCreator
(which queries the configured Ollama model), and converts the result to a .flw:
python agent/skills_pkg/flow_making/scripts/make_flow.py \
--objective "${input.objective}" \
--out "${input.out_path}" \
--flow-name "${input.flow_name}" \
--model "${input.llm_model}" \
--host "${input.llm_host}"
- The path is relative to the chat process's working directory (the Tlamatini
app root, where
manage.pyruns — same cwdexecute_commanduses forpython manage.py ...). If a relative call ever reports "can't open file", retry with the repo-root prefixTlamatini/agent/skills_pkg/.... - Omit
--flow-name/--model/--hostwhen the corresponding input is empty (the driver has sensible defaults). - Use forward slashes in
--outeven on Windows (e.g.C:/Users/you/Desktop/Flows/alarm.flw); the driver creates the folder if it is missing.
Reading the result
On success the last stdout line is machine-readable:
agent_count=<N> connection_count=<M> flw_path=<absolute path>
Parse it and return { flw_path, agent_count, connection_count }. Tell the user
to open it on the ACP designer via Open ▸ select the .flw (it auto-deploys
the agents and draws the connections).
Failure handling
If the driver exits non-zero, its last stdout line begins with ERROR . Surface
that message verbatim and act on the common causes — do NOT silently fabricate a
.flw:
ERROR FlowCreator timed out/Cannot reach Ollama— Ollama is not running or the model is not pulled. Ask the user to start Ollama / pull the model, or pass a different--model.ERROR FlowCreator: ...— the model returned an unparseable flow; retry once, then report.ERROR could not locate the FlowCreator template dir— pass `--template
Fallback — manual two-step (only if the driver is unavailable)
- Use
chat_agent_file_creatorto write aconfig.yaml(JSON is valid YAML) into a copy ofagent/agents/flowcreator/with{ "prompt": "${input.objective}", "flow_filename": "...", "llm": {"host": "...", "model": "..."} }, thenexecute_command: python flowcreator.pyin that copy. - Convert its
flow_result.jsonto the final.flw:python agent/skills_pkg/flow_making/scripts/result_to_flw.py <runtime>/flow_result.json "${input.out_path}"and read the sameagent_count=… connection_count=… flw_path=…summary line.
Notes
- The
.flwschema this produces is the schemaVersion-2 nodes/connections shape the canvas loader consumes; seereferences/flw_schema.md. - Never mutate the FlowCreator template in place — always run from an isolated copy (the driver does this for you).
Current installed-agent contract — 2026-09-15
Use agent/agents/flowcreator/flow_catalog.json for canonical names, current config schemas, output/input slots, lifecycle flags and structured fields for all 89 installed types. GUI-Manager is design only. After changing a template/contract/reference, run python scripts/update_flow_catalog.py and its --check mode in the repository. Deployment refreshes runtime snapshots.
FlowCreator selects capabilities before detailed design, validates the generated plan, and uses bounded repair. Declare Ender input connections explicitly; Ender target_agents is a kill list. Counter uses L/G slots; source dependencies do not choose a conditional output branch. Generated Parametrizers require valid _parametrizer_mappings, one source and one target. Do not maintain a separate hardcoded Parametrizer producer list.
For desktop flows, use explicit physical/screenshot geometry and verified target windows. input_sent is input delivery only; errors may be partial and must not be blindly replayed. Read docs/desktop-input-and-flow-contracts.md and docs/agent-coverage.md for the full contract and verification scope.
Model choices in generated flows
Preserve quoted "@config" and missing registered model fields so generated agents
follow Config → Models. Keep a literal model/engine/voice only when an explicit
override is intended; never fill inheritance with a guessed tag. The registry in
agent/agents/model_settings.py maps all 21 model-backed agents to 38 global
settings. Wrapped-chat globals are seeded before explicit tool arguments, so do
not manufacture model arguments when translating a request into a flow. Optional
empty Whisperer cloud model and LaTeXer repair model values have distinct meanings.
Video analysis_type remains a per-agent task choice; its local audio model is
separate from Whisperer's engine. See docs/model_configuration.md and the current
generated flow catalog for exact field paths and defaults.