mirror of
https://github.com/moltbot/moltbot.git
synced 2026-05-10 20:45:15 +00:00
docs: use sqlite transcript locators in examples
This commit is contained in:
@@ -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?",
|
||||
|
||||
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user