docs: use sqlite transcript locators in examples

This commit is contained in:
Peter Steinberger
2026-05-08 14:00:26 +01:00
parent e964cac202
commit 9ee1ebf30f
2 changed files with 4 additions and 3 deletions

View File

@@ -149,7 +149,7 @@ import { runEmbeddedPiAgent } from "./agents/pi-embedded-runner.js";
const result = await runEmbeddedPiAgent({
sessionId: "user-123",
sessionKey: "main:whatsapp:+1234567890",
sessionFile: "/path/to/session.jsonl",
sessionFile: "sqlite-transcript://main/user-123.jsonl",
workspaceDir: "/path/to/workspace",
config: openclawConfig,
prompt: "Hello, how are you?",

View File

@@ -92,10 +92,11 @@ Provider and channel execution paths must use the active runtime config snapshot
// Run an embedded agent turn
const agentDir = api.runtime.agent.resolveAgentDir(cfg);
const sessionId = "my-plugin-task-1";
const result = await api.runtime.agent.runEmbeddedAgent({
sessionId: "my-plugin:task-1",
sessionId,
runId: crypto.randomUUID(),
sessionFile: path.join(agentDir, "sessions", "my-plugin-task-1.jsonl"),
sessionFile: createSqliteSessionTranscriptLocator({ agentId, sessionId }),
workspaceDir: api.runtime.agent.resolveAgentWorkspaceDir(cfg),
prompt: "Summarize the latest changes",
timeoutMs: api.runtime.agent.resolveAgentTimeoutMs(cfg),