⚡ @slopshop/memory  ·  Python + Node.js

Memory SDK

9 memory techniques. One import. Works everywhere.

pip install slopshop-memory npm install @slopshop/memory ✓ Free memory APIs always 0 credits
Installation
bash
$ pip install slopshop-memory
Successfully installed slopshop-memory-1.0.0

$ python -c "import slopshop; print(slopshop.__version__)"
1.0.0
bash
$ npm install @slopshop/memory
added 1 package in 0.8s

$ node -e "const m=require('@slopshop/memory'); console.log(m.version)"
1.0.0

Quick Start

Authenticate once. All 9 techniques share the same client instance.

Python
from slopshop import Memory

# Initialize with your API key
memory = Memory(api_key="sk-slop-...")

# Or read from environment
# export SLOPSHOP_API_KEY=sk-slop-...
memory = Memory()

# Store your first memory
memory.set("project_stack", "React + Next.js")

# Retrieve it any time
stack = memory.get("project_stack")
print(stack)  # React + Next.js
Node.js
import { Memory } from '@slopshop/memory'

// Initialize with your API key
const memory = new Memory({ apiKey: 'sk-slop-...' })

// Or read from environment
// SLOPSHOP_API_KEY=sk-slop-...
const memory = new Memory()

// Store your first memory
await memory.set('project_stack', 'React + Next.js')

// Retrieve it any time
const stack = await memory.get('project_stack')
console.log(stack)  // React + Next.js

The 9 Techniques

Every method maps to a live API endpoint. All calls are authenticated with your API key. Free memory APIs cost 0 credits forever.

Technique 01
Persistent Memory
Key-value memory that survives across sessions, model reloads, and server restarts. Free forever — 0 credits per call.
POST /v1/memory/set
Python
# Store any value — string, dict, list
memory.set("user_prefs", {
    "theme": "dark",
    "lang": "python"
})

# Retrieve by key
prefs = memory.get("user_prefs")
print(prefs["theme"])  # dark

# Namespaced memory
memory.set("agent_state", data,
           namespace="project-x")
Node.js
// Store any value — string, object, array
await memory.set('user_prefs', {
  theme: 'dark',
  lang: 'node'
})

// Retrieve by key
const prefs = await memory.get('user_prefs')
console.log(prefs.theme)  // dark

// Namespaced memory
await memory.set('agent_state', data,
  { namespace: 'project-x' })
Technique 02
Dream Engine
REM-cycle memory synthesis. Your agent synthesizes, compresses, and evolves its memory on a schedule — waking up smarter every time.
POST /v1/memory/dream/start
Python
# Start a dream session
session = memory.dream.start(
    namespace="project-x",
    strategy="synthesize"
    # strategies: synthesize, pattern_extract,
    # insight_generate, compress, associate
)
print(session["dream_id"])

# Poll for completion
status = memory.dream.status(session["dream_id"])
print(status["phase"])  # running | done
Node.js
// Start a dream session
const session = await memory.dream.start(
  'project-x',
  'synthesize'
  // strategies: synthesize, pattern_extract,
  // insight_generate, compress, associate
)
console.log(session.dream_id)

// Poll for completion
const status = await memory.dream.status(
  session.dream_id
)
console.log(status.phase)  // running | done
Technique 03
Multiplayer Memory
Shared memory spaces for teams. Every agent on your team reads and writes to the same intelligence space — real-time collective knowledge.
POST /v1/memory/share/create
Python
# Create a shared memory space
space = memory.share.create(
    name="team-brain"
)
share_id = space["share_id"]

# Invite a collaborator
memory.collaborator.invite(
    share_id=share_id,
    email="teammate@company.com"
)

# Write to shared space
memory.share.write(share_id, "standup_notes",
                   "Shipped auth today")
Node.js
// Create a shared memory space
const space = await memory.share.create(
  'team-brain'
)
const { share_id } = space

// Invite a collaborator
await memory.collaborator.invite({
  share_id,
  email: 'teammate@company.com'
})

// Write to shared space
await memory.share.write(
  share_id, 'standup_notes', 'Shipped auth today'
)
Technique 04
Snapshot Branching
Point-in-time memory snapshots. Branch your agent's state before risky operations, then restore to any checkpoint instantly.
POST /v1/memory/snapshot
Python
# Take a snapshot before risky work
snap = memory.snapshot(namespace="project-x")
snapshot_id = snap["snapshot_id"]

# ... do risky operations ...
memory.set("config", experimental_data)

# Restore if something went wrong
memory.restore(snapshot_id)

# List all snapshots
snaps = memory.snapshot.list(
    namespace="project-x"
)
Node.js
// Take a snapshot before risky work
const snap = await memory.snapshot('project-x')
const { snapshot_id } = snap

// ... do risky operations ...
await memory.set('config', experimentalData)

// Restore if something went wrong
await memory.restore(snapshot_id)

// List all snapshots
const snaps = await memory.snapshot.list(
  'project-x'
)
Technique 05
Bayesian Calibration
Probabilistic belief updating. Your agent maintains calibrated confidence scores that update with new evidence — no more stale certainty.
POST /v1/memory/bayesian/update
Python
# Initialize a belief with a prior
memory.bayesian.update(
    key="user_prefers_dark_mode",
    prior=0.5,
    likelihood=0.85
)

# Query current belief
belief = memory.bayesian.get(
    "user_prefers_dark_mode"
)
print(belief["posterior"])  # 0.739...

# Update again with new evidence
memory.bayesian.update(
    key="user_prefers_dark_mode",
    likelihood=0.92
)
Node.js
// Initialize a belief with a prior
await memory.bayesian.update({
  key: 'user_prefers_dark_mode',
  prior: 0.5,
  likelihood: 0.85
})

