fix(agent-plugins): match memo prompts and tool descriptions, release 0.3.3 (#7420)
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -21,6 +21,11 @@ import { truncateOutput } from "./output.ts";
|
||||
import { resolveSearchFilters, resolveAddParams } from "./scoping.ts";
|
||||
import { captureEvent, errorKind } from "./telemetry.ts";
|
||||
import { createMemoryLifecycle } from "../../agent-plugin-core/typescript/src/lifecycle.ts";
|
||||
import {
|
||||
USER_RECALL_HEADING,
|
||||
USER_SEARCH_QUERY_DESCRIPTION,
|
||||
USER_SEARCH_TOOL_DESCRIPTION,
|
||||
} from "../../agent-plugin-core/typescript/src/prompts.ts";
|
||||
|
||||
export const name = "mem0";
|
||||
export const inject = ["tools", "systemPrompt"];
|
||||
@@ -107,7 +112,7 @@ export function apply(ctx: Context, config: Config): void {
|
||||
const stateFor = (session: object): SessionState => {
|
||||
let state = sessionStates.get(session);
|
||||
if (!state) {
|
||||
const lifecycle = createMemoryLifecycle();
|
||||
const lifecycle = createMemoryLifecycle({ recallHeading: USER_RECALL_HEADING });
|
||||
lifecycle.beginSession();
|
||||
state = { lifecycle, messages: [] };
|
||||
sessionStates.set(session, state);
|
||||
@@ -197,10 +202,9 @@ export function apply(ctx: Context, config: Config): void {
|
||||
ctx.tools.register(
|
||||
defineTool({
|
||||
name: "search_memory",
|
||||
description:
|
||||
"Search the user's long-term Mem0 memory for facts relevant to a query. Use proactively before answering anything that may depend on what the user told you earlier.",
|
||||
description: USER_SEARCH_TOOL_DESCRIPTION,
|
||||
parameters: {
|
||||
query: { type: "string", description: "What to recall.", required: true },
|
||||
query: { type: "string", description: USER_SEARCH_QUERY_DESCRIPTION, required: true },
|
||||
limit: {
|
||||
type: "integer",
|
||||
description: `Max results to return (default ${DEFAULT_SEARCH_LIMIT}).`,
|
||||
|
||||
Reference in New Issue
Block a user