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, trusted internal 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.5.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.5.0
File Size Uploaded Provenance
assistant_service_kit-0.5.0.tar.gz 22.8 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 50.3 kB

Release files / assistant_service_kit-0.5.0.tar.gz

Download URL assistant_service_kit-0.5.0.tar.gz
Size 22.8 kB
Tags Source
SHA-256 checksum
How to use checksums
e73f5aa96f3cfa885fc6c6511027aac364dd8a11885d2aa249b238805a2423e1
BLAKE2b-256 checksum
How to use checksums
a365a0e4364f667849691cc195a5a962badaf416fe4902d79d288c78c405f2f8
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.5.0-py3-none-any.whl

Download URL assistant_service_kit-0.5.0-py3-none-any.whl
Size 27.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2491036555254d1f18c36d96aed590e0ba4e45a5cc59f21c26c23e641fbd3aea
BLAKE2b-256 checksum
How to use checksums
f3ac490d505edd0a5c8e24e4273ad3685ab9bc31ac8465537d6fca7eed7e4616
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.5.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