From b7a214afb11cb568af2b5515ac024533b1fef123 Mon Sep 17 00:00:00 2001 From: lowyelling Date: Mon, 4 May 2026 15:37:06 -0400 Subject: [PATCH] docs(integrations): tighten Verifying section after end-to-end smoke MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Smoke-tested all five verification steps against a fresh Sonnet 4.6 + Honcho integration. Three findings, all reflected here: - Cross-session recall (#4): added Note about DERIVER_REPRESENTATION_BATCH_MAX_TOKENS=1024 — short warmups don't accumulate enough content to flush observations, so cross-session recall returns empty even on a working integration. - Tool calling prompt (#5): replaced the honcho_chat patterns prompt with a verbatim-retrieval honcho_search prompt. Sonnet skips honcho_chat when middleware-injected context already answers; verbatim retrieval forces a fire. - Tool inspection (#5): replaced result.toolCalls reference with result.steps[i].toolCalls + flatMap snippet. Top-level toolCalls is empty in multi-step calls (stopWhen: stepCountIs(N)) — the fires are nested inside steps. Co-Authored-By: Claude Opus 4.7 (1M context) --- docs/v3/guides/integrations/vercel-ai-sdk.mdx | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/docs/v3/guides/integrations/vercel-ai-sdk.mdx b/docs/v3/guides/integrations/vercel-ai-sdk.mdx index 947c2c5f..cf7c27fe 100644 --- a/docs/v3/guides/integrations/vercel-ai-sdk.mdx +++ b/docs/v3/guides/integrations/vercel-ai-sdk.mdx @@ -273,13 +273,27 @@ Based on what we've talked about, what do you know about me? If the model recalls preferences from previous sessions without them being in the current conversation, cross-session memory is working. Honcho processed the prior turns between sessions and updated the user's representation. + +The deriver waits until 1024 tokens are accumulated before batch processing - short conversations won't trigger cross-session recall! + + ### 5. Test tool calling directly ```text -Use your honcho_chat tool to tell me what patterns you've noticed about me. +Call your honcho_search tool with the query 'TypeScript' and quote the exact verbatim message that contained TypeScript. Do not paraphrase. ``` -If the model calls the tool and returns a synthesized answer, the full tool pipeline is functional. To confirm which tool fired, inspect `result.toolCalls` — tool names like `honcho_chat` appear there, not in `result.text`. +If the model returns the exact prior message word-for-word, the tool pipeline is functional. To confirm which tool fired, inspect `result.steps[i].toolCalls`: + +```typescript +const toolFires = result.steps?.flatMap((step, i) => + (step.toolCalls ?? []).map((tc) => ({ step: i, tool: tc.toolName, input: tc.input })) +) ?? []; +console.log(toolFires); +// [{ step: 0, tool: "honcho_search", input: { query: "TypeScript", limit: 10 } }] +``` + +When the model takes more than one turn (call a tool, see the result, then answer), the top-level `result.toolCalls` is empty — check inside each `step`. ## Full Script