Skip to main content

Assistant Service Kit

Reusable Python package for building LangChain-based assistant services with FastAPI, auth, tenancy, tools, RAG, tracing, storage, and observability.

Install

Base runtime:

pip install assistant-service-kit

Provider-specific installs:

pip install "assistant-service-kit[rag,gemini]"
pip install "assistant-service-kit[rag,openai]"
pip install "assistant-service-kit[rag,anthropic]"

For local development from this package directory:

pip install -e ".[dev]"

Core Pieces

  • Assistant: simple facade for building a FastAPI assistant quickly.
  • AssistantDefinition: declares the assistant server contract.
  • AssistantEndpoints / EndpointPolicy: declares enabled routes, custom paths, names, and endpoint permissions.
  • AuthConnector: supports no-auth, user-only, gateway token, API key, and custom identity resolution.
  • LLMProviderRegistry: Gemini, OpenAI, Anthropic, and fake chat model providers.
  • EmbeddingProviderRegistry: Gemini, OpenAI, Anthropic, and fake embedding providers.
  • ToolRegistry / ToolPolicy: exposes and validates tools by tenant, user, roles, and limits.
  • SQLAlchemyTraceStore / InMemoryTraceStore: reusable chat trace persistence.
  • PostgresRagStore / VectorStoreConnector: reusable RAG storage and vector-store integration points.
  • create_assistant_sqlalchemy_models: standard SQLAlchemy trace and RAG models for the common case.
  • answer_with_langchain_agent: LangChain tool-calling orchestrator with observability metadata.

Minimal Example

from assistant_service_kit import (
    Assistant,
    AssistantEndpoints,
)

assistant = Assistant(
    name="demo",
    title="Demo Assistant",
    base_path="/api/assistant",
    tenancy="none",
    prompt="Answer clearly.",
    endpoints=AssistantEndpoints(chat=False, conversations=False, messages=False, feedback=False),
)

assistant.with_no_auth()
assistant.with_llm(provider="fake", model="fake", extra={"response": "ok"})
assistant.with_memory_trace()

app = assistant.fastapi(create_schema=lambda: None, get_db=lambda: None)

For standard SQLAlchemy persistence:

from assistant_service_kit import create_assistant_sqlalchemy_models

assistant.with_sqlalchemy_storage(base=Base)

For advanced integrations, build AssistantDefinition and connectors directly.

Status

The package is in alpha. APIs can change until the first stable release.

Metadata

Release files for assistant-service-kit 0.4.0

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

Source distribution (sdist)

Source distribution for assistant-service-kit 0.4.0
File Size Uploaded Provenance
assistant_service_kit-0.4.0.tar.gz 22.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for assistant-service-kit 0.4.0
File Interpreter ABI Platform
assistant_service_kit-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 50.3 kB

Release files / assistant_service_kit-0.4.0.tar.gz

Download URL assistant_service_kit-0.4.0.tar.gz
Size 22.8 kB
Tags Source
SHA-256 checksum
How to use checksums
d101bdb1b76e7b4ade7f09d23ad365496efe1ea4fc2b6d5a447e79a8c180aaec
BLAKE2b-256 checksum
How to use checksums
dcde5f103916524e1c95379bc91227a1d48adcf0b817fc19b44bd81526e3dabb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.9

Release files / assistant_service_kit-0.4.0-py3-none-any.whl

Download URL assistant_service_kit-0.4.0-py3-none-any.whl
Size 27.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5118ea07b4bcfafa0237bae4e82a386682e8458a33ae60de653ae56f57696214
BLAKE2b-256 checksum
How to use checksums
46c90885917957657ef1dd3dcfbf335c587f314d82e59a7cf5dbb4f3817b0099
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.9

Security for assistant-service-kit 0.4.0

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.

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