The internal Infrastructure → AI Agents module manages root-only agent configs that are served byDocumentation Index
Fetch the complete documentation index at: https://docs.tuturuuu.com/llms.txt
Use this file to discover all available pages before exploring further.
apps/web webhook routes. It is the first production path
for bidirectional agent presence across Discord and Zalo.
Runtime Boundary
Deploying an agent enables anapps/web webhook endpoint:
apps/web loads the channel config from root workspace_secrets, creates a
Chat SDK runtime through @tuturuuu/ai/chat-sdk, and runs the response loop with
AI SDK ToolLoopAgent.
Production deployments require a root secret named
AI_AGENT_CHAT_SDK_STATE_REDIS_URL. Local development may use the Chat SDK
memory state adapter, but production must use Redis so thread subscriptions,
dedupe, and locks survive cold starts and multiple instances.
Secret Namespace
The module intentionally avoids a database migration in v1. It stores configuration under the root workspace:Discord And Zalo Setup
For Discord, configure the app with the generated webhook URL, then store the application ID, public key, bot token, guild ID, and optional mention role IDs on the Discord channel. For Zalo, configure the bot webhook URL in the Zalo Bot dashboard, set the secret token to the channel’swebhookSecret, and store the bot token plus OA ID
on the Zalo channel.
Mapped User Requirement
Agents never write as a global service user in v1. Each inbound external user must map to a Tuturuuu workspace user before task or calendar tools can run. Discord uses the existingdiscord_guild_members mapping for the configured
guild. Zalo uses root secret identity links:
manage_projects; calendar writes require manage_calendar. If permissions are
missing, the agent replies with a permission-aware message instead of writing.