Skip to main content



Sinapsis Chatbots

A monorepo for Sinapsis chatbot packages, integrations, and demo webapps.

🐍 Installation • 📦 Packages • 🌐 Webapps • 📙 Documentation • 🔍 License

The sinapsis-chatbots project groups the Sinapsis chatbot packages in one workspace. It covers shared chatbot abstractions, provider-specific templates, retrieval and memory integrations, and demo webapps built on top of those packages.

🐍 Installation

This monorepo includes the following workspace packages:

  • sinapsis-anthropic
  • sinapsis-chatbots-base
  • sinapsis-chat-history
  • sinapsis-llama-cpp
  • sinapsis-llama-index
  • sinapsis-mem0
  • sinapsis-vllm

Install using your preferred package manager. We strongly recommend using uv. To install uv, refer to the official documentation.

Install the root package:

uv pip install sinapsis-chatbots --extra-index-url https://pypi.sinapsis.tech

Or with raw pip:

pip install sinapsis-chatbots --extra-index-url https://pypi.sinapsis.tech

[!IMPORTANT] The root package exposes these extras:

  • integrations: installs the package integrations in this workspace
  • webapp: installs the dependencies required to run the demo webapps
  • all: installs both extras

For example, to install everything:

uv pip install sinapsis-chatbots[all] --extra-index-url https://pypi.sinapsis.tech

[!TIP] If you only want one integration package, install it directly by name, for example sinapsis-vllm or sinapsis-llama-cpp.

📦 Packages

This repository is structured into modular packages, each facilitating the integration of AI-driven chatbots with various LLM frameworks. These packages provide flexible and easy-to-use templates for building and deploying chatbot solutions. Below is an overview of the available packages:

Sinapsis Anthropic

This package offers templates for building text-to-text, image-to-text, and tool-enabled conversational chatbots using Anthropic's Claude models.

  • AnthropicTextGeneration: Template for text and code generation with Claude models using the Anthropic API.

  • AnthropicMultiModal: Template for multimodal chat processing using Anthropic's Claude models.

  • AnthropicWithMCP: Template for Claude chat workflows that expose LLMConversationPacket.tools and consume tool calls/results.

For specific instructions and further details, see the README.md.

Sinapsis Chatbots Base

This package provides the shared chatbot foundation for building and processing LLMConversationPacket flows.

  • LLMConversationInput: Template for creating conversation packets from prompts, system prompts, and identity fields.

  • QueryContextualizeFromFile: Template for attaching document context from preloaded generic_data entries.

  • EndpointLLMCompletion: Template for connecting to OpenAI-compatible LLM endpoints such as OpenAI, Ollama, llama.cpp server, vLLM server, Gemini, and similar APIs.

  • EndpointLLMCompletionWithMCP: Template for MCP-enabled chat workflows on top of OpenAI-compatible endpoints. Currently validated with llama.cpp served Qwen 3.5 models.

For specific instructions and further details, see the README.md.

Sinapsis llama-cpp

This package provides local GGUF-backed inference templates built on top of llama-cpp-python.

  • LLaMACPPTextCompletion: Local text completion with structured-output support.

  • LLaMACPPStreamingTextCompletion: Streaming text completion for partial packet updates during generation.

  • LLaMACPPTextCompletionWithMCP: Local text completion with packet-native MCP tool state.

For specific instructions and further details, see the README.md.

Sinapsis llama-index

This package provides ingestion, retrieval, and reranking templates built on top of LlamaIndex.

  • CodeEmbeddingNodeGenerator: Template to generate nodes for a code base.

  • EmbeddingNodeGenerator: Template for generating text embeddings using the HuggingFace model.

  • LLaMAIndexInsertNodes: Template for inserting embeddings (nodes) into PostgreSQL vector tables through PGVectorStore.

  • LLaMAIndexNodeRetriever: Template for retrieving nodes and attaching them as packet contexts.

  • LLaMAIndexReranker: Template for reranking selected retrieved contexts before a downstream LLM consumes them.

  • LLaMAIndexSemanticCacheLookup: Reuse cached LLM responses from PGVector when a semantically similar prompt is found under the same request scope.

  • LLaMAIndexSemanticCacheWrite: Persist completed LLM responses into a PGVector-backed semantic cache for future reuse.

