Skip to main content

Shared memory and tool layer for Perseus agents — MemoryEntry, Elastic/Engram backends, decision log, knowledge graph, project context.

Project description

perseus-agent-core

Shared memory and tool layer for Perseus agents. Extracted from perseus-rapid-agent and perseus-qwen-memory, which previously carried copy-pasted copies of this code — the same MemoryEntry crash shipped twice because of it. Fixes now land once, here.

What's in it

  • perseus_agent_core.memoryMemoryEntry, MemorySearchResult, MemoryBackend (interface), MemoryBackendError, plus two implementations:
    • ElasticMemoryBackend — Elasticsearch via elasticsearch-py, keyword search always, ELSER semantic search when the deployment supports it.
    • EngramMemoryBackend — shells out to the engram-rs CLI; retry-on-lock, timeout handling, helpful install hint when missing.
  • perseus_agent_core.toolsDecisionLogTool, KnowledgeGraphTool, ProjectContextTool.

Agent-specific code (AgentConfig, agent classes, LLM clients, demos) stays in the consuming repos.

Install

pip install "perseus-agent-core @ git+https://github.com/tcconnally/perseus-agent-core.git"
# with the Elasticsearch backend:
pip install "perseus-agent-core[elastic] @ git+https://github.com/tcconnally/perseus-agent-core.git"

There are zero hard dependencies — the elastic client is imported lazily only when ElasticMemoryBackend is used.

Usage

from perseus_agent_core.memory import EngramMemoryBackend, MemoryEntry
from perseus_agent_core.tools import DecisionLogTool

memory = EngramMemoryBackend()
log = DecisionLogTool(memory)

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

perseus_agent_core-0.2.0-py3-none-any.whl (17.3 kB view details)

Uploaded Python 3

File details

Details for the file perseus_agent_core-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for perseus_agent_core-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 97cdc125dc432a38559ce90aa2572d099cedb177f6f505596bcc696e5122fb2b
MD5 0d302ca3c8109717d1c39a4fea7c79b9
BLAKE2b-256 b34394717d8a502a3dba84674c579400a156462b9053935bbacdfc6abc3890aa

See more details on using hashes here.

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