From 9ee1ebf30fc0d64f3be480608bae10f22e377b47 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Fri, 8 May 2026 14:00:26 +0100 Subject: [PATCH] docs: use sqlite transcript locators in examples --- docs/pi.md | 2 +- docs/plugins/sdk-runtime.md | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/pi.md b/docs/pi.md index 4e6477e0e0e..75f5225b477 100644 --- a/docs/pi.md +++ b/docs/pi.md @@ -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?", diff --git a/docs/plugins/sdk-runtime.md b/docs/plugins/sdk-runtime.md index 6cc08ad9013..69aa779b54e 100644 --- a/docs/plugins/sdk-runtime.md +++ b/docs/plugins/sdk-runtime.md @@ -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),