Agent
Description
The Agent node is the heart of TzuFlow. It sends a prompt to a local AI model via Ollama and retrieves the response. It is the only node capable of generating intelligent content: summarizing, translating, writing, analyzing, coding, reasoning…
Each Agent is independent: it has its own model, its own conversation history, and its own generation parameters. You can therefore chain multiple Agents with different roles (one for brainstorming, one for writing, one for verifying) in the same workflow.
Configuration Properties
Models Section
Dropdown List
Selects the Ollama model to use (e.g., ornith-1.5:9b, qwen2.5:7b). The list displays models already downloaded on your machine.
View
Opens the model's page on the Ollama website (documentation, tags, size).
Pull
Downloads a new model from the Ollama registry. A progress bar appears in the console.
Remove
Deletes the selected model from your hard drive.
⚙️ Options Section
Keep History
When enabled, the Agent retains conversation memory between executions (user/assistant alternation). Useful for multi-turn chatbots. Disable it for one-shot generation workflows (faster, no context pollution).
Thinking
Activates "reasoning" mode for supported models (e.g., DeepSeek-R1, Qwen3). The model first produces an internal reasoning chain <think>…</think>, then the final response. Slower but often more accurate on complex tasks.
Stats
Displays generation statistics (tokens/second, processing time) in the node after execution.
💬 Prompt System Section
Text Area
The system prompt: permanent instructions given to the model before each request. This is where you define the role, tone, expected output format, and rules to follow. Example: "You are a technical translator. You respond only in JSON."
💡 Tip: A good system prompt is the key to a good result. Be precise, give concrete examples, and explicitly list what the model must not do (negative rules).
Generation Parameters
Idle Timeout (default: 10 s)
Maximum inactivity time accepted during streaming. If the model stops producing tokens for this duration, generation is halted. Useful to prevent a workflow from hanging indefinitely on a slow or crashed model.
Temperature (default: 0.8)
Controls creativity. 0.0 = deterministic and repetitive response (ideal for code, strict formatting). 1.0 = highly varied and creative response. 0.7–0.9 = good balance for writing.
Repeat Penalty (default: 1.1)
Penalizes repetition of already-generated tokens. Increase this value (1.2–1.5) if the model tends to loop on the same phrases.
Max Entries (default: 30)
Maximum number of user/assistant pairs retained in history when Keep History is enabled. Beyond this, the oldest exchanges are removed. Always use an even number to preserve role alternation.
Context Size (default: 2048)
Maximum context size (in tokens) sent to the model. Directly impacts speed: too large a context slows down inference even on a small prompt, because Ollama pre-allocates the KV-cache buffer. Set to the minimum compatible with your prompts.
Auto context (default: unchecked)
When checked, TzuFlow automatically estimates the context size needed for each request and adjusts num_predict accordingly. Prevents truncations (done_reason: "length") without over-dimensioning the context.
Predict Size (default: -1)
Maximum number of tokens generated in response. -1 = no explicit limit (the model stops when it estimates it's done). Useful to set a value (e.g., 1024) to force short responses.
Stop Sequence (default: TERMINE)
Character string that forces immediate generation stop as soon as it's produced. Practical to prevent the model from continuing with parasitic text after finishing its task.
Top-P (Nucleus Sampling) (default: 0.9)
Filters candidate tokens by keeping only those whose cumulative probability reaches P. Complementary to Temperature. 0.9 is a safe value.
Top-K Sampling (default: 40)
Limits the choice of the next token to the K most probable tokens. Reduces hallucinations on small models.
EndPoint (default: Chat)
Ollama call mode. Chat = /api/chat endpoint (with user/assistant roles, conversation template applied). Generate = /api/generate endpoint in raw: true mode (raw text, no template — used internally by the Orpheus node for speech synthesis). Leave Chat unless you know what you're doing.
Usage Example
"Technical Translator" Workflow:
- An Input node receives English text.
- An Agent node with:
- Model:
ornith-1.5:9b - System Prompt: "You are a technical translator specialized in IT. Translate the text to French while keeping English technical terminology in parentheses the first time. Do not add any comments."
- Temperature:
0.2(for fidelity) - Keep History: unchecked (no memory needed)
- Model:
- An Output node displays the translation.
Pitfalls to Avoid ⚠️
Keep History on a looping workflow: If you reuse the same Agent in a loop (via AutomateNode + AutoRestart), history accumulates and eventually saturates Context Size. Disable Keep History or manually clear history with the Clear button.
Context Size too large: Contrary to what one might think, a large context doesn't make the model "smarter" — it slows it down drastically, because Ollama pre-allocates GPU/CPU memory for the declared maximum size. Set the lowest value compatible with your prompts.
"Thinking" models and Predict Size: A model in reasoning mode can produce hundreds of tokens of <think> before even starting the response. Don't set Predict Size too low (e.g., 256) or you'll truncate the reasoning and get an incoherent response. Leave -1 or use Auto context.
EndPoint ≠ Chat: Switching to Generate radically changes behavior. The system prompt is ignored, and text is sent as-is to the model. This mode is reserved for very specific cases (Orpheus TTS, non-conversational prompts).
Corrupted history: Internally, TzuFlow always removes messages in pairs (user + assistant). Don't try to manually manipulate history via external nodes — you'd break role alternation and the model would respond incoherently.