config
Bot configuration loaded from config.yaml with environment variable overrides.
Supports a platforms list so multiple chat platforms (Matrix, Discord, …)
can be configured independently alongside the shared LLM / web settings.
- class config.PlatformConfig(type='', enabled=True, settings=<factory>)[source]
Bases:
objectConfiguration for a single chat platform.
- class config.Config(api_key='', gemini_api_key='', llm_base_url='http://localhost:3000/openai', model='x-ai/grok-4.1-fast', temperature=0.7, max_tokens=60000, system_prompt_file='system_prompt.j2', max_history=100, tools_dir='tools', tool_permissions=<factory>, api_keys=<factory>, redis_url='', redis_tls_cert='', redis_tls_key='', redis_tls_ca='', embedding_model='google/gemini-embedding-001', embedding_batch_size=50, embedding_flush_interval=3600.0, kg_extraction_model='gemini-3-flash-preview', kg_max_hops=2, kg_seed_top_k=8, kg_max_context_entities=30, kg_entity_dedup_threshold=0.9, kg_relationship_decay_factor=0.95, kg_per_message_extraction=False, kg_min_message_length=100, kg_per_user_extraction_limit=5, kg_extraction_channel_hints=<factory>, llm_filter_enabled=False, proactive_enabled=False, proactive_default_frequency=0.05, proactive_triage_enabled=True, proactive_triage_model='gemini-3.1-flash-lite-preview', batch_window=5.0, max_batch_size=10, dna_vault_path='data/dna_vault', api_key_encryption_db_path='data/api_key_encryption_keys.db', media_cache_dir='media_cache', media_cache_max_mb=500, user_sandboxes_dir='data/user_sandboxes', tor_gateway_container='stargazer-tor-gateway', sandbox_curl_image='curlimages/curl:8.11.1', resolve_emojis_as_images=True, max_emojis_per_message=5, web_host='127.0.0.1', web_port=8080, admin_user_ids=<factory>, webhook_secret='', discord_oauth_client_id='', discord_oauth_client_secret='', discord_oauth_redirect_uri='', oauth_encryption_key='', oauth_base_url='', oauth_providers=<factory>, platforms=<factory>, homeserver='https://matrix.org', user_id='', password='', store_path='nio_store', credentials_file='credentials.json')[source]
Bases:
objectConfig.
- Parameters:
api_key (str)
gemini_api_key (str)
llm_base_url (str)
model (str)
temperature (float)
max_tokens (int)
system_prompt_file (str)
max_history (int)
tools_dir (str)
redis_url (str)
redis_tls_cert (str)
redis_tls_key (str)
redis_tls_ca (str)
embedding_model (str)
embedding_batch_size (int)
embedding_flush_interval (float)
kg_extraction_model (str)
kg_max_hops (int)
kg_seed_top_k (int)
kg_max_context_entities (int)
kg_entity_dedup_threshold (float)
kg_relationship_decay_factor (float)
kg_per_message_extraction (bool)
kg_min_message_length (int)
kg_per_user_extraction_limit (int)
llm_filter_enabled (bool)
proactive_enabled (bool)
proactive_default_frequency (float)
proactive_triage_enabled (bool)
proactive_triage_model (str)
batch_window (float)
max_batch_size (int)
dna_vault_path (str)
api_key_encryption_db_path (str)
media_cache_dir (str)
media_cache_max_mb (int)
user_sandboxes_dir (str)
tor_gateway_container (str)
sandbox_curl_image (str)
resolve_emojis_as_images (bool)
max_emojis_per_message (int)
web_host (str)
web_port (int)
webhook_secret (str)
discord_oauth_client_id (str)
discord_oauth_client_secret (str)
discord_oauth_redirect_uri (str)
oauth_encryption_key (str)
oauth_base_url (str)
platforms (list[PlatformConfig])
homeserver (str)
user_id (str)
password (str)
store_path (str)
credentials_file (str)
- kg_extraction_channel_hints: dict[str, str]
channel_id` -> human label for KG extraction prompts.
- Type:
Optional `platform
- user_sandboxes_dir: str = 'data/user_sandboxes'
Root directory for
{user_id}/workspacesandbox trees.
- tor_gateway_container: str = 'stargazer-tor-gateway'
Docker container name for
docker run --network container:...Tor sidecar.
- sandbox_curl_image: str = 'curlimages/curl:8.11.1'
Image for HTTPS downloads into a user sandbox over the Tor netns.
- platforms: list[PlatformConfig]