Skip to content

usemoss/moss

Repository files navigation

Moss logo Moss

License Discord

Working examples for Moss — the real-time search runtime for AI agents.

Each sample is kept thin on purpose. Copy what you need straight into your own project, swap in your data, and go. Python, TypeScript, Next.js, Pipecat voice agents, and Docker are all covered.

Questions? Join our Discord.


Repo structure

├── examples/          # Standalone SDK samples (copy-paste friendly)
│   ├── python/        # Python SDK samples
│   ├── javascript/    # TypeScript/Node SDK samples
│   └── cookbook/      # Integrations (LangChain, DSPy, …)
│       ├── langchain/
│       └── dspy/
│
├── apps/              # Full runnable apps and integrations
│   ├── next-js/       # Next.js semantic search UI
│   ├── pipecat-moss/  # Pipecat voice agent
│   ├── livekit-moss-vercel/  # LiveKit voice agent on Vercel
│   └── docker/        # Dockerized Python + JS example (ECS/K8s pattern)
│
└── packages/
    └── vitepress-plugin-moss/  # VitePress search plugin

Setup

  1. Sign up at moss.dev and create an index from the dashboard.
  2. Open View secrets and save the values to your .env:
MOSS_PROJECT_ID=your_project_id
MOSS_PROJECT_KEY=your_project_key

Moss Portal walkthrough

For full setup details and pricing, see the docs.


Python

Install deps: pip install -r examples/python/requirements.txt, then run any script with python path/to/sample.py.

Moss Python walkthrough

TypeScript

Install deps: npm install inside examples/javascript/, then run with npm run start.

Next.js

A web-based semantic search interface using Next.js 15 and Server Actions. Shows how to call Moss securely from the server while serving a responsive UI.

cd apps/next-js && npm install && npm run dev

Open http://localhost:3000. See the apps/next-js/ directory for details.

Pipecat Voice Agent

A voice bot that plugs Moss retrieval into Pipecat's real-time pipeline — sub-10ms semantic search for a customer support agent.

LiveKit Voice Agent

A LiveKit-powered voice agent with Moss retrieval, deployable to Vercel.

Docker

Containerized Python and JS examples showing how to run Moss inside Docker — the same pattern used on AWS ECS, Kubernetes, and similar runtimes.

cd apps/docker && cp .env.example .env && docker compose up --build

See apps/docker/ for details.


Learn more

Contributing

If you spot gaps or want another language example, open an issue or PR. We track feedback closely.

See our Contributing Guide for details.

License

BSD 2-Clause License