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,
            budget=None, parent_agent_id=None, group_id=None) -> GetResult:
        ...

    def dump(self, *, session_id, agent_id, role, behavior_ref, task, status, output,
             tool_trace="", parent_agent_id=None, artifacts=None, group_id=None) -> DumpReceipt:
        ...

    def remember(self, *, session_id, agent_id, role, content,
                 keywords=None, scope="project", group_id=None) -> RememberResult:
        ...

    def recall(self, *, session_id, agent_id, role, query,
               keywords=None, scope="", max_results=10, group_id=None) -> 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.7.tar.gz (8.3 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.7-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: strawpot_memory-0.2.7.tar.gz
  • Upload date:
  • Size: 8.3 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.7.tar.gz
Algorithm Hash digest
SHA256 7608e6915f55b769e65ec70e69e3109d565722c9fc88b9ff04315955e6dde22f
MD5 46e3bf131bfbec7bcfe47aba022e6063
BLAKE2b-256 f190f56d78bb2f2b968b2aa59cabd7d2fd82c37dc2f2a2c435d64bd0d3ee0ba2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for strawpot_memory-0.2.7-py3-none-any.whl
Algorithm Hash digest
SHA256 820dd5e747fd297cc6c6594e0b041e089831aa2d1683b29ab98bbc094c5dafd3
MD5 3f0b7b3ce2a6bbd26e2322cf0dd27761
BLAKE2b-256 f6e700b6f4b5961085e14f57f67cd09595318d94e7332d05d2a0b67ff8a68d9b

See more details on using hashes here.

Provenance

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