Download the PHP package netresearch/nr-llm without Composer
On this page you can find all versions of the php package netresearch/nr-llm. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download netresearch/nr-llm
More information about netresearch/nr-llm
Files in netresearch/nr-llm
Package nr-llm
Short Description Shared AI/LLM foundation for TYPO3 — centralized provider management, encrypted API keys, and ready-to-use services for chat, translation, vision, and embeddings
License GPL-2.0-or-later
Homepage https://github.com/netresearch/t3x-nr-llm
Informations about the package nr-llm
nr-llm — The Shared AI Foundation for TYPO3
One LLM setup. Every extension. Full admin control.
nr-llm is shared infrastructure for AI in TYPO3 — like the caching framework, but for language models. Administrators configure providers once; every AI-powered extension on the site uses them automatically.
The Problem
Every TYPO3 extension that wants AI capabilities today has to:
- Build its own provider integration (HTTP calls, auth, error handling, streaming)
- Store API keys in its own way (often plaintext in extension settings)
- Create its own backend configuration UI
- Leave administrators with no central overview of AI usage or costs
When a site runs three AI extensions, that's three separate API key configurations, three places to check when something breaks, and no way to switch providers globally.
The Solution
nr-llm provides the missing shared layer:
For Extension Developers
Add AI to your TYPO3 extension in 5 minutes — no API key handling, no HTTP client code, no provider-specific logic.
1. Require the package
2. Inject the service you need
That's it. Provider selection, API keys, caching, error handling — all managed by nr-llm.
What you get for free
| Capability | Without nr-llm | With nr-llm |
|---|---|---|
| Provider switching | Rewrite HTTP calls | Change one admin setting |
| API key storage | $GLOBALS or plaintext |
nr-vault UUIDs (envelope encryption) |
| Response caching | Build your own | Built-in, TYPO3 caching framework |
| Streaming (SSE) | Implement per provider | foreach ($llm->streamChat($msg) as $chunk) |
| Error handling | Parse each provider's errors | Typed exceptions with provider context |
| Multiple providers | N × integration effort | One interface, all providers |
Available services
Why not call the OpenAI API directly?
You can — but then your extension only works with OpenAI. Your users can't switch to Anthropic, use a local Ollama instance, or route through Azure. And every extension on the site manages its own API keys, its own error handling, its own caching.
nr-llm solves this once for the entire TYPO3 ecosystem.
Developer Guide — Full API reference, custom provider registration, typed options, response objects
Integration Guide — Step-by-step tutorial for building your extension on nr-llm
For TYPO3 Administrators
One dashboard for all AI
The Admin Tools > LLM backend module gives you full control:
- Providers — Register API connections (OpenAI, Anthropic, Gemini, Ollama, …)
- Models — Define which models are available and their capabilities
- Configurations — Create use-case presets (temperature, system prompts, token limits)
- Tasks — Define reusable prompt templates for editors
- User Budgets — Cap per-backend-user spending across every preset (requests / tokens / cost × daily / monthly). See the Administration guide.
- Analytics — Estimated cost and usage trends with breakdowns per provider, model, and service, plus per-user consumption against monthly budgets. See the Administration guide.
- Skills — Ingest
SKILL.mdinstruction files from GitHub (SHA-pinned, admin-reviewed) and attach them to tasks and configurations. See the Administration guide. - Tools — 41 built-in read-only function-calling tools in 8 toggleable groups —
content(search, page content, record history: "who changed this?"),structure(TCA/FlexForm schema, URL resolution, TCA validation),configuration(TypoScript/TSconfig, syntax check, site config),code(last exception, source read/search),files(FAL browse/search/references),system(URL probe, diagnostics),accounts(BE users/groups) andrag(cited site-content evidence from the installed search index — EXT:solr, ke_search, indexed_search or a database fallback). See the Administration guide.
Tool Playground — a glass box for agent runs
The admin-only Playground runs the bounded agent loop against any configuration and streams the whole nr_llm ↔ LLM dialog live: every request (messages + tools offered), every response (structured, raw JSON, extracted thinking), every tool execution with arguments, result and duration — plus a dry-run mode that shows the exact prompt without calling the model.
Resilience
- Fallback chain — Each configuration can list other configurations to retry against on a connection error, HTTP 5xx, or rate-limit. Streaming requests are excluded (chunks can't be replayed). See ADR-021.
- Per-capability permissions — Every AI capability (chat, vision, tools, embeddings, …) is a native TYPO3
customPermOptionsentry. Check a box per BE group; admins bypass. See ADR-023. - Dashboard widgets — When
typo3/cms-dashboardis installed, "AI cost this month" and "AI requests by provider (7d)" show on the dashboard sourced from the existing usage table. See ADR-024.
Security by default
- Encrypted API keys — All keys stored as vault identifiers (UUIDs) via nr-vault envelope encryption; nr-llm never stores raw keys
- Admin-only access — Backend module restricted to administrators
- No plaintext secrets — Keys never stored or logged in plain text
Setup in 2 minutes
The Setup Wizard auto-detects your provider type from the endpoint URL, discovers available models, and generates a ready-to-use configuration. Paste your API key and go.
AI-powered wizards
- Task Wizard — Describe what you need in plain language; the AI generates a complete task with configuration, system prompt, and model recommendation in one step
- Configuration Wizard — AI-assisted configuration generation with system prompts, parameters, and model selection
- Model Discovery — "Fetch Models" button on model fields queries the provider API and auto-fills capabilities and pricing
Supported providers
| Provider | Adapter | Capabilities |
|---|---|---|
| OpenAI | openai |
Chat, Embeddings, Vision, Streaming, Tools |
| Anthropic Claude | anthropic |
Chat, Vision, Streaming, Tools |
| Google Gemini | gemini |
Chat, Embeddings, Vision, Streaming, Tools |
| Ollama | ollama |
Chat, Embeddings, Streaming (local, no API key) |
| OpenRouter | openrouter |
Chat, Embeddings, Vision, Streaming, Tools |
| Mistral | mistral |
Chat, Embeddings, Streaming |
| Groq | groq |
Chat, Streaming (fast inference) |
| Azure OpenAI | azure_openai |
Same as OpenAI |
| Any OpenAI-compatible | custom |
Varies (vLLM, LocalAI, LiteLLM, …) |
For Agencies & Solution Architects
- Reduce integration effort — AI capabilities across client projects without per-project plumbing
- No vendor lock-in — Switch from OpenAI to Anthropic (or a local model) without code changes
- Compliance-friendly — Encrypted keys, admin-only access, SBOM and SLSA provenance on every release
- Local-first option — Ollama support means AI features work without sending data to external APIs
- Production-proven — Powers t3x-cowriter, the CKEditor 5 AI writing assistant for TYPO3
Built on nr-llm
| Extension | What it does | nr-llm services used |
|---|---|---|
| t3x-cowriter | AI writing assistant in CKEditor 5 | Chat, Streaming, Translation, Tasks |
Building on nr-llm? Open a PR to add your extension here.
Architecture
The three-tier configuration hierarchy separates concerns cleanly:
Benefits:
- Multiple API keys per provider type (prod/dev/backup)
- Custom endpoints (Azure OpenAI, Ollama, vLLM, local models)
- Reusable model definitions across configurations
- Clear separation of concerns
Packaging: one extension for now
nr-llm ships as a single extension today, even though it bundles several independently useful subsystems — the provider core, specialized services (translation / image / speech), the tool & agent system, the guardrail safety layer, and the backend UI.
This is deliberate. While the extension is under rapid pre-1.0 development the internal contracts between these subsystems still change often, and splitting now would freeze them into public cross-extension APIs prematurely and add coordinated multi-repo release friction. We keep the architecture split-ready instead — the phpat architecture tests enforce the vertical layering (Controller → Service → Provider), and the horizontal module seams are kept clean by review (with phpat rules for those seams a planned split-readiness step) — and will revisit a split with or before the 1.0 release, once the seams have stabilized.
The anticipated seams, if/when we split:
| Package | Scope |
|---|---|
nr_llm (core) |
Provider → Model → Configuration, middleware pipeline, completion / embedding / vision services — the base every other package needs |
nr_llm_specialized |
Translation (DeepL / LLM), image (DALL·E / FAL), speech (Whisper / TTS) |
nr_llm_tools |
Builtin tools, RAG site-search, tool loop, human-in-the-loop approval, agent-run persistence |
nr_llm_guardrail |
Guardrail / secret-redaction safety pipeline (may instead stay in core) |
nr_llm_backend |
Tool Playground, analytics dashboard, setup wizard, skills management |
See ADR-090 for the full rationale and the criteria that would trigger a split.
Requirements
- PHP 8.2+
- TYPO3 v13.4 LTS or v14.3 LTS
- PSR-18 HTTP Client (e.g., guzzlehttp/guzzle)
Installation
Then activate in Admin Tools > Extensions and run Admin Tools > LLM > Setup Wizard.
Documentation
- Introduction — Overview and use cases
- Configuration — Backend module setup
- Developer Guide — API reference, services, custom providers
- Integration Guide — Build your extension on nr-llm
- Architecture — Design decisions and ADRs
Supply Chain Security
This project implements supply chain security best practices:
SLSA Level 3 Provenance
All releases include SLSA Level 3 build provenance attestations, providing:
- Non-falsifiable provenance: Cryptographically signed attestations
- Isolated build environment: Builds run in GitHub Actions with no user-controlled steps
- Source integrity: Provenance links artifacts to exact source commit
Verifying Release Artifacts
Verifying Signatures (Cosign)
All release artifacts are signed using Sigstore Cosign keyless signing:
Software Bill of Materials (SBOM)
Each release includes SBOMs in both SPDX and CycloneDX formats:
nr_llm-X.Y.Z.sbom.spdx.json- SPDX formatnr_llm-X.Y.Z.sbom.cdx.json- CycloneDX format
Checksums
SHA256 checksums for all artifacts are provided in checksums.txt, which is also signed.
License
GPL-2.0-or-later
Author
Netresearch DTT GmbH https://www.netresearch.de
All versions of nr-llm with dependencies
netresearch/nr-vault Version ^0.10.1 || ^0.11.0
psr/http-client Version ^1.0
psr/http-factory Version ^1.0
psr/log Version ^2.0 || ^3.0
symfony/yaml Version ^6.4 || ^7.0 || ^8.0
typo3/cms-core Version ^13.4 || ^14.3