Skip to content

API Reference parrot.memory.episodic.tools

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot.memory.episodic.tools

View source

Agent-usable tools for episodic memory.

Exposes episodic memory operations as agent-callable tools via AbstractToolkit. LLM agents can search past experiences, record lessons, and retrieve warnings during their reasoning loop.

Alias AbstractToolkit

Re-exported from parrot.tools.toolkit.AbstractToolkit.

Alias EpisodeCategory

Re-exported from parrot.memory.episodic.models.EpisodeCategory.

Alias EpisodeOutcome

Re-exported from parrot.memory.episodic.models.EpisodeOutcome.

Alias EpisodeSearchResult

Re-exported from parrot.memory.episodic.models.EpisodeSearchResult.

Alias EpisodicMemoryStore

Re-exported from parrot.memory.episodic.store.EpisodicMemoryStore.

Class EpisodicMemoryToolkit

Toolkit exposing episodic memory as agent-callable tools.

Provides four tools for LLM agents:

  • search_episodic_memory: Semantic search over past experiences.
  • record_lesson: Explicitly record a lesson for future reference.
  • get_warnings: Retrieve relevant past failure warnings.
  • cite_memory: Attribute delivered memories without reinforcing them.
Parameter Type Default Description
store EpisodicMemoryStore The EpisodicMemoryStore instance.
namespace MemoryNamespace The namespace scope for all operations.
**kwargs {}

Attributes:

Attribute Type Description
tool_prefix str

Method EpisodicMemoryToolkit.search_episodic_memory

Search past agent experiences by semantic similarity.

Use this tool to recall what happened in similar past situations, including lessons learned and outcomes.

search_episodic_memory(query: str, top_k: int = 5, failures_only: bool = False) -> str

Parameter Type Default Description
query str What to search for in past experiences.
top_k int 5 Maximum number of results to return.
failures_only bool False If True, only return past failures and mistakes.

Returns: str — Formatted list of relevant past experiences with lessons learned.

Method EpisodicMemoryToolkit.record_lesson

Explicitly record a lesson learned for future reference.

Use this when you discover something important that should be remembered for similar future situations.

record_lesson(situation: str, lesson: str, category: str = 'decision', importance: int = 5) -> str

Parameter Type Default Description
situation str What was happening when the lesson was learned.
lesson str The concise lesson or insight to remember.
category str 'decision' Type of lesson (decision, user_preference, workflow_pattern).
importance int 5 How important this lesson is (1-10, default 5).

Returns: str — Confirmation that the lesson was recorded.

Method EpisodicMemoryToolkit.cite_memory

Cite delivered episode versions without selecting a review grade.

cite_memory(episode_ids: list[str]) -> str

Parameter Type Default Description
episode_ids list[str] Episode identifiers present in the runtime-delivered memory exposure.

Returns: str — A bounded acknowledgement, or a non-leaking rejection message.

Method EpisodicMemoryToolkit.get_warnings

Get warnings about past mistakes relevant to the current task.

Use this before attempting actions that might fail, to check if similar attempts have failed before.

get_warnings(context: str = '') -> str

Parameter Type Default Description
context str '' Description of what you're about to do (for relevance matching).

Returns: str — Formatted warnings about past failures and successful approaches, or a message if no relevant warnings exist.

Alias MemoryNamespace

Re-exported from parrot.memory.episodic.models.MemoryNamespace.

Alias current_memory_exposure

Re-exported from parrot.memory.agent_memory.runtime.current_memory_exposure.

Alias current_memory_scope

Re-exported from parrot.memory.agent_memory.runtime.current_memory_scope.

Attribute logger

Alias recall_scopes

Re-exported from parrot.memory.episodic.visibility.recall_scopes.

Alias visible_to_scope

Re-exported from parrot.memory.episodic.visibility.visible_to_scope.

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally