Package layout
agents_pool/, artifacts_store/ and uploads/.
Startup sequence
1
Create runtime directories
agents_pool/, artifacts_store/, uploads/.2
Run auto-migrations
ensure_* functions bring every table up to date. There is no separate migration
command — the schema converges at boot.3
Generate agent modules
Each agent stored in the database is materialised as a Python module under
agents_pool/.4
Start background tasks
Webhook renewal runs every six hours.
5
Mount the ADK sub-application
The Google ADK FastAPI application is mounted into the main app.
6
Load extensions
Modules named in
TH2_EXTENSIONS register their routers, which are mounted after
the core’s. See Editions.Database models
Supported models
Model access goes through LiteLLM, so provider strings follow its convention:- Anthropic —
anthropic/claude-sonnet-4-5-20250929 - OpenAI —
openai/gpt-4o - Mistral —
mistral/mistral-large-latest - Google —
gemini/gemini-pro - OVHcloud —
ovhcloud/DeepSeek-R1-Distill-Llama-70B