ScenarioSystem/Lilith.ScenarioBranch.cscsharp

Documentation

Lilith (Version 3)

Version 3 Lilith agent library. Entry point: Lilith.cs with partials under Boot/, Chat/, Ollama/, and SystemPrompt/.

Build the solution or run python ../Build-v3.py from this tree.

using Agent.Core.Logging;namespace Lilith.Agent;public class Branch : Lilith{    public Branch(Action<LogEntry> onLog, LilithCredentials? credentials = null) : base(onLog, credentials) { }    public void InitializeAsBranch(Lilith parent)    {        this.Workspace = parent.Workspace;        if (parent._client is not null)        {            var branchClient = new global::Agent.Core.Ollama.OllamaClient(this.Logger)            {                Model = this.Credentials.Model,                EmbeddingModel = this.Credentials.EmbeddingModel,                AgentName = this.Credentials.AgentName            };            branchClient.History.Add("system", this.Credentials.SystemPrompt);            branchClient.InitMemory(parent.GetMemoryFilePath());            branchClient.ToolRegistry = this.BuildToolRegistry();            this._client = branchClient;        }    }}public class Branches : Dictionary<string, Branch>{}