agentleFS
unison-labs-aiunison-labs-ai/pipecat-unison/AGENTS.md

pipecat-unison

AGENTS.md0 starsChanged 5 months agoMITView on GitHub

Guidance for AI agents. Two jobs — jump to yours: - Use this integration — you're an agent setting up Pipecat + Unison memory → Use pipecat-unison - Contribute to this repo — you're changing the code → Working in this repo Follows the AGENTS.md convention. Human contributors: see CONTRIBUTING.md. pipecat-unison gives a Pipecat voice agent long-term memory via the Unison brain. On every user turn the processor retrieves relevant memories, injects them into the system prompt, then saves a…

  • Reads credentials
  • Installs packages
  • Sends data out

We split this AGENTS.md into the rules it gives an agent

2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Very specific:

    Never rename them without updating .env.example and README.

    line 158
  2. Very specific:

    Never push directly to main — open a PR.

    line 164

≈ “Common” is an estimate: at least 1 in 5 of the 36,368 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

AGENTS.md

Guidance for AI agents. Two jobs — jump to yours:

  • Use this integration — you're an agent setting up Pipecat + Unison memory → Use pipecat-unison
  • Contribute to this repo — you're changing the code → Working in this repo

Follows the AGENTS.md convention. Human contributors: see CONTRIBUTING.md.


Use pipecat-unison

pipecat-unison gives a Pipecat voice agent long-term memory via the Unison brain. On every user turn the processor retrieves relevant memories, injects them into the system prompt, then saves a session note so knowledge compounds across conversations.

1. Get a Unison token

Provision a machine key (the human must do this — the key is tied to their account):

curl -X POST https://brain.unisonlabs.ai/v1/auth/provision \
  -H "Content-Type: application/json" \
  -d '{"email": "agent@example.com"}'
# returns: {"apiKey":"usk_live_..."}

Export it:

export UNISON_TOKEN=usk_live_...

To override the API host (e.g. a self-hosted brain):

export UNISON_API_URL=http://localhost:4001

2. Install

# Frontend (Bun)
bun install

# Backend (Python ≥ 3.10)
cd backend && python -m venv venv && source venv/bin/activate
pip install -r requirements.txt

3. Configure

Copy the env templates and fill in real values:

cp .env.example .env                  # frontend: VITE_UNISON_TOKEN
cp backend/.env.example backend/.env  # backend: UNISON_TOKEN + OPENAI_API_KEY

4. Use the processor in your pipeline

from unison_pipecat import UnisonPipecatService

memory = UnisonPipecatService(
    token=os.getenv("UNISON_TOKEN"),       # or omit — reads UNISON_TOKEN from env
    base_url=os.getenv("UNISON_API_URL"),  # optional; defaults to https://brain.unisonlabs.ai
    user_id="user_123",
    session_id="session_abc",
    params=UnisonPipecatService.InputParams(
        mode="full",        # profile | query | full
        search_limit=10,
    ),
)

pipeline = Pipeline([
    transport.input(),
    stt,
    user_aggregator,
    memory,   # between user aggregator and LLM
    llm,
    tts,
    transport.output(),
    assistant_aggregator,
])

5. Verify the brain connection

curl -s http://localhost:4001/v1/auth/whoami \
  -H "Authorization: Bearer $UNISON_TOKEN"

Or from Python:

from unison_pipecat import UnisonClient
import os

client = UnisonClient(token=os.environ["UNISON_TOKEN"])
print(client.whoami())   # {"user": {...}, "workspace": {...}, "scopes": [...]}
print(client.status())   # {"docCount": N, ...}

Environment variables

VariableRequiredDescription
UNISON_TOKENYesMachine key (usk_live_...)
UNISON_API_URLNoOverride API host (default: https://brain.unisonlabs.ai)
OPENAI_API_KEYYes (backend)OpenAI key for STT / LLM / TTS
VITE_UNISON_TOKENNoFrontend token for the in-browser memory panel
VITE_BACKEND_URLNoOverride backend URL (default: http://localhost:8001)

Working in this repo

Repo layout

backend/
  unison_pipecat.py   — UnisonPipecatService + UnisonClient (Python)
  server.py           — FastAPI + Pipecat voice server
  requirements.txt
src/
  app.tsx             — React voice UI + Unison memory panel
  client.tsx          — app entry point
package.json          — frontend deps (Bun)
biome.json            — lint/format config
tsconfig.json
vite.config.ts

Build, lint, test

bun install
bun run build    # tsc --noEmit + vite build
bun run lint     # Biome (lint + format check)

CI runs bun install && bun run build. All must pass before pushing.

Conventions

  • TypeScript + React 19 + Vite on the frontend. Biome formatting.
  • Python 3.10+ on the backend. No extra HTTP client beyond requests.
  • UnisonClient (Python) and the frontend checkWhoami call both use Authorization: Bearer <usk_...>. Never hard-code a token.
  • UNISON_TOKEN / VITE_UNISON_TOKEN are the canonical env var names. Never rename them without updating .env.example and README.
  • The .env file is git-ignored; .env.example contains only placeholder values.

PRs

One logical change per PR. Run bun run build and bun run lint before pushing. Never push directly to main — open a PR. Security issues: see SECURITY.md.

Download now (ZIP)

  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.

    Of the AGENTS.md files we read, the 28,693 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repositoryOne other file it gives its agents.

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.