// Query current belief
const belief = await memory.bayesian.get(
  'user_prefers_dark_mode'
)
console.log(belief.posterior)  // 0.739...

// Update with new evidence
await memory.bayesian.update({
  key: 'user_prefers_dark_mode',
  likelihood: 0.92
})
Technique 06
Episodic Chains
Sequential episode memory with automatic chaining. Build a linked timeline of agent actions, decisions, and observations for full replay.
POST /v1/memory/episode
Python
# Add an episode to the chain
ep = memory.episode.add(
    content="Fetched user profile from API",
    metadata={"tool": "http-get", "ms": 142}
)

# Add the next episode (auto-linked)
memory.episode.add(
    content="Summarized user data with Claude",
    prev_id=ep["episode_id"]
)

# Retrieve the full chain
chain = memory.episode.chain(ep["episode_id"])
for node in chain:
    print(node["content"])
Node.js
// Add an episode to the chain
const ep = await memory.episode.add({
  content: 'Fetched user profile from API',
  metadata: { tool: 'http-get', ms: 142 }
})

// Add the next episode (auto-linked)
await memory.episode.add({
  content: 'Summarized user data with Claude',
  prev_id: ep.episode_id
})

// Retrieve the full chain
const chain = await memory.episode.chain(
  ep.episode_id
)
chain.forEach(node => console.log(node.content))
Technique 07
Memory Triggers
Reactive memory automation. Set conditions on memory keys — when the condition is met, the action fires automatically. Zero polling required.
POST /v1/memory/trigger
Python
# Fire an action when a key is written
memory.trigger.create(
    condition={
        "key": "task_status",
        "equals": "complete"
    },
    action={
        "type": "webhook",
        "url": "https://myapp.com/done"
    }
)

# List active triggers
triggers = memory.trigger.list()

# Remove a trigger
memory.trigger.delete(trigger_id)
Node.js
// Fire an action when a key is written
await memory.trigger.create({
  condition: {
    key: 'task_status',
    equals: 'complete'
  },
  action: {
    type: 'webhook',
    url: 'https://myapp.com/done'
  }
})

// List active triggers
const triggers = await memory.trigger.list()

// Remove a trigger
await memory.trigger.delete(triggerId)
Technique 08
Procedural Memory
Teach your agent reusable tool chains by name. Store, recall, and execute multi-step procedures like a scripted skill — instantly replayable.
POST /v1/memory/procedure/learn
Python
# Teach a named procedure
memory.procedure.learn(
    name="daily_standup",
    tool_chain=[
        {"tool": "memory-search",
         "query": "yesterday's progress"},
        {"tool": "llm-summarize"},
        {"tool": "memory-set",
         "key": "standup_summary"}
    ]
)

# Execute by name later
result = memory.procedure.run("daily_standup")
Node.js
// Teach a named procedure
await memory.procedure.learn({
  name: 'daily_standup',
  tool_chain: [
    { tool: 'memory-search',
      query: "yesterday's progress" },
    { tool: 'llm-summarize' },
    { tool: 'memory-set',
      key: 'standup_summary' }
  ]
})

// Execute by name later
const result = await memory.procedure.run(
  'daily_standup'
)
Technique 09
Swarm Orchestration
Coordinate multiple agents in parallel on a single task. Each agent in the swarm contributes to a shared memory space — collective intelligence at scale.
POST /v1/swarm/orchestrate
Python
# Orchestrate a swarm of agents
swarm = memory.swarm.orchestrate(
    task="Analyze Q1 user feedback and"
         " extract top 5 pain points",
    agents=[
        {"id": "researcher",  "model": "claude"},
        {"id": "analyst",    "model": "grok"},
        {"id": "synthesizer", "model": "claude"}
    ]
)
print(swarm["result"])
Node.js
// Orchestrate a swarm of agents
const swarm = await memory.swarm.orchestrate({
  task: 'Analyze Q1 user feedback and'
      + ' extract top 5 pain points',
  agents: [
    { id: 'researcher',  model: 'claude' },
    { id: 'analyst',    model: 'grok'   },
    { id: 'synthesizer', model: 'claude' }
  ]
})
console.log(swarm.result)

API Reference Summary

All SDK methods are thin wrappers over these REST endpoints. You can call them directly with any HTTP client using your API key as a Bearer token.

Base URL: https://slopshop.gg
Technique SDK Method Endpoint Method
Persistent Memory memory.set() / memory.get() /v1/memory/set  /v1/memory/get POST
Dream Engine memory.dream.start() /v1/memory/dream/start POST
Multiplayer Memory memory.share.create() /v1/memory/share/create POST
Snapshot Branching memory.snapshot() / memory.restore() /v1/memory/snapshot POST
Bayesian Calibration memory.bayesian.update() /v1/memory/bayesian/update POST
Episodic Chains memory.episode.add() / .chain() /v1/memory/episode POST
Memory Triggers memory.trigger.create() /v1/memory/trigger POST
Procedural Memory memory.procedure.learn() /v1/memory/procedure/learn POST
Swarm Orchestration memory.swarm.orchestrate() /v1/swarm/orchestrate POST
Auth: Authorization: Bearer sk-slop-...  ·  Content-Type: application/json  ·  OpenAPI spec →

Start building in 60 seconds.

500 free credits on signup. Core memory APIs free forever. No card required.

Get Your API Key — Free Read Full Docs ↗ Back to Home
MCP + REST API + CLI · Claude · Grok · DeepSeek · GPT-4 · SQLite · Self-hostable