For specific instructions and further details, see the README.md.

Sinapsis Mem0

This package provides persistent memory functionality for Sinapsis agents using Mem0, supporting both managed (Mem0 platform) and self-hosted backends.

  • Managed templates: Mem0ManagedAdd, Mem0ManagedGetAll, Mem0ManagedGetMemory, Mem0ManagedSearch, Mem0ManagedDeleteAll, Mem0ManagedDeleteMemory, Mem0ManagedReset
  • OSS templates: Mem0OSSAdd, Mem0OSSGetAll, Mem0OSSGetMemory, Mem0OSSSearch, Mem0OSSDeleteAll, Mem0OSSDeleteMemory, Mem0OSSReset

For specific instructions and further details, see the README.md.

Sinapsis Chat History

This package provides persistent chat history storage for Sinapsis agents using LLMConversationPacket workflows across SQL backends.

  • ChatHistoryFetch: Template for retrieving stored chat history and attaching it to packet messages.

  • ChatHistorySave: Template for persisting the current conversation turn from a packet.

  • ChatHistoryDelete: Template for deleting stored chat history using explicit user_id / session_id scope and optional filters.

  • ChatHistoryReset: Template for dropping and recreating the configured chat history table.

The package supports sqlite by default, with postgres and supabase available through the optional postgres extra.

For specific instructions and further details, see the README.md.

Sinapsis vLLM

This package offers a suite of templates for running LLMs using vLLM, a high-throughput and memory-efficient inference engine for serving large language models.

  • vLLMTextCompletion: Template for text completion using vLLM with support for structured outputs.

  • vLLMBatchTextCompletion: Template for batched text completion using vLLM's continuous batching engine. Processes multiple conversations in a single batch for improved throughput.

  • vLLMStreamingTextCompletion: Streaming version of vLLMTextCompletion for real-time response generation.

  • vLLMMultiModal: Template for multimodal (text + image) completion using vLLM. Supports vision-language models like Qwen-VL.

For specific instructions and further details, see the README.md.

🌐 Webapps

The webapps included in this project showcase how the package templates can be combined into runnable chatbot demos.

[!IMPORTANT] To run the app you first need to clone this repository:

git clone git@github.com:Sinapsis-ai/sinapsis-chatbots.git
cd sinapsis-chatbots

[!NOTE] If you'd like to enable external app sharing in Gradio, set GRADIO_SHARE_APP=true.

[!NOTE] The generic webapps/chatbot.py entrypoint can run different provider variants by changing AGENT_CONFIG_PATH. Current chatbot variants are:

  • webapps/configs/llama_cpp/llama_cpp_chatbot.yaml
  • webapps/configs/vllm/vllm_text_generation.yaml
  • webapps/configs/vllm/vllm_multimodal.yaml
  • webapps/configs/served/vllm_server.yaml
  • webapps/configs/served/llama_cpp_server.yaml
  • webapps/configs/anthropic/anthropic_text_generation.yaml
  • webapps/configs/anthropic/anthropic_multimodal.yaml

The dedicated entrypoints are:

[!IMPORTANT] Provider-specific credentials:

  • Anthropic variants require ANTHROPIC_API_KEY
  • Mem0 requires MEM0_API_KEY
  • vLLM multimodal and local llama-cpp variants may require model or GPU tuning depending on your hardware
  • The served vLLM variant requires the standalone API server from docker/compose_vllm_server.yaml to be running first
  • The served llama.cpp variant requires the standalone API server from docker/compose_llama_cpp_server.yaml to be running first
🐳 Docker

IMPORTANT: This Docker image depends on the sinapsis-nvidia:base image. For detailed instructions, please refer to the Sinapsis README.

  1. Build the sinapsis-chatbots image:
docker compose -f docker/compose.yaml build
  1. Start one webapp service
  • llama-cpp chatbot:
