Skip to content

API Reference parrot.tools.working_memory.task_memory

github-actions[bot] edited this page Nov 10, 2026 · 4 revisions

parrot.tools.working_memory.task_memory

View source

Recoverable task memory for :class:WorkingMemoryToolkit (FEAT-538).

Working memory retains named intermediate results. It does not retain a task's goal, constraints, plan, evidence, decisions or unresolved failures as a recoverable unit — so after conversation compaction or a process/REPL restart an agent cannot tell what is done, which result is authoritative, or what is safe to run next. Mutable aliases are not evidence of completed work.

This package adds that missing unit:

  • The journal is the source of truth; TaskState is a pure, versioned reducer projection of it (D6). Replay never re-executes validators or tools.
  • Evidence is versioned. Registering an artifact allocates artifact_id@version; overwriting an alias moves the alias and increments the version, so older evidence stays valid and resolvable.
  • Attribution is turn-scoped and declared (D3): declared, plan, none or ambiguous. Attribution never completes a step, and a successful tool call is never evidence on its own.
  • Recall is bounded, deterministic and read-only (D5). It appends no events, loads no data, and runs no tools.

Layout::

models.py    domain models, enums, limits and typed errors
config.py    opt-in TASK_MEMORY_* configuration

Every symbol re-exported here is leaf-safe: importing this package pulls in stdlib, pydantic and orjson only, never a concrete backend, pandas or the toolkit itself. Concrete backends are imported lazily by the components that need them.

.. warning::

Delivery A is not durable. It provides in-process continuity. Durable multi-pod continuity — PostgreSQL, blob write-through, crash reconciliation, retention scheduling — arrives with Delivery B. Do not describe Delivery A as recoverable across a restart.

Alias Actor

Re-exported from parrot.tools.working_memory.task_memory.models.Actor.

Alias AddConstraint

Re-exported from parrot.tools.working_memory.task_memory.models.AddConstraint.

Alias AddStep

Re-exported from parrot.tools.working_memory.task_memory.models.AddStep.

Alias ArtifactAvailability

Re-exported from parrot.tools.working_memory.task_memory.models.ArtifactAvailability.

Alias ArtifactDescriptor

Re-exported from parrot.tools.working_memory.task_memory.models.ArtifactDescriptor.

Alias ArtifactKind

Re-exported from parrot.tools.working_memory.task_memory.models.ArtifactKind.

Alias ArtifactPayload

Re-exported from parrot.tools.working_memory.task_memory.models.ArtifactPayload.

Alias Attribution

Re-exported from parrot.tools.working_memory.task_memory.models.Attribution.

Alias CallOutcome

Re-exported from parrot.tools.working_memory.task_memory.models.CallOutcome.

Alias CompletionMode

Re-exported from parrot.tools.working_memory.task_memory.models.CompletionMode.

Alias CompletionPolicy

Re-exported from parrot.tools.working_memory.task_memory.models.CompletionPolicy.

Alias CompletionSource

Re-exported from parrot.tools.working_memory.task_memory.models.CompletionSource.

Alias Constraint

Re-exported from parrot.tools.working_memory.task_memory.models.Constraint.

Alias CursorError

Re-exported from parrot.tools.working_memory.task_memory.models.CursorError.

Alias DEFAULT_REDACTED_KEYS

Re-exported from parrot.tools.working_memory.task_memory.config.DEFAULT_REDACTED_KEYS.

Alias DeactivateConstraint

Re-exported from parrot.tools.working_memory.task_memory.models.DeactivateConstraint.

Alias Decision

Re-exported from parrot.tools.working_memory.task_memory.models.Decision.

Alias DecisionPayload

Re-exported from parrot.tools.working_memory.task_memory.models.DecisionPayload.

Alias DegradedPayload

Re-exported from parrot.tools.working_memory.task_memory.models.DegradedPayload.

Alias EventType

Re-exported from parrot.tools.working_memory.task_memory.models.EventType.

Alias EvidenceRef

Re-exported from parrot.tools.working_memory.task_memory.models.EvidenceRef.

Alias InitialStepSpec

Re-exported from parrot.tools.working_memory.task_memory.models.InitialStepSpec.

Alias InvocationRecord

Re-exported from parrot.tools.working_memory.task_memory.models.InvocationRecord.

Alias JournalEvent

