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.6.tar.gz (8.4 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.6-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: strawpot_memory-0.2.6.tar.gz
  • Upload date:
  • Size: 8.4 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.6.tar.gz
Algorithm Hash digest
SHA256 59608880025de4753f450e1352524c89f9bb0f51a23ec46e1212d578cc0aed51
MD5 ed3e6d9c380170eb1782bb5b6a7333bc
BLAKE2b-256 01cf446b16e63cb077384343630a0cc20083ebe4cf550b40cca9942c99e12ec9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for strawpot_memory-0.2.6-py3-none-any.whl
Algorithm Hash digest
SHA256 3687af07752272c361a4502ed95c93268c023986f8b3c0999e11d6db8a7b5af1
MD5 fddc857c87e3203ab4eb3aee990650bf
BLAKE2b-256 704dce341e306a33af4059da2a753a973c6f6d276ad9831b0fe2c06766c66e16

See more details on using hashes here.

Provenance

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