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

models = create_assistant_sqlalchemy_models(Base)
assistant.with_sqlalchemy_storage(models=models)

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.3.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.3.0
File Size Uploaded Provenance
assistant_service_kit-0.3.0.tar.gz 22.7 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 50.1 kB

Release files / assistant_service_kit-0.3.0.tar.gz

Download URL assistant_service_kit-0.3.0.tar.gz
Size 22.7 kB
Tags Source
SHA-256 checksum
How to use checksums
02e5c3ca452ee65575222d2fe9452d1d4eb6eb10e8910f3beb1beeb5ea4e95b6
BLAKE2b-256 checksum
How to use checksums
59434ef60a016d2c6c6ef9a66e9c19e0557e4fa44041e185b18876b7c005a425
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.3.0-py3-none-any.whl

Download URL assistant_service_kit-0.3.0-py3-none-any.whl
Size 27.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c35b30777e1183ee961ff54c310f171dbc113922772e04c865fdee7232f8a118
BLAKE2b-256 checksum
How to use checksums
0d0c781762e76166d84e84228f32d89c1fa2713658df3c11a5972857e1439a48
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.3.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