Beta Features
Agentic Chat
Here you can get a preview of what we are currently exploring in Assistant Chat.
This is an experimental beta feature; some capabilities may be incomplete or occasionally error-prone
How to access
Enable by toggling “Try something new” inside Assisstant Chat Application Template.
Features
Chat with Agentic Apps
Describe what you need in your own words, even complex requests. Our AI understands your goal and automatically coordinates the necessary agents/apps to get it done.
The agentic chat seamlessly combines multiple tasks in a single request for a single output which makes it reliable for complex workflows.
The following agents/apps are available for you to use and try as an experiment:
- Translation
- Summarisation
- OpenWeather API (If configured with an API key)
Revised design
A stripped down interface that includes new features such as token streaming.
Configuration
This document provides a comprehensive reference for all configuration options available in the Pharia Chat Service. All settings can be configured for this Beta feature using environment variables with the prefix PHARIA_CHAT_
.
Core Settings
Environment Variable | Type | Default | Description |
---|---|---|---|
PHARIA_CHAT_DEBUG | boolean | false | Enable debug mode which returns exception details |
PHARIA_CHAT_CORS_ORIGINS | list[str] or str | ["*"] | List of allowed CORS origins. Use '*' to allow all origins during development |
PHARIA_CHAT_REASONING_MODEL | string | "llama-3.3-70b-instruct" | The model to use for agent reasoning |
PHARIA_CHAT_SUMMARIZATION_MODEL | string | null | Model used for conversation summarization. If not set, REASONING_MODEL is used |
PHARIA_CHAT_MAX_TOOL_RETRIES | integer | 1 | Maximum number of retries for tool calls before giving up |
PHARIA_CHAT_PHOENIX_TRACING_ENABLED | boolean | false | Enable all tracing functionality |
Authentication Settings
Environment Variable | Type | Default | Description |
---|---|---|---|
PHARIA_CHAT_AUTHENTICATION_ISSUER_URL | string | "https://login.product.pharia.com" | URL of the authentication issuer |
PHARIA_CHAT_DEBUG_DEVELOPER_TOKEN | string | null | Developer token for debugging purposes |
Inference API Settings
Environment Variable | Type | Default | Description |
---|---|---|---|
PHARIA_CHAT_PHARIA_TOKEN | string | null | Authentication token for Pharia services |
PHARIA_CHAT_INFERENCE_URL | string | "https://inference-api.product.pharia.com" | URL for the inference API |
PHARIA_CHAT_INFERENCE_BACKEND | string | "aleph_alpha" | The inference backend to use (aleph_alpha , openai , or openrouter ) |
OpenRouter Settings
Environment Variable | Type | Default | Description |
---|---|---|---|
PHARIA_CHAT_OPENROUTER_API_KEY | string | null | API key for OpenRouter |
PHARIA_CHAT_OPENROUTER_URL | string | "https://openrouter.ai/api/v1" | URL for OpenRouter API |
Tool Settings
Environment Variable | Type | Default | Description |
---|---|---|---|
PHARIA_CHAT_OPENWEATHER_API_KEY | string | null | API key for OpenWeather service, see https://openweathermap.org/api |
PHARIA_CHAT_PHARIA_ASSISTANT_API_URL | string | null | Base URL for Pharia Assistant API (for translate and summarize tools) |
Service URLs
Environment Variable | Type | Default | Description |
---|---|---|---|
PHARIA_CHAT_URLS__SUMMARY | string | "https://pharia-assistant.product.pharia.com/api/summary/raw" | URL for the summary service |
PHARIA_CHAT_URLS__TRANSLATE | string | "https://pharia-assistant.product.pharia.com/api/translate" | URL for the translation service |
PHARIA_CHAT_URLS__OPENWEATHERMAP | string | "https://api.openweathermap.org/data/2.5/weather" | URL for the OpenWeatherMap API |
Database Settings
All database settings use the prefix PHARIA_CHAT_DB__
.
Environment Variable | Type | Default | Description |
---|---|---|---|
PHARIA_CHAT_DB__HOST | string | "127.0.0.1" | Database host |
PHARIA_CHAT_DB__PORT | integer | 5432 | Database port |
PHARIA_CHAT_DB__USER | string | "postgres" | Database user |
PHARIA_CHAT_DB__PASSWORD | string | "postgres" | Database password |
PHARIA_CHAT_DB__DATABASE | string | "postgres" | Database name |
PHARIA_CHAT_DB__POOL_SIZE | integer | 75 | Connection pool size |
PHARIA_CHAT_DB__MAX_OVERFLOW | integer | 20 | Maximum number of connections to overflow |
PHARIA_CHAT_DB__ECHO | boolean | false | Echo SQL statements to stdout |
PHARIA_CHAT_DB__MAX_TX_RETRY_COUNT | integer | 3 | Maximum number of transaction retry attempts |
PHARIA_CHAT_DB__DSN | string | null | Full database connection string (if provided, overrides individual settings) |
PHARIA_CHAT_DB__AUTO_MIGRATION | boolean | false | Automatically run Alembic migrations on application startup |
Logging Settings
All logging settings use the prefix PHARIA_CHAT_LOGGING__
.
Environment Variable | Type | Default | Description |
---|---|---|---|
PHARIA_CHAT_LOGGING__LEVEL | string | "INFO" | Logging level (DEBUG , INFO , WARNING , ERROR , CRITICAL ) |
PHARIA_CHAT_LOGGING__MODULE_LEVELS | dict[str, str] | {"pharia.chat.api.main": "DEBUG"} | Module-specific log levels |
PHARIA_CHAT_LOGGING__JSON_OUTPUT | boolean | false | Output logs as JSON (useful for production) instead of human-readable format |
PHARIA_CHAT_LOGGING__INCLUDE_CALLSITE_INFO | boolean | false | Include file, function, and line number in logs (reduces performance) |
PHARIA_CHAT_LOGGING__FILE_PATH | string | null | Path to log file. If not set, logs will only go to stdout |
PHARIA_CHAT_LOGGING__FILE_LEVEL | string | null | Logging level for file handler. Defaults to the same as 'level' |
Example Configuration
Here's an example of a complete configuration using environment variables:
# Core settings
PHARIA_CHAT_DEBUG=true
PHARIA_CHAT_CORS_ORIGINS='["[https://app.example.com](https://app.example.com)","[https://admin.example.com](https://admin.example.com)"]'
PHARIA_CHAT_REASONING_MODEL="llama-3.3-70b-instruct"
PHARIA_CHAT_MAX_TOOL_RETRIES=3
# Authentication
PHARIA_CHAT_AUTHENTICATION_ISSUER_URL="[https://login.example.com](https://login.example.com)"
PHARIA_CHAT_DEBUG_DEVELOPER_TOKEN="dev_token_for_testing"
# Inference API
PHARIA_CHAT_PHARIA_TOKEN="your_pharia_token_here"
PHARIA_CHAT_INFERENCE_URL="[https://inference-api.example.com](https://inference-api.example.com)"
PHARIA_CHAT_INFERENCE_BACKEND="openai"
# OpenRouter
PHARIA_CHAT_OPENROUTER_API_KEY="your_openrouter_key_here"
PHARIA_CHAT_OPENROUTER_URL="[https://openrouter.ai/api/v1](https://openrouter.ai/api/v1)"
# Tools
PHARIA_CHAT_OPENWEATHER_API_KEY="your_openweather_api_key"
PHARIA_CHAT_PHARIA_ASSISTANT_API_URL="[https://assistant.example.com/api](https://assistant.example.com/api)"
# Service URLs
PHARIA_CHAT_URLS__SUMMARY="[https://assistant.example.com/api/summary/raw](https://assistant.example.com/api/summary/raw)"
PHARIA_CHAT_URLS__TRANSLATE="[https://assistant.example.com/api/translate](https://assistant.example.com/api/translate)"
PHARIA_CHAT_URLS__OPENWEATHERMAP="[https://api.openweathermap.org/data/2.5/weather](https://api.openweathermap.org/data/2.5/weather)"
# Database
PHARIA_CHAT_DB__HOST=db.example.com
PHARIA_CHAT_DB__PORT=5432
PHARIA_CHAT_DB__USER=app_user
PHARIA_CHAT_DB__PASSWORD=secure_password
PHARIA_CHAT_DB__DATABASE=pharia_chat
PHARIA_CHAT_DB__POOL_SIZE=100
PHARIA_CHAT_DB__ECHO=true
PHARIA_CHAT_DB__AUTO_MIGRATION=true
# Logging
PHARIA_CHAT_LOGGING__LEVEL=INFO
PHARIA_CHAT_LOGGING__MODULE_LEVELS='{"pharia.chat.api.routes": "DEBUG", "pharia.chat.agents": "DEBUG"}'
PHARIA_CHAT_LOGGING__JSON_OUTPUT=true
PHARIA_CHAT_LOGGING__INCLUDE_CALLSITE_INFO=true
PHARIA_CHAT_LOGGING__FILE_PATH=/var/log/pharia-chat/app.log
PHARIA_CHAT_LOGGING__FILE_LEVEL=WARNING
Configuration Precedence
Configuration values are loaded in the following order of precedence (highest to lowest):
- Environment variables
.env
file in the project root- Default values defined in the code
Notes on Special Types
- Boolean values: Use
true
orfalse
(case-insensitive). - Lists: Can be provided as JSON strings, e.g.,
'["item1", "item2"]'
. - Dictionaries: Can be provided as JSON strings, e.g.,
'{"key1": "value1", "key2": "value2"}'
. - Nested settings: Use double underscores (
__
) to denote nesting, e.g.,PHARIA_CHAT_DB__HOST
.