Skip to main content

Memory protocol types for StrawPot agent orchestration

Project description

strawpot-memory

Interface definition for StrawPot memory providers.

This package defines the MemoryProvider protocol and associated types that any memory backend must implement to integrate with the StrawPot agent orchestration system.

Install

pip install strawpot-memory

Usage

Implement the MemoryProvider protocol to create a custom memory backend:

from strawpot_memory.memory_protocol import (
    MemoryProvider,
    GetResult,
    DumpReceipt,
    RememberResult,
    RecallResult,
)


class MyMemoryProvider:
    name = "my-provider"

    def get(self, *, session_id, agent_id, role, behavior_ref, task, **kwargs) -> GetResult:
        ...

    def dump(self, *, session_id, agent_id, role, behavior_ref, task, status, output, **kwargs) -> DumpReceipt:
        ...

    def remember(self, *, session_id, agent_id, role, content, **kwargs) -> RememberResult:
        ...

    def recall(self, *, session_id, agent_id, role, query, **kwargs) -> RecallResult:
        ...


assert isinstance(MyMemoryProvider(), MemoryProvider)  # runtime check

Protocol Methods

Method Purpose
get Retrieve context cards and control signals before spawning an agent
dump Record agent results after completion
remember Persist knowledge during agent execution
recall Query stored knowledge on-demand during agent execution

Types

  • MemoryKind — enum of memory types (PM, SM, STM, RM, EM)
  • ContextCard — single unit of context returned by get
  • ControlSignal — advisory signals (risk level, suggested next step, policy flags)
  • GetResult — full output of a get call
  • DumpReceipt — receipt returned by dump
  • RememberResult — result returned by remember
  • RecallEntry — single entry returned by recall
  • RecallResult — result returned by recall

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

strawpot_memory-0.2.3.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

strawpot_memory-0.2.3-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file strawpot_memory-0.2.3.tar.gz.

File metadata

  • Download URL: strawpot_memory-0.2.3.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for strawpot_memory-0.2.3.tar.gz
Algorithm Hash digest
SHA256 3138de813e4b4068ae967a4665bff3861910ec8d7aeed97b6db9ffb277deb312
MD5 e2f3ff0ea1acbd7e0db5b557c90188b2
BLAKE2b-256 d8d85017df06a43a0a9bb6f7d5153d1c0b1abd65bf4e3726ed7340326cdcb792

See more details on using hashes here.

Provenance

The following attestation bundles were made for strawpot_memory-0.2.3.tar.gz:

Publisher: publish.yml on strawpot/strawpot_memory

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file strawpot_memory-0.2.3-py3-none-any.whl.

File metadata

File hashes

Hashes for strawpot_memory-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f4bf37d46523653c3b4f56c078c0b051000e87791541d867de6d08338c9514d0
MD5 dc30fe4d46d09deb86069cc5f948e5bb
BLAKE2b-256 e88b25aa8dfc20c9eba2f0c05e0e70c4c854909d00c4c5c89feb0576eb4200b4

See more details on using hashes here.

Provenance

The following attestation bundles were made for strawpot_memory-0.2.3-py3-none-any.whl:

Publisher: publish.yml on strawpot/strawpot_memory

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page