docker compose -f docker/compose_apps.yaml up chatbot-llama-cpp -d
  • vLLM chatbot:
docker compose -f docker/compose_apps.yaml up chatbot-vllm -d
  • vLLM multimodal chatbot:
docker compose -f docker/compose_apps.yaml up chatbot-vllm-multimodal -d
  • Anthropic chatbot:
export ANTHROPIC_API_KEY=your_api_key
docker compose -f docker/compose_apps.yaml up chatbot-anthropic -d
  • Anthropic multimodal chatbot:
export ANTHROPIC_API_KEY=your_api_key
docker compose -f docker/compose_apps.yaml up chatbot-anthropic-multimodal -d
  • Mem0 chatbot:
export MEM0_API_KEY=your_api_key
docker compose -f docker/compose_apps.yaml up chatbot-mem0 -d
  • RAG chatbot:
docker compose -f docker/compose_apps.yaml up chatbot-rag -d
  • Optional: vLLM chatbot using the separately served vLLM API:
docker compose -f docker/compose_vllm_server.yaml up -d
docker compose -f docker/compose_apps.yaml up chatbot-vllm-endpoint -d

The standalone vLLM server can be customized with HF_TOKEN, VLLM_MODEL, VLLM_SERVED_MODEL_NAME, VLLM_HOST, VLLM_PORT, VLLM_EXPOSED_PORT, VLLM_DTYPE, VLLM_MAX_MODEL_LEN, VLLM_MAX_NUM_SEQS, VLLM_GPU_MEMORY_UTILIZATION, VLLM_CPU_OFFLOAD_GB, and VLLM_SEED. Example:

VLLM_MODEL=Qwen/Qwen3.5-4B VLLM_EXPOSED_PORT=9001 VLLM_CPU_OFFLOAD_GB=8 \
docker compose -f docker/compose_vllm_server.yaml up -d
  • Optional: llama.cpp chatbot using the separately served llama.cpp API:
docker compose -f docker/compose_llama_cpp_server.yaml up -d
docker compose -f docker/compose_apps.yaml up chatbot-llama-cpp-endpoint -d

The standalone llama.cpp server can be customized with HF_TOKEN, LLAMA_CPP_HOST, LLAMA_CPP_PORT, LLAMA_CPP_EXPOSED_PORT, LLAMA_CPP_HF_MODEL_REPO_ID, LLAMA_CPP_MODEL_FILE, LLAMA_CPP_MODEL_ALIAS, LLAMA_CPP_N_CTX, LLAMA_CPP_N_THREADS, LLAMA_CPP_N_GPU_LAYERS, and LLAMA_CPP_SEED.

  1. Check the logs
  • llama-cpp chatbot:
docker logs -f sinapsis-chatbot-llama-cpp
  • vLLM chatbot:
docker logs -f sinapsis-chatbot-vllm
  • vLLM multimodal chatbot:
docker logs -f sinapsis-chatbot-vllm-multimodal
  • vLLM endpoint chatbot:
docker logs -f sinapsis-chatbot-vllm-endpoint
  • llama.cpp endpoint chatbot:
docker logs -f sinapsis-chatbot-llama-cpp-endpoint
  • Anthropic chatbot:
docker logs -f sinapsis-chatbot-anthropic
  • Anthropic multimodal chatbot:
docker logs -f sinapsis-chatbot-anthropic-multimodal
  • Mem0 chatbot:
docker logs -f sinapsis-chatbot-mem0
  • RAG chatbot:
docker logs -f sinapsis-chatbot-rag
  1. The logs will display the URL to access the webapp, e.g.:
Running on local URL:  http://127.0.0.1:7860

NOTE: The url may be different, check the output of logs.

  1. To stop the app:
docker compose -f docker/compose_apps.yaml down

To run a different variant with the generic chatbot entrypoint, update AGENT_CONFIG_PATH in the service environment to point to the desired YAML file under webapps/configs/.

💻 UV

To run the webapp using the uv package manager, follow these steps:

  1. Sync the virtual environment:
uv sync --frozen
  1. Install the workspace packages and webapp dependencies:
