llm-bot
Async Python library and LLM-backed bot service.
The current implementation exposes stateless chat and grounded HRAG answering, sentiment analysis, title generation, summary, named entity recognition, entity relationship extraction, structured graph retrieval planning, translation, linking, clustering, and classification endpoints backed by OpenAI-compatible APIs and a decisions API.
Requirements
uv- Python 3.13 or newer
Python library
Install a published release into a Python 3.13+ project with uv add "taranis-llm-bot[inference]".
The PyPI distribution is taranis-llm-bot; Python imports use llm_bot.
The base install supports prepared HRAG tasks with an injected transport. Install
taranis-llm-bot[inference] for the bundled HTTP clients; [server] adds the HTTP service.
Before publishing, install a locally built wheel with
uv add /absolute/path/to/taranis_llm_bot-VERSION-py3-none-any.whl.
Set LLM_BASE_URL, LLM_API_KEY, and optionally LLM_MODEL and LLM_API_MODE
in the environment or .env before importing the library. Call the async
task functions directly; no bot HTTP server is needed:
import asyncio
from llm_bot.schemas import SummarizeRequest
from llm_bot.tasks.summarize import summarize
async def main():
result = await summarize(SummarizeRequest(text="Text to summarize", language="en", max_words=80))
print(result.summary)
# result.model_dump() returns a dictionary.
asyncio.run(main())
In an existing async application, use await summarize(...) directly. Other
tasks follow the same pattern: request models in llm_bot.schemas, async functions
in llm_bot.tasks (for example, ner.extract_entities and translate.translate_text).
Generative tasks accept an optional client=LLMClient(...) to override the connection;
import it from llm_bot.client. Inputs and outputs are Pydantic models, and errors
propagate to the caller. Linking also needs the LOOKUP_* configuration. Cybersecurity classification uses the independent DECISIONS_*
connection when DECISIONS_URL is set; you can inject a DecisionsClient from
llm_bot.decisions_client or an LLMClient to explicitly select either transport.
Fine-grained classification uses ClassifyRequest and llm_bot.tasks.classify.classify_text,
always with a DecisionsClient and the DECISIONS_* connection. Sentiment analysis
also requires this connection and accepts an optional DecisionsClient override.
For the HTTP service, install the server extra with
uv add "taranis-llm-bot[server]". Then import create_app from llm_bot.app
and expose app = create_app() in your ASGI entry point.
Setup
uv sync --locked --extra dev --extra server
./scripts/check.sh
cp .env.example .env
Configure the following values in .env:
LLM_BASE_URLLLM_API_KEYLLM_MODEL(optional if your OpenAI-compatible backend provides a default model)LLM_API_MODE:responses(default) orchat_completions
See Configuration for optional settings.
To route /cybersec-classification to a decision model, also set DECISIONS_URL
to the full endpoint URL, DECISIONS_MODEL, and DECISIONS_API_KEY if required.
DECISIONS_API_MODE=systemone (default) supports OpenRouter's
https://openrouter.ai/api/alpha/decisions and llama.cpp/vLLM /v1/systemone;
use openai for /v1/decisions. The public classification response stays unchanged.
POST /classify requires the same decisions configuration. Send {"text":"Article text"}
to receive probabilities for disinformation, security incident, vulnerability,
threat intelligence, security policy, security news, general news, and other.
These describe the main topic; disinformation is a topic label, not a truth verdict.
See the classification API for category definitions.
The live evaluation records 24 examples and how to rerun them.
POST /sentiment also requires decisions configuration. Its response keeps the
sentiment.label and sentiment.score fields, with the score taken from the winning
label's probability. Set include_emotions: true for compatible Plutchik emotions,
assessed independently in the same decisions request. Existing sentiment reasoning
fields are accepted but ignored. There is no generative fallback.
Run
uv sync --locked --extra server
uv run granian --interface asgi app:app --port 5500
API
See the API reference for endpoint examples. Interactive Swagger
docs are available at GET /docs; the OpenAPI document is at GET /openapi.yaml.
Guides
- Batch processing: process multiple story texts in one provider batch job.
- Configuration: LLM, reasoning, and lookup settings.
- Build and publish: build distributions and publish releases.
Development checks
uv sync --locked --extra dev --extra server
uv run pre-commit install
./scripts/check.sh
The script installs development dependencies, checks lint and
formatting (including Python examples in Markdown), and runs the full test suite.
The installed pre-commit hook, pull request CI, and release validation all run
this same script. Run uv run pre-commit run --all-files to check manually.
Metadata
Release files for taranis-llm-bot 0.1.7
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 |
|---|---|---|---|---|
| taranis_llm_bot-0.1.7.tar.gz | 173.6 kB | Without provenance | Details for taranis_llm_bot-0.1.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| taranis_llm_bot-0.1.7-py3-none-any.whl | Python 3 | none | any | Details for taranis_llm_bot-0.1.7-py3-none-any.whl |
Total release size: 241.6 kB
Release files / taranis_llm_bot-0.1.7.tar.gz
| Download URL | taranis_llm_bot-0.1.7.tar.gz |
|---|---|
| Size | 173.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7f04b7f45109014896f8657a9f53c98eeb78145caa5270a195fdfcd9dd6dc06f
|
|
BLAKE2b-256 checksum How to use checksums |
f39eec42a8951f2f4027030cce1a5fd96dc7a922801c655c892c92d1d07c8e62
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / taranis_llm_bot-0.1.7-py3-none-any.whl
| Download URL | taranis_llm_bot-0.1.7-py3-none-any.whl |
|---|---|
| Size | 68.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c166fda46c88191e5bdaed923af01c8f1e9c39e1757205dd7410a0e58177a2f5
|
|
BLAKE2b-256 checksum How to use checksums |
8f09b8fd918867b52a789200a13a9d64a76356a4631912f7fb9e736e20d518b2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for taranis-llm-bot 0.1.7
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.