Microsoft Agent Framework samples that use Chroma as the vector store, through ChromaDotNet.VectorData. They follow the form of the .NET samples of Agent Framework, with Chroma in place of the vector store of the original sample, and each one also comes with models that run locally in Ollama.
This is a community project. It is not affiliated with or endorsed by Chroma.
Website: chromadotnet.org
| Sample | Description |
|---|---|
| Memory with Chroma | Persists chat history in Chroma with ChatHistoryMemoryProvider and recalls it in a new session, with Microsoft Foundry models. In the form of Memory with Azure Cosmos DB for NoSQL. |
| Memory with Chroma and Ollama | The same sample with models that run locally in Ollama. |
| RAG with Chroma | Answers from documentation stored in Chroma with a custom schema, through TextSearchProvider, with Microsoft Foundry models. In the form of RAG with Vector Store and custom schema. |
| RAG with Chroma and Ollama | The same sample with models that run locally in Ollama. |
| RAG with Chroma and the TextSearchStore | Answers from documents stored in Chroma by the TextSearchStore of the Agent Framework sample, which writes and reads them as dictionaries, through TextSearchProvider, with Microsoft Foundry models. In the form of Basic Text RAG. |
| RAG with Chroma, the TextSearchStore and Ollama | The same sample with models that run locally in Ollama. |
The Microsoft Foundry samples need a Foundry project and az login; each README lists what it needs. The Ollama samples need only the .NET 10 SDK and Docker: compose.yaml runs Chroma and Ollama, and downloads the models.
docker compose up -d
dotnet run --project samples/AgentWithMemory_Step10_MemoryUsingChroma_Ollamadotnet testGitHub Actions runs them on every push to main and on every pull request to main.
The tests run the scenario of each sample, with the same configuration, against Chroma in a container started with ChromaDotNet.Testcontainers. They need Docker, but no model: the embeddings come from word hashes and the chat model only records what the agent sends to it.
- Memory: the preference of the user reaches the model in a new session, the messages of another user do not, and each session is stored under its own session id.
- RAG: the chunk that answers the question reaches the model, the search results are not stored in the chat history, a follow-up question is searched with the recent messages, and the chunks are stored with their source.
- RAG with the TextSearchStore: the document that answers each question reaches the model, the search results are not stored in the chat history, and the documents are stored with their source.
The TextSearchStore in AgentWithRAG_Step07_ChromaBasicTextRAG/TextSearchStore comes from the Agent Framework repository (MIT) as it is, and keeps its copyright notice; the programs of the samples are adaptations of the Agent Framework samples linked in the table above, under the same license, and carry the same copyright notice.
