Skip to main content

becomer-agents

Multi-tenant agent memory framework powered by BECOMER.

Zero tokens per recall. Any LLM. Shared memory across agents without message passing.

pip install becomer-agents

Why this exists

LangChain, LlamaIndex, CrewAI, AutoGen — they all have memory. But:

  • Memory dies when the process ends
  • Memory is tied to one LLM provider
  • Agents can't share memory without message passing
  • Every recall burns 500–7,000 tokens on an LLM reasoning pass

becomer-agents fixes all four. Memory persists across sessions, works across every LLM simultaneously, agents share a namespace without coordination code, and retrieval costs zero tokens.


How namespaces work

Every agent gets a namespace: {task_id}.{role}

task-abc.researcher   ← researcher agent's private memory
task-abc.executor     ← executor agent's private memory
task-abc.shared       ← readable and writable by all agents

Shared memory without message passing. No state files. No coordination logic.


Quick start — multi-agent pipeline

import os
from becomer_agents import MultiAgentPipeline

def researcher(task, own_ns, shared_ns):
    own_ns.store("API endpoint: POST /v1/payments, OAuth2 bearer")
    own_ns.store("Rate limit: 100 req/s")
    return "Research complete"

def executor(task, own_ns, shared_ns):
    # Recall what researcher found — no message passing
    findings = shared_ns.recall("payment API endpoint and auth", top_k=5)
    own_ns.store(f"Implementation plan based on {len(findings)} findings")
    return "Plan written"

def reviewer(task, own_ns, shared_ns):
    everything = shared_ns.recall("what was found and planned?", top_k=8)
    own_ns.store("Review: APPROVED")
    return "Approved"

pipeline = MultiAgentPipeline(
    api_key=os.environ["BECOMER_API_KEY"],
    task_id="payments-task-001",
    roles=["researcher", "executor", "reviewer"],
)

results = pipeline.run(
    task="Build a payments integration",
    agents={
        "researcher": researcher,
        "executor":   executor,
        "reviewer":   reviewer,
    },
)

The terminal shows a live memory activity feed as agents store and recall.


Self-improving agents

from becomer_agents import SelfImprovingPipeline

pipeline = SelfImprovingPipeline(
    api_key=os.environ["BECOMER_API_KEY"],
    task_id="optimizer-001",
)

def my_agent(task, context):
    # context = what worked in previous iterations
    # use it to choose a better approach this time
    approach = "zero-shot" if not context else "few-shot + CoT"
    score = run_eval(task, approach)
    return {"approach": approach, "score": score, "output": "..."}

for i in range(5):
    result = pipeline.run_iteration(
        task="classify customer sentiment",
        fn=my_agent,
    )
    print(f"Iteration {i+1}: {result['score']:.0%} — {result['approach']}")

pipeline.finish()

Each iteration stores its outcome. The next iteration recalls what scored highest. The system compounds in intelligence across runs — zero extra tokens.


LangChain drop-in

from langchain.chains import ConversationChain
from langchain_openai import ChatOpenAI
from becomer_agents import BecomerMemory

chain = ConversationChain(
    llm=ChatOpenAI(model="gpt-4o"),
    memory=BecomerMemory(
        api_key=os.environ["BECOMER_API_KEY"],
        user_id="alice-123",   # per-user isolation
    ),
)

Memory persists across sessions automatically. One master key covers unlimited users via user_id.


Multi-tenant — one key, many users

from becomer_agents import AgentNamespace

# Alice's agent
alice = AgentNamespace(api_key, task_id="app", role="alice-123")
alice.store("Alice prefers TypeScript and dark mode")

# Bob's agent — completely isolated
bob = AgentNamespace(api_key, task_id="app", role="bob-456")
bob.recall("preferences")  # → [] — can't see Alice's memories

Isolation is enforced at the database level by BECOMER, not just application code.


Run the demo

Works with a BECOMER key only — no LLM keys needed:

pip install becomer-agents rich
export BECOMER_API_KEY=bcm_your-key-here
python examples/demo.py

Get a free key at becomer.net/signup.html (1,000 calls/month free).


Installation

# Core (no LangChain)
pip install becomer-agents

# With LangChain support
pip install "becomer-agents[langchain]"

Requires Python 3.10+.


Best practices

Following BECOMER's best practices gives the best recall quality:

  1. Store atomic facts — one fact per store() call
  2. Use specific queries — "what is the user's job title?" not "what do they do?"
  3. Anchor entity names — "Alice prefers TypeScript" not "she prefers TypeScript"
  4. Store signal not noise — would this be useful in 3 months?
  5. Call sync() at session end — consolidates working memory
  6. Use consistent user_id — different string = different namespace

Architecture

becomer-agents
├── AgentNamespace        task_id + role → BECOMER user_id
├── PipelineNamespaces    manages all namespaces for a run
├── MultiAgentPipeline    sequential agents with shared memory
├── SelfImprovingPipeline iterates, recalls best past approaches
├── PipelineVisualizer    rich terminal display
├── BecomerMemory         LangChain BaseMemory drop-in
└── BecomerAgentMemory    episodic + semantic memory for agents

Memory layer: BECOMER API — 94.4% LongMemEval, zero tokens per recall.


Links

MIT License

Metadata

Release files for becomer-agents 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for becomer-agents 0.1.0
File Size Uploaded Provenance Actions
becomer_agents-0.1.0.tar.gz 14.1 kB Without provenance Details for becomer_agents-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for becomer-agents 0.1.0
File Interpreter ABI Platform Actions
becomer_agents-0.1.0-py3-none-any.whl Python 3 none any Details for becomer_agents-0.1.0-py3-none-any.whl

Total release size: 27.7 kB

Release files / becomer_agents-0.1.0.tar.gz

Download URL becomer_agents-0.1.0.tar.gz
Size 14.1 kB
Tags Source
SHA-256 checksum
How to use checksums
e7e5d0d3e1b17f6a2386d99df4ea37066b8a361d509437d50bad09089c513cd9
BLAKE2b-256 checksum
How to use checksums
96291698611212252687fe4de25372f08bdef7a57f3e83f55010716c6e352b61
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Release files / becomer_agents-0.1.0-py3-none-any.whl

Download URL becomer_agents-0.1.0-py3-none-any.whl
Size 13.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4dc73ab88fba57cfe7c8acd2d48aea866a92650828928ec67d746d945bc02bb4
BLAKE2b-256 checksum
How to use checksums
49a58955bdeb577ce689a9c960b71779ffcd63bb44e355f21033241ac126cb8f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Security for becomer-agents 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page