On this page
Knowledge service deployment
The knowledge service is installed with the full TeGo Digital Employee Collaboration Platform package. After deployment, configure the knowledge models in the administration console before creating a knowledge base.
Dependencies
| Dependency | Connection and purpose |
|---|---|
| PostgreSQL | Uses a separate application database named tego-kb by default. Requires pgvector. |
| Redis | Uses a separate logical database for the knowledge processing queue and cache. The knowledge service defaults to 2, and the platform defaults to 1. |
| Platform service | The knowledge service calls the platform to filter results by permission. Both services share TEGO_JWT_SECRET. |
| Model service | The embedding model indexes knowledge. Configure a reranker, image understanding, and OCR according to the features enabled. |
With Compose, the platform connects to the knowledge service at TEGO_KB_BASE_URL=http://tego-kb:8080. The knowledge service calls the platform at TEGO_OS_API_URL=http://tego-server:3000. Kubernetes uses in-cluster Service addresses generated by the Chart.
Configure external PostgreSQL and Redis before installation. See Configuration files and external services for the fields. Changing only the address does not migrate a deployment. Retain the original databases, permissions, and shared secret.
Check service status
Compose
From the deployment package root, run:
sudo ./setup.sh status
sudo ./setup.sh logs tego-kbFrom the host directory, check the knowledge service readiness endpoint:
sudo docker compose --env-file .env -f docker-compose.yml exec -T tego-kb \
curl -fsS http://127.0.0.1:8080/health/readyKubernetes
These commands use the installer default namespace. For a customized deployment, use its actual namespace.
kubectl -n tego-avatar get pods -l app.kubernetes.io/component=kb
kubectl -n tego-avatar logs deploy/tego-avatar-kb --tail=200
kubectl -n tego-avatar exec deploy/tego-avatar-kb -- \
curl -fsS http://127.0.0.1:8080/health/readyThe knowledge service runs database migrations at startup. If it is not ready, check database migration, connection, and Redis logs first. Repeatedly recreating the container does not resolve these errors.
Startup and replicas
Compose allows a longer startup grace period for the knowledge service. Kubernetes uses a startup probe to wait for migrations. The current Chart has one replica and uses the Recreate strategy. Increasing the replica count is not a supported high availability configuration.
Configure models and verify usage
- Open the administration console, then Configuration Management > Knowledge Service (“管理后台 → 配置管理 → 知识服务”). Under Model Selection (“模型选择”), save the global embedding model.
- Configure the reranker, image understanding, or OCR for the content type. See Knowledge service parameters.
- Create a knowledge base, upload an approved document, then check that processing completes and the source appears in search results.
- For the target digital employee, open Console > Configuration > Connectors (“中控台 → 配置 → 连接器”). Verify that Knowledge Base (“知识库”) is enabled and its scope includes the target knowledge base. From an account with access to that knowledge base, verify retrieval and citations in a conversation.
See Knowledge service for administration steps and Connect a digital employee to a knowledge base for employee configuration. Administration configuration permissions do not automatically grant read access to the source material.
Configuration impact
New knowledge bases use the global embedding configuration. Existing indexes retain their assigned model. Changing processing settings does not reprocess existing files. Before replacing a model or rebuilding an index, back up the application database and identify the affected knowledge bases.
Back up and restore data
PostgreSQL stores knowledge base content, vectors, and embedded media. Back up tego-kb with pg_dump -Fc including Large Objects. Do not add --no-blobs.
Compose uses a temporary filesystem for /opt/maxkb-app/tmp, and Kubernetes uses emptyDir for the corresponding directory. Neither is a knowledge base backup. For older releases with an /opt/maxkb persistent volume, check for custom files on that volume before upgrading.
A full restore requires the platform database, knowledge database, permissions data, and shared secret. After restoring, verify material processing, retrieval, source access, and retrieval by a digital employee. Confirm that an account without access cannot read the material.
See Backup and restore for commands and Upgrade and rollback for migration from older releases.