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,
)


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:
        ...


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

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

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.2.tar.gz (6.8 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.2-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: strawpot_memory-0.2.2.tar.gz
  • Upload date:
  • Size: 6.8 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.2.tar.gz
Algorithm Hash digest
SHA256 b1f2edcdd9c82db4e336737e0b93b8cc10e9e97f8227c105614f2544636164bf
MD5 6be53df751bbe39a5ab4f4ffb9eeab90
BLAKE2b-256 d56f105a5f5b41b10cbff1a3b4549bf0cc2a95cbb004f32b54b9588b08b283c9

See more details on using hashes here.

Provenance

The following attestation bundles were made for strawpot_memory-0.2.2.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.2-py3-none-any.whl.

File metadata

File hashes

Hashes for strawpot_memory-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9d15ed62bd11775c0786a4bba2b2aef070769b7d6bd72b33fe4e01332076372a
MD5 ac0ac3a25def1a2d44bc80fe5cc80a02
BLAKE2b-256 e5525cf899cd27a51d56b89d7d68c4585dfa5d8fe6d06d59ad28d9487da57d1b

See more details on using hashes here.

Provenance

The following attestation bundles were made for strawpot_memory-0.2.2-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