LLM
Configure providers, route between models, cache responses, and track cost.
Pages
- Providers — every wired
LLMClientFactoryclient and how to add your own. - Routing — Pick the right model per request (size, cost, capability).
- External Configuration — Change an agent's provider, model or tuning from a JSON file or the environment, without recompiling.
- Caching — Prompt cache, response cache.
- Cost Tracking — Per-agent and per-session cost accounting.
- Observability — Capture every LLM call as a typed
LLMCallLogevent with prompt, response, usage, cost, and streaming timing. - Audio — Speech-to-text and text-to-speech.
- Advanced — Request hooks, custom transports, rate limiting.
Controlled RAG write-back
TnsAI 0.14.0 (TnsAI@4b57a851, TAN-3009 / PR #151) ships a package-private, default-disabled write-back overlay in com.tnsai.intelligence.rag.binding.ControlledWriteBackStore. It is in Maven Central 0.14.1. There is no public constructor, no RetrievalEngine write method, and no @since on a published type.
LLM Providers
The LLM module provides a unified interface to 31 concrete language-model providers (every non-abstract *Client under com.tnsai.llm.providers). Every provider implements the same LLMClient interface, so switching providers means changing one line — the model name and provider key — not your agent code.