Skip to content
falang.ioRU

AI agent (desktop)

The desktop apps — Falang and Falang for Arduino — have a built-in AI agent: describe in plain words what to change, and it edits the schemes through the same actions you use by hand (insert, move and delete icons, change their text). Every change appears on the canvas as it happens and can be undone. The web workflow builder has its own agent, see AI agent in the Workflow section.

The agent works with any OpenAI-compatible API: OpenAI itself, another provider with a compatible API, or a local server. Choose Settings → Agent… and fill in:

  • Base URL — the API root, for example https://api.openai.com/v1;

  • API key — your key for that API;

  • Model — the model name, for example gpt-4o-mini.

The settings belong to the app on this computer and apply to every project. They are kept in the app’s own settings file, not in the project folder, so the key never ends up in a project you share or commit. Until the agent is set up, its panel shows a hint pointing to Settings → Agent….

Choose Project → Agent (Sketch → Agent in the Arduino app). The chat opens in the right-hand sidebar, which it shares with the version history — only one of the two is shown at a time. The chat belongs to the project, not to one tab: switching tabs does not interrupt a request that is running. Stop cancels it.

  • In Falang: the functions of logic projects and the schemes of code projects. Text projects are not supported.

  • In Falang for Arduino: setup, loop and your other schemes. In the Devices document the agent can read and replace the pin and device tables.

  • The agent is not limited to the open tab: it can read and change other schemes of the project, and opens a tab for a scheme it starts working on.

  • It does not create new documents — create the scheme yourself and ask the agent to fill it in, or use a coding agent, which can.

One request is one undo step in every scheme it touched. Undo and Redo in the panel (or Ctrl+Z in the scheme) roll the whole request back and forth at once; your own edits made afterwards are separate steps.

Conversations are kept as sessions of the project: start a new one, switch between them, rename, delete, or export a session as a JSON file. Sessions are saved in the project folder, one file per session under falang/agent-sessions/. Under each reply the panel shows how many tokens it used, and the individual steps the agent took can be expanded.

When a request is ambiguous in a way that changes the result, the agent stops and asks one question with a few options instead of guessing. Click an option, choose Other… to type your own answer, or Decide yourself to let the agent pick; your answer continues the same conversation. It asks at most three questions in a row. To never be asked, turn on Don’t ask, just do in the panel — the setting is remembered per project.