-
Notifications
You must be signed in to change notification settings - Fork 0
Multi Agent Workflows
🇬🇧 English · 🇮🇹 Italiano
Generated from docs/multi-agent.md — edit that file in the repository, not this page.
Leggi in 🇮🇹 Italiano
TSUKA supports advanced multi-agent interactions: orchestrating group debate conferences (/call), launching collaborative teams operating directly on workspace files with native tools (/team), or using a dynamic goal orchestrator (/goal) that plans workflows and dynamically recruits agents from all available characters.
Instead of hardcoding monolithic prompts, TSUKA separates agent definitions into two orthogonal dimensions:
-
Role (
roles/*.json): defines technical skills, default reasoning effort, and allowed tools (e.g.developer,sysadmin,security_auditor,supervisor). -
Trait (
traits/*.json): defines communication tone and behavioral guidelines (e.g.professional,creative,grumpy,uncompromising,devils_advocate).
A Character (characters/*.json) binds an identifier (aiName) with a role (or multiple roles with multi-skill support and runtime swapping via switch_skill) and a trait:
-
Geordi (
geordi.json):developer+professional -
Worf (
worf.json):security_auditor+reliable -
Pike (
pike.json):supervisor+reliable
The /call command launches a turn-based group discussion on any topic without tool execution:
-
Invocation:
-
Interactive Multiselect (CLI): run
/callwithout arguments to open an interactive checkbox picker. -
Direct Mentions (CLI/TUI): specify character IDs, AI names, or roles with
@and include the topic (e.g./call @spock @doctor "Review the proposal"). In the TUI, Tab completes participants contextually.
-
Interactive Multiselect (CLI): run
-
Execution:
- The user inputs a discussion topic.
- The CLI runs
$N$ rounds: in each round it mounts the current speaker's system prompt and provides the formatted conversation history prefixed with[SpeakerName]: "...".
-
Transcript Memory:
- The full debate transcript is injected into the main chat history upon call completion.
The /team command starts a multi-agent workflow where characters cooperate on tasks using tools on the physical filesystem:
/team dev_security "Implement a secure logging module and verify that no hardcoded credentials exist."In the TUI, Tab completes the team identifier after /team.
-
orchestrated(recommended): a dedicated supervisor (orchestrator, e.g.pike) receives a progress digest after each turn and dynamically routes the next step viaroute_next(agent, reason)(or callsFINE). -
round-robin: fixed cyclical rotation among team members up to configured rounds (teamMaxRounds, default 3). -
pipeline: single-pass assembly line where each station refines previous outputs. Supports objective acceptance loops viaRunController(src/core/loop.ts). -
hybrid: whendiscussionRounds > 0, adds a formal debate and voting round (cast_vote) after each working cycle.
-
report_status(status, summary, next_hint): marks turn completion (COMPLETATO,DA_CONTINUARE,FALLITO). -
route_next(agent, reason): used by the orchestrator to route the next turn. -
cast_vote(vote, reason): cast vote during hybrid team discussions (APPROVO,MODIFICARE,RIFIUTO). -
Resolution Hierarchy: Tool Call → Legacy Regex Marker (
STATO:) → Safety Default (with visible degradation warnings).
A temporary shared scratchpad scoped to a specific run via AsyncLocalStorage for exchanging intermediate decisions, notes, and artifacts without polluting persistent long-term memory.
The /goal command dynamically plans, recruits agents from all 24 characters, and executes end-to-end objectives:
/goal Build a TypeScript CLI application with automated unit tests and a security auditThe orchestrator inspects available character capabilities and emits a structured plan:
AGENTE: @una — Design module architecture and TypeScript interfaces
PARALLELO:
AGENTE: @geordi — Implement core logic
AGENTE: @data — Author technical documentation
FINE PARALLELO
AGENTE: @worf — Run static security audit
AGENTE: @pike — Review and validate final deliverables
FINE
- Independent subtasks inside
PARALLELOblocks execute concurrently usingPromise.all. -
Isolated Staging Workspaces: each parallel branch writes to a temporary sandbox (
parallelWorkspace.ts). On block completion, changes are merged with conflict detection. -
Serialized Permission Queue: interactive permission prompts (
[y/N]) are queued cleanly without overlapping.
- Dual Context Bar: displays pre-turn estimate and real peak prompt tokens measured by the LLM.
- History Condensation: outputs exceeding 1,500 characters are summarized while persisting full details to memory.
- Supervisor Rework Loop: if the final supervisor finds deficiencies, the failed step is re-queued for targeted rework.
- Final Stats Summary: per-agent token breakdown (output, context peak, total, timing, and generation speed).
TSUKA v0.8.1 · Repository · Issues · MIT License