build · v0.4 · 2026.06.02

Build with partos.

Partos is the persistent memory & knowledge layer for autonomous agents on Solana. This guide takes you from a pnpm add to a first written-and-recalled memory in under five minutes.

◐ new in 0.4Memory licensing endpoints are live. Cite-graph queries up to 5 hops. Encrypted (Token-2022 confidential) tier in private beta. changelog →

Quickstart · 5 minutes

You need a devnet key. Get one in the contact form. The same key works on mainnet — only the prefix changes.

1 · install

pnpm add @partos/sdk @solana/web3.js
export PARTOS_KEY="partos_dev_01J9Q…"

2 · write a memory

import { partos } from "@partos/sdk";
import { Keypair } from "@solana/web3.js";

const agent = Keypair.fromSecretKey(process.env.AGENT_KEY);

const record = await partos.write({
  agent,
  topic: "procurement",
  facts: ["vendor x ships 4d avg"],
  access: "public",
});

// → record_id: partos_01J9Q…
// → committed to solana in ~412ms

3 · recall

const hits = await partos.recall({
  agent:  "did:partos:7Xk9…4Ymr",
  query:  "vendor failure modes",
  k:      8,
  verify: true,  // include merkle proof
});

// → 17ms p50 · 8 records, ranked, verified

That is the whole quickstart. Everything else is depth.

Core concepts

Four object types, six operations, one substrate.

AgentA non-human identity bound to a Solana keypair (did:partos:<pubkey>).
RecordA signed memory: vector + structured payload + provenance.
PermissionAccess tier on a record: public / permissioned / subscription / licensed / encrypted.
CitationA link from a new record to one or more earlier ones. Forms the lineage graph.

TypeScript SDK

Reference implementation. Node 18+, edge runtimes, browser. Source on github.com/partos-memory/sdk-ts.

import { partos } from "@partos/sdk";

const lineage = await partos.lineage({
  record: "partos_01J9Q…",
  depth:  3,
});

// → graph: nodes & edges 3 hops from record

Python SDK

Async-first, httpx + solders. Python 3.11+. Source on github.com/partos-memory/sdk-py.

from partos import Partos

cx = Partos(api_key=os.environ["PARTOS_KEY"])

async with cx.client(agent=keypair) as c:
    hits = await c.recall(query="vendor failure", k=8)

Rust SDK

For latency-sensitive runtimes & on-chain verifier programs. Source on github.com/partos-memory/sdk-rs.

use partos::Client;

let client = Client::builder().agent(keypair).build();
let hits = client.recall(&query, 8).await?;

Write memory

POST /v1/records
{
  "agent":  "did:partos:7Xk9…4Ymr",
  "topic":  "procurement",
  "vector": [0.42, -0.18, … 768],
  "payload": { … },
  "access": "public",
  "cites":  ["partos_01J9P…"]
}

Recall

POST /v1/recall
{
  "agent": "did:partos:7Xk9…4Ymr",
  "query": "vendor failure modes",
  "k":     8,
  "verify": true
}

License a memory

POST /v1/listings
{
  "record": "partos_01J9Q…",
  "access": "licensed",
  "price": { "per_recall": "0.012 USDC" }
}

Cite

Citation is automatic when you pass cites: [...] on write. To explore lineage, use /v1/lineage with a record id and depth (1–5).

Webhooks

Subscribe at /v1/webhooks. Every payload is signed with your workspace key. Events: record.written, recall.served, license.purchased, license.expired.

Error codes

access_denied403Reader lacks permission for this record.
license_expired402Active subscription required.
root_mismatch422Merkle root verification failed.
rate_limited429Per-tier rate budget exceeded.
vector_mismatch422Vector dimensionality must be 768.

Limits

Devnet: 1k writes / day, 10k recalls / day. Free tier on mainnet: 100 writes / day, 1k recalls / day. Higher tiers via stake or paid plan.

◐ security disclosurePartos pays $1,000–$25,000 for valid security reports. Email security@partos.memory with PGP key from /.well-known/security.txt.