diff --git a/src/letta.zig b/src/letta.zig index 52dc264..940a0eb 100644 --- a/src/letta.zig +++ b/src/letta.zig @@ -3,6 +3,11 @@ const Io = std.Io; const LETTA_PATH = "/home/pierre/.bun/bin/letta"; +/// Conversation the matrix bridge routes messages into. Pinned to a specific +/// conversation ID (not "default") so a tainted/default conversation can be +/// swapped without touching the bridge. +pub const CONVERSATION_ID = "local-conv-487"; + /// Runs `letta -n -p `, captures everything it writes to /// stdout, and returns it as an owned slice (caller frees it). pub fn infer( @@ -11,8 +16,10 @@ pub fn infer( agent: []const u8, prompt: []const u8, ) ![]u8 { + _ = agent; // unused: pinned conversation implies the agent on the CLI side var child = try std.process.spawn(io, .{ - .argv = &.{ LETTA_PATH, "--agent", agent, "-p", prompt, "--conversation", "default", "--toolset", "default" }, + // Pinned conversation: --agent must be omitted for non-default conversations. + .argv = &.{ LETTA_PATH, "-p", prompt, "--conversation", CONVERSATION_ID, "--toolset", "default" }, .stdout = .pipe, .stderr = .inherit, // letta's error output goes straight to your terminal });