{"id":48632634,"url":"https://github.com/usemoss/moss","last_synced_at":"2026-04-09T06:01:07.338Z","repository":{"id":318084952,"uuid":"1069927724","full_name":"usemoss/moss","owner":"usemoss","description":"Official Repo of Moss","archived":false,"fork":false,"pushed_at":"2026-04-02T09:00:07.000Z","size":96554,"stargazers_count":265,"open_issues_count":21,"forks_count":10,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-02T11:29:45.816Z","etag":null,"topics":["ai-agents","ai-infra","hybrid-search","rag","real-time","retrieval","semantic-search","voice-ai"],"latest_commit_sha":null,"homepage":"https://moss.dev","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/usemoss.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-04T22:36:49.000Z","updated_at":"2026-04-02T00:34:48.000Z","dependencies_parsed_at":"2026-02-19T00:03:33.258Z","dependency_job_id":null,"html_url":"https://github.com/usemoss/moss","commit_stats":null,"previous_names":["inferedge-inc/moss-python-sample","usemoss/moss-python-sample","usemoss/moss-samples","usemoss/moss"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/usemoss/moss","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usemoss%2Fmoss","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usemoss%2Fmoss/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usemoss%2Fmoss/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usemoss%2Fmoss/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/usemoss","download_url":"https://codeload.github.com/usemoss/moss/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usemoss%2Fmoss/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31449836,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T15:22:31.103Z","status":"ssl_error","status_checked_at":"2026-04-05T15:22:00.205Z","response_time":75,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-agents","ai-infra","hybrid-search","rag","real-time","retrieval","semantic-search","voice-ai"],"created_at":"2026-04-09T06:00:32.644Z","updated_at":"2026-04-09T06:01:07.270Z","avatar_url":"https://github.com/usemoss.png","language":"Python","funding_links":[],"categories":["Awesome Vector Search Engine"],"sub_categories":["Library"],"readme":"\u003c!-- markdownlint-disable MD033 MD041 --\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n\u003cimg src=\"assets/moss-logo.png\" alt=\"Moss\" width=\"80\" /\u003e\n\n# Moss\n\n### Real-time semantic search for AI agents. Sub-10 ms.\n\n[![License](https://img.shields.io/badge/License-BSD_2--Clause-orange.svg)](https://opensource.org/licenses/BSD-2-Clause)\n[![PyPI](https://img.shields.io/pypi/v/moss?color=deepgreen)](https://pypi.org/project/moss/)\n[![PyPI downloads](https://static.pepy.tech/personalized-badge/inferedge-moss-core?period=total\u0026units=international_system\u0026left_color=grey\u0026right_color=blue\u0026left_text=pypi+downloads)](https://pepy.tech/project/inferedge-moss-core)\n[![npm](https://img.shields.io/npm/v/@moss-dev/moss?color=deepgreen)](https://www.npmjs.com/package/@moss-dev/moss)\n[![npm downloads](https://img.shields.io/npm/dt/@inferedge/moss?label=npm+downloads\u0026color=blue)](https://www.npmjs.com/package/@inferedge/moss)\n[![Discord](https://img.shields.io/discord/1433962929526542346?logo=discord\u0026logoColor=white\u0026label=Discord\u0026color=7B2FBE)](https://moss.link/discord)\n\n[Website](https://moss.dev) · [Docs](https://docs.moss.dev) · [Discord](https://moss.link/discord) · [Blog](https://moss.dev/blog)\n\n\u003c/div\u003e\n\n---\n\nMoss is the search runtime that lives inside your Conversational AI agent.\n\nIndex documents, query them semantically, and get results back **in under 10 ms** - fast enough for real-time conversation.\n\n![Moss Python walkthrough](https://github.com/user-attachments/assets/d826023d-92d6-49ac-8e5e-81cf04d409c5)\n\n## Quickstart\n\n### Python\n\n```bash\npip install moss\n```\n\n```python\nfrom moss import MossClient, QueryOptions\n\nclient = MossClient(\"your_project_id\", \"your_project_key\")\n\n# Create an index and add documents\nawait client.create_index(\"support-docs\", [\n    {\"id\": \"1\", \"text\": \"Refunds are processed within 3-5 business days.\"},\n    {\"id\": \"2\", \"text\": \"You can track your order on the dashboard.\"},\n    {\"id\": \"3\", \"text\": \"We offer 24/7 live chat support.\"},\n])\n\n# Load and query — results in \u003c10 ms\nawait client.load_index(\"support-docs\")\nresults = await client.query(\"support-docs\", \"how long do refunds take?\", QueryOptions(top_k=3))\n\nfor doc in results.docs:\n    print(f\"[{doc.score:.3f}] {doc.text}\")  # Returned in {results.time_taken_ms}ms\n```\n\n### TypeScript\n\n```bash\nnpm install @moss-dev/moss\n```\n\n```typescript\nimport { MossClient } from \"@moss-dev/moss\";\n\nconst client = new MossClient(\"your_project_id\", \"your_project_key\");\n\n// Create an index and add documents\nawait client.createIndex(\"support-docs\", [\n  { id: \"1\", text: \"Refunds are processed within 3-5 business days.\" },\n  { id: \"2\", text: \"You can track your order on the dashboard.\" },\n  { id: \"3\", text: \"We offer 24/7 live chat support.\" },\n]);\n\n// Load and query — results in \u003c10 ms\nawait client.loadIndex(\"support-docs\");\nconst results = await client.query(\"support-docs\", \"how long do refunds take?\", { topK: 3 });\n\nresults.docs.forEach((doc) =\u003e {\n  console.log(`[${doc.score.toFixed(3)}] ${doc.text}`); // Returned in ${results.timeTakenInMs}ms\n});\n```\n\n\u003e Get your project credentials at [moss.dev](https://moss.dev) - free tier available.\n\n## Why Moss?\n\n**Vector databases were built for batch analytics. Moss was built for real-time agents.**\n\nIf you're building a voice bot, a copilot, or any AI system that talks to humans, you need retrieval that keeps up with conversation. A 200-500 ms round trip to a vector database kills the experience. Moss delivers results in single-digit milliseconds - fast enough that retrieval disappears from the latency budget.\n\n### Benchmarks\n\nEnd-to-end query latency (embedding + search) on 100,000 documents, 750 measured queries, top_k=5. Tested with Macbook pro (M4 Pro, 24GB).\n\n| System | P50 | P95 | P99 | Mean |\n|--------|-----|-----|-----|------|\n| **Moss** | **3.1 ms** | **4.3 ms** | **5.4 ms** | **3.3 ms** |\n| Pinecone | 432.6 ms | 732.1 ms | 934.2 ms | 485.8 ms |\n| Qdrant | 597.6 ms | 682.0 ms | 771.4 ms | 596.5 ms |\n| ChromaDB | 351.8 ms | 423.5 ms | 538.5 ms | 358.0 ms |\n\nMoss includes embedding in the measurement — competitors use an external embedding service ([modal](https://modal.com/docs/examples/text_embeddings_inference)). Pinecone and Qdrant use cloud search.\n\n\u003e [Reproduce these benchmarks →](./benchmarks/)\n\nMoss isn't a database! It's a **search runtime**. You don't manage clusters, tune HNSW parameters, or worry about sharding. You index documents, load them into the runtime, and query. That's it.\n\n## Features\n\n- **Sub-10 ms semantic search** - p99 of 8 ms\n- **Built-in embedding models** - no OpenAI key required (or bring your own)\n- **Metadata filtering** - filter by `$eq`, `$and`, `$in`, `$near` operators\n- **Document management** - add, upsert, retrieve, and delete documents\n- **Python + TypeScript SDKs** - async-first, type-safe\n- **Framework integrations** - LangChain, DSPy, Pipecat, LiveKit, LlamaIndex\n\n## Examples\n\nThis repo contains working examples you can copy straight into your project:\n\n```text\nexamples/\n├── python/                  # Python SDK samples\n│   ├── load_and_query_sample.py\n│   ├── comprehensive_sample.py\n│   ├── custom_embedding_sample.py\n│   └── metadata_filtering.py\n├── javascript/              # TypeScript SDK samples\n│   ├── load_and_query_sample.ts\n│   ├── comprehensive_sample.ts\n│   └── custom_embedding_sample.ts\n└── cookbook/                # Framework integrations\n    ├── langchain/           # LangChain retriever\n    └── dspy/                # DSPy module\n\napps/\n├── next-js/                 # Next.js semantic search UI\n├── pipecat-moss/            # Pipecat voice agent with Moss retrieval\n├── livekit-moss-vercel/     # LiveKit voice agent on Vercel\n└── docker/                  # Dockerized examples (ECS/K8s pattern)\n```\n\n### Run the Python examples\n\n```bash\ncd examples/python\npip install -r requirements.txt\ncp ../../.env.example .env   # Add your credentials\npython load_and_query_sample.py\n```\n\n### Run the TypeScript examples\n\n```bash\ncd examples/javascript\nnpm install\ncp ../../.env.example .env   # Add your credentials\nnpx tsx load_and_query_sample.ts\n```\n\n### Run the Next.js app\n\n```bash\ncd apps/next-js\nnpm install\ncp ../../.env.example .env   # Add your credentials\nnpm run dev                  # Open http://localhost:3000\n```\n\n### Run the Pipecat voice agent\n\nSub-10 ms retrieval plugged into [Pipecat's](https://github.com/pipecat-ai/pipecat) real-time voice pipeline — a customer support agent that actually keeps up with conversation.\n\n```bash\ncd apps/pipecat-moss/pipecat-quickstart\n# See README for setup and Pipecat Cloud deployment\n```\n\n## SDK Reference\n\n### Python (`moss`)\n\n```python\nfrom moss import MossClient, DocumentInfo, QueryOptions, MutationOptions, GetDocumentsOptions\n\nclient = MossClient(project_id, project_key)\n\n# Index management\nawait client.create_index(name, documents, model_id=\"moss-minilm\")\nawait client.get_index(name)\nawait client.list_indexes()\nawait client.delete_index(name)\n\n# Document operations\nawait client.add_docs(name, documents, MutationOptions(upsert=True))\nawait client.get_docs(name)\nawait client.get_docs(name, GetDocumentsOptions(doc_ids=[\"id1\", \"id2\"]))\nawait client.delete_docs(name, [\"id1\", \"id2\"])\n\n# Search\nawait client.load_index(name)\nresults = await client.query(name, \"your query\", QueryOptions(top_k=5))\n# results.docs[0].id, .text, .score, .metadata\n# results.time_taken_ms\n```\n\n### TypeScript (`@moss-dev/moss`)\n\n```typescript\nimport { MossClient, DocumentInfo } from \"@moss-dev/moss\";\n\nconst client = new MossClient(projectId, projectKey);\n\n// Index management\nawait client.createIndex(name, documents, { modelId: \"moss-minilm\" });\nawait client.getIndex(name);\nawait client.listIndexes();\nawait client.deleteIndex(name);\n\n// Document operations\nawait client.addDocs(name, documents, { upsert: true });\nawait client.getDocs(name);\nawait client.getDocs(name, { docIds: [\"id1\", \"id2\"] });\nawait client.deleteDocs(name, [\"id1\", \"id2\"]);\n\n// Search\nawait client.loadIndex(name);\nconst results = await client.query(name, \"your query\", { topK: 5 });\n// results.docs[0].id, .text, .score, .metadata\n// results.timeTakenInMs\n```\n\n## Integrations\n\n| Framework | Status | Example |\n|-----------|--------|---------|\n| [LangChain](https://github.com/langchain-ai/langchain) | Available | [`examples/cookbook/langchain/`](examples/cookbook/langchain/) |\n| [DSPy](https://github.com/stanfordnlp/dspy) | Available | [`examples/cookbook/dspy/`](examples/cookbook/dspy/) |\n| [Pipecat](https://github.com/pipecat-ai/pipecat) | Available | [`apps/pipecat-moss/`](apps/pipecat-moss/) |\n| [LiveKit](https://github.com/livekit/livekit) | Available | [`apps/livekit-moss-vercel/`](apps/livekit-moss-vercel/) |\n| [Next.js](https://nextjs.org) | Available | [`apps/next-js/`](apps/next-js/) |\n| [VitePress](https://vitepress.dev) | Available | [`packages/vitepress-plugin-moss/`](packages/vitepress-plugin-moss/) |\n| [Vercel AI SDK](https://sdk.vercel.ai) | Coming soon | — |\n| [CrewAI](https://github.com/crewAIInc/crewAI) | Coming soon | — |\n\n## Architecture\n\n```\n┌─────────────────────────────────────────────────┐\n│                  Your Application               │\n│         (Voice bot, Copilot, Chat agent)        │\n└────────────────────┬────────────────────────────┘\n                     │\n          ┌──────────▼──────────┐\n          │     Moss SDK        │\n          │(Python / TypeScript)│\n          └──────────┬──────────┘\n                     │  HTTPS\n          ┌──────────▼──────────┐\n          │   Moss Runtime      │\n          │  ┌───────────────┐  │\n          │  │  Embedding    │  │\n          │  │  Engine       │  │\n          │  └───────┬───────┘  │\n          │  ┌───────▼───────┐  │\n          │  │  Search       │  │\n          │  │  Runtime      │◄─┼── Sub-10 ms queries\n          │  └───────────────┘  │\n          └─────────────────────┘\n```\n\nThe SDKs in this repo are thin clients that talk to the Moss runtime over HTTPS. The runtime handles embedding, indexing, and search — you don't need to manage any infrastructure.\n\nFull Python SDK source code is available at [`sdks/python/`](sdks/python/).\n\n## Contributing\n\nWe welcome contributions! Here's where the community can have the most impact:\n\n- **New SDK bindings** — Swift, Go, Elixir,...\n- **Framework integrations** — Vercel AI SDK, CrewAI, Haystack, AutoGen\n- **Reranking support** — plug in cross-encoder rerankers\n- **Doc-parsing connectors** — PDF, DOCX, HTML, Markdown ingestion\n- **Examples and tutorials** — if you build something with Moss, we'd love to feature it\n\nSee our [Contributing Guide](CONTRIBUTING.md) for setup instructions and our [Roadmap](ROADMAP.md) for what's planned.\n\nCheck out issues labeled [`good first issue`](https://github.com/usemoss/moss/labels/good%20first%20issue) to get started.\n\n## Contributors\n\n[![Contributors](https://contrib.rocks/image?repo=usemoss/moss)](https://github.com/usemoss/moss/graphs/contributors)\n\n## Community\n\n- [Discord](https://moss.link/discord) — ask questions, share what you're building\n- [GitHub Issues](https://github.com/usemoss/moss/issues) — bug reports and feature requests\n- [Twitter](https://x.com/usemoss) — announcements and updates\n\n## License\n\n[BSD 2-Clause License](LICENSE) — the SDKs, examples, and integrations in this repo are fully open source.\n\n---\n\n\u003cdiv align=\"center\"\u003e\n  \u003csub\u003eBuilt by the team at \u003ca href=\"https://moss.dev\"\u003eMoss\u003c/a\u003e · Backed by \u003ca href=\"https://www.ycombinator.com\"\u003eY Combinator\u003c/a\u003e\u003c/sub\u003e\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fusemoss%2Fmoss","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fusemoss%2Fmoss","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fusemoss%2Fmoss/lists"}