A saved workflow, a fresh conversation
A scenario is a trusted XML file that gives one task its own sub-agent conversation. The main agent loads the named file, supplies its declared inputs and runs the steps in order. Each invocation starts fresh with the same provider and model. Later child turns can use earlier child replies; they do not share the main agent's mutable conversation.
Follow one request
- Name the task. Ask Lilith to run a saved scenario.
- Fill the inputs. The application validates supplied string values. Missing required values are requested before child work begins.
- Create the child. Its system prompt and tool list come from the selected XML.
- Run each step. A step is a chat turn, not an XML command or an automatic tool execution.
- Return the result. The exit mode controls whether the final text is copied or handed to the main agent for a response.
run_scenario
scenario_name: daily_focus
inputs: priorities = Finish the outline; review notes
available_minutes = 45Read the XML in two ways
The scenario library's Designed view shows inputs, instructions, tools, numbered turns and the exit. Raw shows the complete XML. Below Download XML, Every part, briefly explains every element in file order and links to its writing example.
Browse versioned scenarios ↗Tools do the work; prompts request it
An allow entry selects an existing tool. A csharp entry defines a trusted executable helper with a JSON argument schema and a CDATA body. The application still validates calls and owns execution. A confident child reply is not evidence that a tool actually ran.
Copy and respond solve different jobs
mode="copy" returns the final text without a main-model rewrite. mode="respond" passes the result and exit request to the main agent, which composes the answer. Bound workspace and scheduling workflows return verified application results; an approval request is never promoted into a completed mutation.
Choose the correct version
| Version | Scenario capabilities | Read |
|---|---|---|
| V1–V2 | No XML sub-agent scenarios. | Version archive |
| V3 | Ordered child chats, named tools, trusted C# and copy/respond exits. | V3 XML |
| V4 | Scenario-managed workspace with bounded retrieval and boot-fixed Ask/YOLO. | V4 XML |
| V5 | Scenario-managed timers, intervals and cron; events return to the main conversation. | V5 XML |
V6: branch and delegate
Schema 2 adds application-evaluated conditions and explicit nested saved scenarios. Run file_branch_demo twice: the missing-file branch saves hello to first.txt; the existing-file branch saves again to second.txt. Children start fresh and return verified results.
Read the two-branch example ↗V8: collect evidence, then answer
Schema 3 adds result bindings, bounded foreach, explicit host research operations and structured results. Readers process separate sources, then a synthesis scenario compares the findings. These features extend the earlier ordered-chat contract.
Follow web research through subagentsKeep the main conversation light
Delegate a focused task and return a useful result. Child transcripts are stored separately. Workspace retrieval can return selected excerpts instead of every file, but scenarios still consume context and cannot make an unlimited input free to process.
Observe the run
Console progress and recording scenes show child steps and tool results. Child speech is suppressed; user-facing main replies are narrated. Each run retains populated XML, a child history and a result or failure record. Loading saved evidence does not execute it again.
Understand the boundary
The documented V3–V5 workflow is sequential, uses the same model and does not expose nested scenarios or XML loops. Saved C# is full-process trusted application code, not sandboxed content. Read the selected version's contract before copying an example from another release.
Build your first scenario
The companion guide explains every XML section, each chat turn, custom C# helpers, installation and validation with a complete example.
Writing XML scenarios: the full walkthrough ↗