scopes.json (see Add access control).
The framework handles the agent loop, tool execution, chat history, context compaction, streaming, and scope enforcement. It auto-generates system prompts from the app’s procedures, database schema, and connected services. You simply provide the LLM integration and customize the agent’s instructions.
LLM integration
The AI agent needs an LLM service. Install the Anthropic service client:src/server/lib/agentLLM.ts (this file is scaffolded when you create the app):
System prompt
Customize the agent’s personality for the task tracker insrc/server/lib/appSystemPrompt.ts:
Scope-aware tool access
The agent only sees and can access procedures that the authenticated user has permission to call. A user with thetasks:viewAll scope sees the getAllTasks tool; a regular user only sees getMyTasks. This filtering happens automatically based on the user’s roles.
Additionally, you can give the AI agent direct access to service tools. For example, to let admins with the slack:post scope ask the agent to post Slack messages, add the scope and update the services section of scopes.json:
requiredScopes array gates access to the entire Slack service — only users with the slack:post scope can use any Slack tools through the AI agent. You can also gate specific tools individually via the tools object. For more details, see the Access control reference.
Chat UI
The framework provides all the components needed to build an in-app AI chat. Here’s an example:useAgentChat hook manages sessions, message history, streaming, and state. The framework provides ChatMessageComponent, ChatInput, ToolCallsPanel, and ProcessingStage — you arrange and style them as needed.
Capabilities
With the task tracker’s procedures, database schema, and connected services, users can now ask the agent things like:- “What tasks do I have this week?”
- “Create a high-priority task called ‘Update API docs’”
- “Mark the ‘Fix login bug’ task as completed”
- “How many active tasks do I have?”
- “Show me all tasks across the team”
- “Who has the most overdue tasks?”
- “Post a summary of today’s completed tasks to Slack” (requires
slack:postscope)

