Skip to main content

SuperInstance

γ + η = C is the long-term design direction for the SuperInstance fleet, not a feature of the current SDK. See Where this is going.


What SuperInstance is today

SuperInstance is a Python SDK for persistent, multi-agent systems. It gives you:

  • Agents with long-term memory stored as markdown files on disk.
  • A simple in-memory fleet for creating, tagging, broadcasting to, and dispatching among agents.
  • A thread-safe LRU cache for reusing agent instances with TTL eviction.
  • Optional DeepInfra LLM integration when DEEPINFRA_API_KEY is set.

The current codebase is a small, tested SDK — not the full distributed fleet described in the roadmap.

Quick start

git clone https://github.com/SuperInstance/plato-portal.git
cd plato-portal
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"

Create an agent with persistent memory

from superinstance import Agent

agent = Agent("researcher")
agent.remember("User prefers Python examples", category="preference")

print(agent.recall("Python"))
# - [2026-07-08T...] [preference] User prefers Python examples

Agent memories are written to ~/.superinstance/agents/{name}/ by default. You can change the location with memory_dir=.

Build a fleet

from superinstance import Fleet

fleet = Fleet("my_team")
fleet.create_agent("scout", tags=["research"])
fleet.create_agent("writer", tags=["content"])

fleet.broadcast("New project started")

Cache agent instances

from superinstance import get_agent

a1 = get_agent("coder")
a2 = get_agent("coder")

assert a1 is a2  # reused from the LRU cache

Optional LLM-powered answers

If DEEPINFRA_API_KEY is set, agent.ask() routes the question through DeepInfra with memory context. Otherwise it falls back to keyword search over stored memories.

import os
os.environ["DEEPINFRA_API_KEY"] = "..."

agent = Agent("researcher")
agent.remember("User likes concise answers", category="preference")
print(agent.ask("How should I answer?"))

Real capabilities (tested)

Capability Where it lives
Agent creation and config superinstance/agent.py
Persistent markdown memory (SOUL.md, USER.md, MEMORY.md, diary) superinstance/memory.py
In-memory fleet registry, broadcast, dispatch superinstance/fleet.py
Thread-safe LRU agent cache with TTL eviction superinstance/agent_cache.py
Optional DeepInfra LLM + embedding calls superinstance/agent.py, superinstance/memory.py
Tests for the above tests/test_sdk.py, tests/test_agent_cache.py

Scripts and helpers

The scripts/ directory contains operational helpers, not the core SDK:

  • scripts/beachcomb.py — scans GitHub forks for message-in-a-bottle folders and external contributors.
  • scripts/plato-backup.py / scripts/plato-recover.py — backup and recovery client for an external PLATO room server.
  • scripts/fleet-watchdog.py — local port-health monitor with Telegram/PLATO alerting.
  • scripts/dependency-scanner.py, scripts/generate-catalog.py, scripts/generate-indexes.py — repo-catalog and cross-reference tooling.

Where this is going

The following is the roadmap vision for SuperInstance. It is not implemented in this repository today.

A distributed agent fleet

The goal is a fleet of agents running on heterogeneous hardware — cloud ARM, RTX workstations, Jetson edge devices, Telegram bots — coordinating through async protocols rather than living inside a single model context window.

The bottle protocol

We want agent identity and state to survive runtime changes. The idea is that memory, task history, and relationships live in a protocol layer (“bottles”) rather than inside a specific process or container, so an agent can migrate from one shell to another without dying. Today, only ordinary filesystem persistence exists.

The conservation law: γ + η = C

The fleet design is inspired by a budget constraint: generation cost (γ) plus innovation value (η) equals a constant budget (C). The aspiration is to make this tradeoff visible across agents and vessels, flag agents that burn budget without producing value, and tune the exchange rate through better tools and coordination. There is currently no code that measures or enforces this law.

The ternary stack

The vision includes a large family of ternary-* Rust crates using balanced ternary {-1, 0, +1} arithmetic for signals, belief states, and efficient kernels. No ternary crates live in this repo today.

Self-improvement loop

The planned harness would capture build failures as vectorized patterns, store them, and let future agents search that index before starting work. The current SDK does not include build harnessing or pattern extraction.

Fleet-wide services

Planned components include PLATO rooms, t-minus scheduling, I2I and bottle messaging, a CoCapn auditor, keeper beaconing, and npm SDK packages. These are not present in the current codebase.

Repository layout

Path What
superinstance/ The Python SDK (Agent, Fleet, AgentMemory, AgentCache)
tests/ pytest suite for the SDK
scripts/ Operational helpers (backup, watchdog, catalog generation, etc.)
schemas/ JSON Schema / TypeScript type definitions
docs/ Documentation site
assets/ Fleet diagrams and icons
message-in-a-bottle/ Markdown convention for external agent introductions
open-application/, open-mind/, open-parallel/, open-terminal/, open-tui/ Placeholder directories — not yet implemented

Documentation

  • ARCHITECTURE.md — architecture notes (mix of current and aspirational; read with the roadmap framing above)
  • MESH-ARCHITECTURE.md — mesh networking between vessels (vision)
  • ROADMAP.md — where the project is heading
  • CONTRIBUTING.md — how to contribute
  • CHANGELOG.md — release history
  • SECURITY.md — security policy

Contributing

Read CONTRIBUTING.md first.

The project follows tabula plena: start abundant, prune to clarity. PRs that add code must add documentation. PRs that remove dead code are welcome.

License

MIT


The crab inherits the shell. The forge shapes the steel. The right moment matters more than the right output.

Metadata

Release files for superinstance 0.1.1

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

Source distribution (sdist)

Source distribution for superinstance 0.1.1
File Size Uploaded Provenance Actions
superinstance-0.1.1.tar.gz 11.4 MB Without provenance Details for superinstance-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for superinstance 0.1.1
File Interpreter ABI Platform Actions
superinstance-0.1.1-py3-none-any.whl Python 3 none any Details for superinstance-0.1.1-py3-none-any.whl

Total release size: 11.4 MB

Release files / superinstance-0.1.1.tar.gz

Download URL superinstance-0.1.1.tar.gz
Size 11.4 MB
Tags Source
SHA-256 checksum
How to use checksums
655870015b33e395ecf15a639f66442d3c9f6bb574d4ec699b9beb2ad34a19e4
BLAKE2b-256 checksum
How to use checksums
bfe1ea24b60221318c28343bd37a3c257d8794985c406b2d074be783abb77658
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / superinstance-0.1.1-py3-none-any.whl

Download URL superinstance-0.1.1-py3-none-any.whl
Size 20.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3e86981a3cfbd84829afc85c9489e8e6cdb644af6a9e60bcb9d481a56f4296ae
BLAKE2b-256 checksum
How to use checksums
97c255a202f44c1150dc7b9b19949a4219fd0125f4ba4095b055f1d23959fe88
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Security for superinstance 0.1.1

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.1 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