Interface: MemoryBankLike
Defined in: packages/core/src/baleybot.ts:307
Duck-typed memory interface. Implemented by MemoryBank in
@baleybots/memory. Defined here so core can accept it without taking
a dependency on memory.
The return type of asTool is intentionally just { name: string } —
the minimum the bot needs to key the tool into its tools map. The
tighter typings (e.g. ZodToolDefinition<SpecificSchema, SpecificReturn>)
are invariant in their generics, so requiring them here would force
every caller to cast. The tool object is treated opaquely after
.name is read; the tools map is cast to TTools at construction.
Methods
asTool()
asTool(
toolName?):object
Defined in: packages/core/src/baleybot.ts:318
Produce a tool definition that writes back to memory. Auto-added to
the bot's tools at construction time. The tool's .name is used as
the key in the tools map; the rest of the shape is opaque to core.
Parameters
toolName?
string
Returns
object
name
name:
string
buildContext()
buildContext(
input?):string|Promise<string>
Defined in: packages/core/src/baleybot.ts:312
Build a markdown context blob to splice into the system prompt. Called once per turn via Baleybot's systemPromptBuilder pipeline.
Parameters
input?
string
Returns
string | Promise<string>