agno-moss
The Moss in-memory semantic search runtime for Agno agents.
Moss manages embeddings internally and serves queries from an in-memory runtime — sub-10ms lookups, no external embedder, no vector database to run. Point Knowledge at MossRuntime and Agno agents get instant RAG with zero infrastructure.
Installation
pip install agno-moss
# or
uv add agno-moss
Prerequisites
- Moss project ID and project key — get them from the Moss Portal
- Python 3.10+
- An Agno-compatible model provider (OpenAI, Anthropic, etc.)
Quickstart
import os
from agno.agent import Agent
from agno.knowledge.knowledge import Knowledge
from agno.models.anthropic import Claude
from agno_moss import MossRuntime
knowledge = Knowledge(
vector_db=MossRuntime(
index_name="my-index",
# Falls back to MOSS_PROJECT_ID / MOSS_PROJECT_KEY env vars
),
)
agent = Agent(
model=Claude(id="claude-sonnet-4-20250514"),
knowledge=knowledge,
search_knowledge=True,
markdown=True,
)
knowledge.load(recreate=False)
agent.print_response("What do you know about our return policy?", stream=True)
Configuration
MossRuntime
| Parameter | Default | Description |
|---|---|---|
index_name |
(required) | Name of the Moss index |
project_id |
MOSS_PROJECT_ID env var |
Moss project ID |
project_key |
MOSS_PROJECT_KEY env var |
Moss project key |
embedding_model |
"moss-minilm" |
"moss-minilm" (fast) or "moss-mediumlm" (higher accuracy) |
alpha |
0.8 |
Hybrid search blend: 1.0 = semantic only, 0.0 = keyword only |
auto_refresh |
False |
Auto-refresh the in-memory index when new docs are added |
polling_interval_in_seconds |
600 |
Refresh interval when auto_refresh=True |
How it works
MossRuntime implements Agno's VectorDb base class:
create()— loads an existing index into Moss's in-memory runtime. Call once at startup for fast first queries.upsert()— creates the index on first call, then adds or updates documents. Loads the index automatically after each batch.search()— hybrid semantic + keyword search via the loaded in-memory runtime. Falls back to the cloud API if the index is not loaded.
Moss filters metadata only when the index is loaded locally. content_hash_exists() returns False when unloaded (safe: forces re-upsert rather than silently skipping).
Choosing a model provider
# OpenAI
from agno.models.openai import OpenAIChat
agent = Agent(model=OpenAIChat(id="gpt-4o"), knowledge=knowledge, search_knowledge=True)
# Anthropic
from agno.models.anthropic import Claude
agent = Agent(model=Claude(id="claude-sonnet-4-20250514"), knowledge=knowledge, search_knowledge=True)
See the Agno model providers docs for the full list.
License
BSD 2-Clause — see LICENSE.
Support
Metadata
Release files for agno-moss 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| agno_moss-0.0.1.tar.gz | 8.0 kB | Without provenance | Details for agno_moss-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| agno_moss-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for agno_moss-0.0.1-py3-none-any.whl |
Total release size: 15.3 kB
Release files / agno_moss-0.0.1.tar.gz
| Download URL | agno_moss-0.0.1.tar.gz |
|---|---|
| Size | 8.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a75909d60ed822a2dc224b047a7cca764ce6b71e42c32c09bd1af3ebe654ad79
|
|
BLAKE2b-256 checksum How to use checksums |
622ac8d4a0ba53c624a66c25f65bafeb8ed4d164beb496f85ad1047071e04db4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Release files / agno_moss-0.0.1-py3-none-any.whl
| Download URL | agno_moss-0.0.1-py3-none-any.whl |
|---|---|
| Size | 7.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
91bb801e60304a9a09ac05b0c307b9f26ebe7bc31ae4b6912e8c159478b10895
|
|
BLAKE2b-256 checksum How to use checksums |
3b29aa9aeecc5bfadceb892ab0f1fd49b60172f94e7a562506e101abc275b76d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Security for agno-moss 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.