Skip to content

usemoss/moss-samples

Repository files navigation

Moss logo Moss Samples

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, and Pipecat voice agents are all covered.

Questions? Join our Discord.


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 python/requirements.txt, then run any script with python path/to/sample.py.

Moss Python walkthrough

TypeScript

Install deps: npm install inside javascript/, then run with npm run start -- path/to/sample.ts.

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 next-js && npm install && npm run dev

Open http://localhost:3000. See the 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.


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