### Setup commands for agent-handoff example
Source: https://github.com/vortx-ai/emem/blob/main/examples/agent-handoff/README.md
Install the emem Python SDK with signing support, build the emem server binary, and run the example script. The script boots a throwaway responder with its own temp data dir and key, and deletes everything on exit.
```bash
pip install -e "sdks/emem-py[signing]" # the ememdev CLI
cargo build --release --bin emem-server # once
./examples/agent-handoff/run.sh
```
--------------------------------
### Install and run fleet_memory.py
Source: https://github.com/vortx-ai/emem/blob/main/examples/fleet-memory/README.md
Install dependencies and run the example. Optional packages enable full offline verification.
```bash
pip install requests
python3 fleet_memory.py
# optional, for full offline verification:
pip install blake3 cbor2 cryptography
```
--------------------------------
### Bring up GPU sidecar manually
Source: https://github.com/vortx-ai/emem/blob/main/docs/developers/developing.md
Sets up a Python virtual environment, installs dependencies, and starts the FastAPI sidecar over a Unix Domain Socket. Cold start occurs on first /predict call.
```bash
cd python/jepa_v2_sidecar
uv venv
uv pip install -r requirements.txt
EMEM_SIDECAR_SOCK=/tmp/emem-sidecar.sock \
python -m uvicorn server:app --uds /tmp/emem-sidecar.sock
```
--------------------------------
### Run the 3D worlds example with a local HTTP server
Source: https://github.com/vortx-ai/emem/blob/main/examples/3d-worlds/README.md
Starts a simple HTTP server on port 8080 serving the examples/3d-worlds directory. Then open http://localhost:8080/carbon-world.html in a browser. The first run over a cold area can take a few minutes because it materializes and signs every sampled cell; repeats are warm.
```bash
python3 -m http.server -d examples/3d-worlds 8080
# then open http://localhost:8080/carbon-world.html
```
--------------------------------
### Install dependencies
Source: https://github.com/vortx-ai/emem/blob/main/examples/mastra/README.md
Install the required Mastra, MCP, and AI SDK packages.
```bash
npm install @mastra/core @mastra/mcp @ai-sdk/openai
```
--------------------------------
### Install Agno and OpenAI
Source: https://github.com/vortx-ai/emem/blob/main/examples/agno/README.md
Installs the Agno framework and OpenAI SDK required to run the agent.
```bash
pip install agno openai
```
--------------------------------
### Run satellite_downlink example
Source: https://github.com/vortx-ai/emem/blob/main/examples/satellite-downlink/README.md
Runs the satellite-downlink example, which walks the operator loop in five acts, including refusals. The example is Rust, offline, and deterministic, serving as living conformance documentation.
```bash
cargo run -p emem-primitives --example satellite_downlink
```
--------------------------------
### Start GPU sidecar via systemd
Source: https://github.com/vortx-ai/emem/blob/main/docs/developers/developing.md
Starts the GPU sidecar as a user systemd service using the shipped unit file.
```bash
systemctl --user start emem-jepa-sidecar.service
```
--------------------------------
### Install dependencies and run the stabilisation demo
Source: https://github.com/vortx-ai/emem/blob/main/demos/stabilisation/README.md
Install the required Python packages and run the demo. The demo is read-only and checks the recorded claims against the live responder, then runs the same check three more times against edited copies to show a pass and three failures.
```bash
pip install blake3 pynacl
python3 demos/stabilisation/stabilise.py demo
```
--------------------------------
### GET /log/entry/leaf_0 — your own nodejson
Source: https://github.com/vortx-ai/emem/blob/main/web/guard.html
Example log entry returned by GET /log/entry/leaf_0. Contains the record, signature, signer, and chain link. The record includes outcome and evaluated fields that are part of the preimage, making the entry verifiable without the serving node.
```json
{
"seq": 0,
"record": {
"checkpoint": "emem.native.v1",
"request_id": "01KZAWCH25KXHYHAJHWK03151D",
"outcome": "allow",
"evaluated": "allow",
"mode": "enforce",
"checked": 1,
"decided_at_unix_s": 1785997968
},
"signature_b32": "p4cfqpvlyymax6wg5lrshfn2t7tt6stw73saprg3oi57pvdbl7gri...",
"signer_b32": "zwkuk6ahc6qseltbq7expaz2omd2vjkqjhv5criovu53sqy7qmwa",
"chain": "7a99eac5a05dac1a8b0e16ee9867d1daa03ac3aa55ff72ab77d10086abfd816f"
}
```
--------------------------------
### curl example for emem endpoints
Source: https://github.com/vortx-ai/emem/blob/main/huggingface-space/README.md
Shows how to check the health, get the agent card, and locate 'Mt Fuji' using curl against the emem Space endpoints. Replace `YOUR-SPACE` with the real hostname.
```bash
curl -s https://YOUR-SPACE.hf.space/health
curl -s https://YOUR-SPACE.hf.space/v1/agent_card
curl -s https://YOUR-SPACE.hf.space/v1/locate \
-H 'content-type: application/json' \
-d '{"q":"Mt Fuji"}'
```
--------------------------------
### Worked example: locate, recall, find_similar, and CLAUDE response
Source: https://github.com/vortx-ai/emem/blob/main/plugins/emem/skills/emem-find-similar/SKILL.md
This example shows the full sequence of API calls and the CLAUDE response for finding cities similar to Bangalore. It starts with locating the seed cell, checks the embedding exists, then retrieves neighbors with scores and names. The response explains that similarity reflects physical archetype, not socioeconomic features, and notes results are content-addressed.
```text
USER: Find cities globally that look most like Bangalore.
CLAUDE invokes this skill:
POST /v1/locate {"q":"Bangalore"} → defi.zb493.xoso.zcb6a
POST /v1/recall {"cell":..., "bands":["geotessera"]} → has_vector: true
POST /v1/find_similar {"key":"defi.zb493.xoso.zcb6a","k":8}
→ neighbors:
defi.zb5cf.nura.zd83c 0.91 New York City, USA
defi.zb563.noxo.xAvu 0.89 Shanghai, China
defi.zb541.… 0.87 Lagos, Nigeria
…
CLAUDE replies: "By cosine over the stored 2024 embedding,
Bangalore's nearest neighbours globally are New York (0.91),
Shanghai (0.89), Lagos (0.87), and …. The similarity captures
shared physical archetype — dense urban core with patches of
green and surrounding peri-urban — not social or economic
features. Each result is content-addressed; click 'recall' on
any to fetch the underlying vector and verify it offline."
```
--------------------------------
### Run the full walkthrough and probe
Source: https://github.com/vortx-ai/emem/blob/main/examples/verifiable-lending/README.md
Run the example script with different options: the full walkthrough, four checks on the guard's behavior, or with a specific coordinate. Requires Python 3 standard library only, no external dependencies.
```sh
python3 run.py # the full walkthrough
python3 run.py --probe # four checks on what the guard does and does not catch
python3 run.py --lat 19.0760 --lng 72.8777 # any coordinate you like
```
--------------------------------
### Corpus state stats example
Source: https://github.com/vortx-ai/emem/blob/main/web/demos-ask-the-earth.html
Defines an API call to get statistics about the corpus (e.g., facts scanned, distinct cells, bands). The render function displays these statistics and includes citations for the responder and a signed snapshot tick.
```javascript
const top=(d.by_band||[]).slice(0,3); return { answer:`${(d.facts_scanned||0).toLocaleString()} facts scanned · ${(d.distinct_cells||0).toLocaleString()} distinct cells · ${d.distinct_bands||0} bands. Top: ${top.map(b=>`${b.band} (${b.fact_count})`).join(' · ')}`, citations:[ {kind:'src',text:'responder '+(d.responder_pubkey_b32||'').slice(0,12)+'…'}, {kind:'cid',text:'signed snapshot tick'} ] }; }
```
--------------------------------
### Run the full walkthrough demo
Source: https://github.com/vortx-ai/emem/blob/main/examples/connect-and-evolve.md
Runs the bundled emem-connect-demo binary against a running responder. It executes the entire connectivity loop (steps 1-7) and exits non-zero on any HTTP error, doubling as a smoke test.
```APIDOC
## Run Walkthrough Demo
### Description
Runs the emem-connect-demo binary to execute the full connectivity loop end-to-end. It prints each step with signed CIDs and receipts, and exits non-zero on any HTTP error.
### Command
```bash
EMEM_BASE_URL=$EMEM cargo run -p emem-cli --bin emem-connect-demo
```
### Alternative with Base URL Argument
```bash
cargo run -p emem-cli --bin emem-connect-demo http://127.0.0.1:5051
```
### Prerequisites
- A responder must be running with the refinement loop enabled (see 'Start responder with refinement enabled').
- The EMEM_BASE_URL environment variable or the first positional argument must point to the responder base URL.
### Behavior
- Executes steps 1-7 of the connectivity loop.
- Prints signed CIDs and receipts for each step.
- Exits non-zero on any HTTP error.
- Step 5 (auto disagrees_with edge) only fires if the responder was started with EMEM_REFINEMENT_* flags; otherwise prints a note and continues.
```
--------------------------------
### Start emem-guard with --data ./var/guard
Source: https://github.com/vortx-ai/emem/blob/main/crates/emem-guard/SKILL.md
Starts emem-guard with a local data directory. On first run it generates a node key at 0600, opens a log, and serves. The startup banner shows 'resolve null' and 'no responder configured: citations are not verified, only logged.' A bare node signs and logs every verdict and verifies no citation because it holds no corpus.
```bash
./target/release/emem-guard --data ./var/guard
```
--------------------------------
### Install semantic-kernel
Source: https://github.com/vortx-ai/emem/blob/main/examples/semantic-kernel/README.md
Installs the Semantic Kernel Python package.
```bash
pip install semantic-kernel
```
--------------------------------
### Run emem-server with TLS via environment variables
Source: https://github.com/vortx-ai/emem/blob/main/docs/self-host.md
Starts emem-server with TLS enabled, binding to port 443 and using the specified domain and contact email. First boot takes 15-30 seconds for ACME validation; subsequent boots are faster due to certificate caching in EMEM_DATA/tls-acme/. Use EMEM_TLS_STAGING=1 for testing to avoid Let's Encrypt rate limits.
```bash
EMEM_BIND=0.0.0.0:5051 \
EMEM_TLS_BIND=0.0.0.0:443 \
EMEM_TLS_DOMAINS=emem.example.com \
EMEM_TLS_CONTACT=mailto:ops@example.com \
./target/release/emem-server
```
--------------------------------
### Start emem-guard with --responder https://emem.dev
Source: https://github.com/vortx-ai/emem/blob/main/crates/emem-guard/SKILL.md
Starts emem-guard pointing at a responder that holds facts. After starting, check with 'curl -s localhost:8080/health | grep verifies_citations' which should say true.
```bash
./target/release/emem-guard --responder https://emem.dev
```
--------------------------------
### Clone, build, and run emem server
Source: https://github.com/vortx-ai/emem/blob/main/docs/developers/developing.md
Commands to clone the repository, build the workspace in release mode, and run the emem-server binary, which binds to 0.0.0.0:5051 by default. The first build takes ~12 minutes on a cold cache and ~90 seconds on a warm cache. Requires glibc 2.38+ and g++ for the ort-sys dependency.
```bash
git clone https://github.com/Vortx-AI/emem
cd emem
cargo build --workspace --release
./target/release/emem-server # binds 0.0.0.0:5051 by default
```
--------------------------------
### Build and run emem-guard server
Source: https://github.com/vortx-ai/emem/blob/main/crates/emem-guard/README.md
Builds the release binary and runs the server, which generates a key, opens a log, and serves. The server is the core of the emem-guard product.
```bash
cargo build --release -p emem-guard
./target/release/emem-guard # generates a key, opens a log, serves
```
--------------------------------
### Build emem from source
Source: https://github.com/vortx-ai/emem/blob/main/docs/self-host.md
Clones the repository, builds the emem-server binary, and runs it. Requires Rust 1.91+ and about 12 GB free disk for target/.
```bash
git clone https://github.com/Vortx-AI/emem.git
cd emem
cargo build --release --bin emem-server
./target/release/emem-server # binds 0.0.0.0:5051
```
--------------------------------
### Gemini Extension Install Command
Source: https://github.com/vortx-ai/emem/blob/main/web/reference.html
Shell command to install the emem extension for Gemini. Run this in the shell.
```shell
$ gemini extensions install \
https://emem.dev/gemini-extension.json
```
--------------------------------
### Worked example of locate and recall
Source: https://github.com/vortx-ai/emem/blob/main/plugins/emem/skills/emem-locate-and-recall/SKILL.md
Shows a complete interaction: a user asks for temperature and NDVI, the skill calls POST /v1/locate and POST /v1/recall, and the assistant replies with the facts and their content-addressed CIDs. Use this as a reference for how to invoke the skills and format the response.
```text
USER: What's the current temperature in Bengaluru, and the NDVI?
CLAUDE invokes this skill:
POST /v1/locate {"q":"Bengaluru, India"}
→ cell64=defi.zb493.xoso.zcb6a
POST /v1/recall {"cell":"defi.zb493.xoso.zcb6a",
"bands":["weather.temperature_2m","indices.ndvi"]}
→ facts:
weather.temperature_2m = 28.4 degC
indices.ndvi = 0.42
→ fact_cids: [qi3jo4..., bn7c4d...]
CLAUDE replies: "Bengaluru is at 28.4 °C right now (signed by
emem.dev at 2026-05-08T13:22Z). The vegetation index there
is 0.42 — middling, consistent with a dry urban core. Both
facts are content-addressed: qi3jo4...l2hgjtwm and
bn7c4d...kkb73a respectively."
```
--------------------------------
### Install AutoGen and MCP extensions
Source: https://github.com/vortx-ai/emem/blob/main/examples/autogen/README.md
Install the required AutoGen packages and MCP extension for OpenAI and MCP support.
```bash
pip install autogen-agentchat autogen-ext[openai,mcp]
```
--------------------------------
### Install emem-langmem with pip
Source: https://github.com/vortx-ai/emem/blob/main/docs/sdks/langmem.md
Install the emem-langmem package using pip. This is the first step to use the store in your LangGraph agent.
```bash
pip install emem-langmem
```