Re-exported from parrot.tools.working_memory.task_memory.models.JournalEvent.

Alias LimitExceeded

Re-exported from parrot.tools.working_memory.task_memory.models.LimitExceeded.

Alias Limits

Re-exported from parrot.tools.working_memory.task_memory.models.Limits.

Alias MIB

Re-exported from parrot.tools.working_memory.task_memory.config.MIB.

Alias PlanChange

Re-exported from parrot.tools.working_memory.task_memory.models.PlanChange.

Alias PlanChanges

Re-exported from parrot.tools.working_memory.task_memory.models.PlanChanges.

Alias PlanConstraintSpec

Re-exported from parrot.tools.working_memory.task_memory.models.PlanConstraintSpec.

Alias PlanStepPatch

Re-exported from parrot.tools.working_memory.task_memory.models.PlanStepPatch.

Alias PlanStepSpec

Re-exported from parrot.tools.working_memory.task_memory.models.PlanStepSpec.

Alias PlanUpdatePayload

Re-exported from parrot.tools.working_memory.task_memory.models.PlanUpdatePayload.

Alias PlanValidationError

Re-exported from parrot.tools.working_memory.task_memory.models.PlanValidationError.

Alias ReducerError

Re-exported from parrot.tools.working_memory.task_memory.models.ReducerError.

Alias ReplBinding

Re-exported from parrot.tools.working_memory.task_memory.models.ReplBinding.

Alias ResumeHint

Re-exported from parrot.tools.working_memory.task_memory.models.ResumeHint.

Alias ResumeHintPayload

Re-exported from parrot.tools.working_memory.task_memory.models.ResumeHintPayload.

Alias RetentionPayload

Re-exported from parrot.tools.working_memory.task_memory.models.RetentionPayload.

Alias RevisionConflict

Re-exported from parrot.tools.working_memory.task_memory.models.RevisionConflict.

Alias SCHEMA_VERSION

Re-exported from parrot.tools.working_memory.task_memory.models.SCHEMA_VERSION.

Alias ScopeViolation

Re-exported from parrot.tools.working_memory.task_memory.models.ScopeViolation.

Alias SetPlanComplete

Re-exported from parrot.tools.working_memory.task_memory.models.SetPlanComplete.

Alias StepPayload

Re-exported from parrot.tools.working_memory.task_memory.models.StepPayload.

Alias StepStatus

Re-exported from parrot.tools.working_memory.task_memory.models.StepStatus.

Alias SupersedeStep

Re-exported from parrot.tools.working_memory.task_memory.models.SupersedeStep.

Alias TaskContext

Re-exported from parrot.tools.working_memory.task_memory.models.TaskContext.

Alias TaskLifecyclePayload

Re-exported from parrot.tools.working_memory.task_memory.models.TaskLifecyclePayload.

Alias TaskMemoryConfig

Re-exported from parrot.tools.working_memory.task_memory.config.TaskMemoryConfig.

Alias TaskMemoryError

Re-exported from parrot.tools.working_memory.task_memory.models.TaskMemoryError.

Alias TaskMemoryUnavailable

Re-exported from parrot.tools.working_memory.task_memory.models.TaskMemoryUnavailable.

Alias TaskScope

Re-exported from parrot.tools.working_memory.task_memory.models.TaskScope.

Alias TaskState

Re-exported from parrot.tools.working_memory.task_memory.models.TaskState.

Alias TaskStatus

Re-exported from parrot.tools.working_memory.task_memory.models.TaskStatus.

Alias TaskStep

Re-exported from parrot.tools.working_memory.task_memory.models.TaskStep.

Alias ToolCallPayload

Re-exported from parrot.tools.working_memory.task_memory.models.ToolCallPayload.

Alias UnknownValidatorError

Re-exported from parrot.tools.working_memory.task_memory.models.UnknownValidatorError.

Alias UpdateConstraint

Re-exported from parrot.tools.working_memory.task_memory.models.UpdateConstraint.

Alias UpdateStep

Re-exported from parrot.tools.working_memory.task_memory.models.UpdateStep.

Alias new_id

Re-exported from parrot.tools.working_memory.task_memory.models.new_id.

Alias serialized_bytes

Re-exported from parrot.tools.working_memory.task_memory.models.serialized_bytes.

Alias utc_now

Re-exported from parrot.tools.working_memory.task_memory.models.utc_now.

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