Skip to documentation
Docs navigation
Docs/absorbFromAgent()
MemoGrafterAgent

absorbFromAgent()

Select and copy memory from another agent.

What it does

Select and copy memory from another agent.

The operation is scoped to the agent’s current session, so callers do not pass a session identifier on every call.

Signature

TypeScript
absorbFromAgent(sourceAgent: MemoGrafterAgent, options?: AbsorbFromAgentOptions): Promise<TopicNode[]>

Parameters

sourceAgent (MemoGrafterAgent) — The agent whose memory will be considered for copying.
options? (AbsorbFromAgentOptions) — Optional limits, filters, tags, or operation-specific behavior.

Result

The topic nodes created, selected, or copied by the operation.

Example

example.ts
await writer.absorbFromAgent(researcher, { prompt: "facts about PostgreSQL" });