ai_intake_bot
Minimal SDK for persona-based and RAG-based conversational intake.
What this repo is: an SDK, not an app. No data persistence, no auth system, no background jobs.
Quickstart (persona mode with FakeLLM)
-
Create a venv and install deps:
python -m venv .venv source .venv/bin/activate python -m pip install -U pip pip install -e ".[dev]"
-
Example (persona, expert_eval) using the FakeLLM for deterministic results:
from ai_intake_bot.core.engine import IntakeBot
from ai_intake_bot.core.llm import FakeLLM
bot = IntakeBot(
mode="persona",
template="expert_eval",
persona="expert_reviewer",
problem={"description": "Cannot login", "emotional_state": "frustrated", "goals": ["restore access"]},
api_key="sk-test",
qdrant_url=None,
qdrant_api_key=None,
files=None,
selection_probability=0.5,
enable_alerts=True,
extra_system_prompt=None,
)
bot.set_llm(FakeLLM())
out = bot.handle("Please evaluate this scenario")
print(out)
Using a real LLM (OpenAI)
-
This SDK supports optional, explicit use of a real LLM. It will only call an LLM when you inject one via
IntakeBot.set_llm()(so the default is safe for local development and tests). -
To use OpenAI's API, set
OPENAI_API_KEYin your environment and then:
from ai_intake_bot.core.engine import IntakeBot
from ai_intake_bot.core.llm import OpenAIChatLLM
llm = OpenAIChatLLM(model="gpt-4o")
bot = IntakeBot(...)
bot.set_llm(llm)
response = bot.handle("Ask something")
Security model: the SDK never persists secrets to disk. OpenAIChatLLM expects
OPENAI_API_KEY to be set and will not log its value.
RAG with Qdrant (dev-friendly)
-
The RAG engine uses a
LocalVectorStoreby default; if you provideqdrant_urlwhen constructingIntakeBot, the RAG engine will upload chunks to the configured Qdrant instance (ephemeral collection by default) and ground responses on the retrieved documents. -
For a full integration with LangChain and Qdrant follow the example in
scripts/run_qdrant_integration.sh(this script starts a Qdrant Docker container and runs the Qdrant integration test). The integration requireslangchain_qdrant,langchain_openai, and an OpenAI key for embeddings.
Demos
-
scripts/demo_persona_openai.py— Runs anexpert_evalpersona using OpenAI (requiresOPENAI_API_KEY). -
scripts/demo_rag_qdrant.py— Ingests a PDF using LangChain'sPyPDFLoader, splits withRecursiveCharacterTextSplitter, embeds withOpenAIEmbeddings, writes to Qdrant (requiresQDRANT_URLandOPENAI_API_KEY), and performs a retrieval + chat. -
scripts/demo_tts.py— Demonstrates the TTS adapters. Prefers macOSsay, falls back topyttsx3, and ultimately to a no-op adapter.
Run demos (examples):
-
Persona demo (OpenAI):
export OPENAI_API_KEY=<your_key> python scripts/demo_persona_openai.py
-
RAG demo (Qdrant + LangChain):
export OPENAI_API_KEY=<your_key> export QDRANT_URL=http://localhost:6333 python scripts/demo_rag_qdrant.py
-
TTS demo (local):
python scripts/demo_tts.py
Security reminder: never commit real API keys. Use .env files for local testing and set CI secrets for integration runs.
AI_INTake
Metadata
Release files for ai-intake-bot 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ai_intake_bot-0.1.5.tar.gz | 23.3 kB | Without provenance | Details for ai_intake_bot-0.1.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ai_intake_bot-0.1.5-py3-none-any.whl | Python 3 | none | any | Details for ai_intake_bot-0.1.5-py3-none-any.whl |
Total release size: 47.2 kB
Release files / ai_intake_bot-0.1.5.tar.gz
| Download URL | ai_intake_bot-0.1.5.tar.gz |
|---|---|
| Size | 23.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2b462c4f0854dc9a018e8980b0d6d8cd94820adb7d2e7cf2a87843d6b1bf58d7
|
|
BLAKE2b-256 checksum How to use checksums |
789ed5644b11a5062de6cccca1486f68c4b5a922a799c453d6f15e6e314d64ab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.14
|
Release files / ai_intake_bot-0.1.5-py3-none-any.whl
| Download URL | ai_intake_bot-0.1.5-py3-none-any.whl |
|---|---|
| Size | 23.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e55221ff71c1249c03f3f44ebdac98281c3f417aefb3f92de392e2abd04b49e9
|
|
BLAKE2b-256 checksum How to use checksums |
2db136d6df4586ae87a7e36c029f1834683e9b485ccbfdb4a455721922086cbc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.14
|
Security for ai-intake-bot 0.1.5
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.