uv pip install sinapsis-chatbots[all] --extra-index-url https://pypi.sinapsis.tech
  1. Run one webapp variant:
  • llama-cpp chatbot:
uv run webapps/chatbot.py
  • vLLM chatbot:
export AGENT_CONFIG_PATH=webapps/configs/vllm/vllm_text_generation.yaml
uv run webapps/chatbot.py
  • vLLM multimodal chatbot:
export AGENT_CONFIG_PATH=webapps/configs/vllm/vllm_multimodal.yaml
uv run webapps/chatbot.py
  • vLLM chatbot via separately served API:
docker compose -f docker/compose_vllm_server.yaml up -d
export AGENT_CONFIG_PATH=webapps/configs/served/vllm_server.yaml
uv run webapps/chatbot.py
  • llama.cpp chatbot via separately served API:
docker compose -f docker/compose_llama_cpp_server.yaml up -d
export AGENT_CONFIG_PATH=webapps/configs/served/llama_cpp_server.yaml
uv run webapps/chatbot.py
  • Anthropic chatbot:
export ANTHROPIC_API_KEY=your_api_key
export AGENT_CONFIG_PATH=webapps/configs/anthropic/anthropic_text_generation.yaml
uv run webapps/chatbot.py
  • Anthropic multimodal chatbot:
export ANTHROPIC_API_KEY=your_api_key
export AGENT_CONFIG_PATH=webapps/configs/anthropic/anthropic_multimodal.yaml
uv run webapps/chatbot.py
  • Mem0 chatbot:
export MEM0_API_KEY=your_api_key
uv run webapps/chatbot_with_mem0.py
  • RAG chatbot:
uv run webapps/rag_chatbot.py
  1. The terminal will display the URL to access the webapp, e.g.:
Running on local URL:  http://127.0.0.1:7860

NOTE: The URL may vary; check the terminal output for the correct address.

To switch the generic chatbot entrypoint to a different provider or modality, change AGENT_CONFIG_PATH to the corresponding file under webapps/configs/.

📙 Documentation

Documentation for this and other sinapsis packages is available on the sinapsis website

Tutorials for different projects within sinapsis are available at sinapsis tutorials page

🔍 License

This project is licensed under the AGPLv3 license, which encourages open collaboration and sharing. For more details, please refer to the LICENSE file.

For commercial use, please refer to our official Sinapsis website for information on obtaining a commercial license.

Metadata

Release files for sinapsis-chatbots 0.8.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sinapsis-chatbots 0.8.2
File Size Uploaded
sinapsis_chatbots-0.8.2.tar.gz 122.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sinapsis-chatbots 0.8.2
File Interpreter ABI Platform
sinapsis_chatbots-0.8.2-py3-none-any.whl Python 3 none any Details

Total release size: 303.3 kB

Release files / sinapsis_chatbots-0.8.2.tar.gz

Download URL sinapsis_chatbots-0.8.2.tar.gz
Size 122.8 kB
Tags Source
SHA-256 checksum
How to use checksums
d3daed22beae033201b4acb590e17561a8109e4bcfe417be71a8fec5c86d1584
BLAKE2b-256 checksum
How to use checksums
1ddb3dd4402b3aca93b71d63c9e8773380e816ac30ea765e61f9ef2e7100b3e6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.5.16

Release files / sinapsis_chatbots-0.8.2-py3-none-any.whl

Download URL sinapsis_chatbots-0.8.2-py3-none-any.whl
Size 180.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
08d65ec56999315ac71356e0c89ac84375d3efd051fda8bd99ad9daae092338d
BLAKE2b-256 checksum
How to use checksums
1a35e705650bfa58dc28c449bca440c65bb8d0e33caedb6ca1196e0be5eb28ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.5.16

Release history Release notifications | RSS feed

This release

0.8.2 This release

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.3

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.11

2 release files

0.5.10

2 release files

0.5.9

2 release files

0.5.8

2 release files

0.5.7

2 release files

0.5.6

2 release files

0.5.5

2 release files

0.5.4

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page