AI agents in PageSpace are AI_CHAT pages with custom configuration. Each agent has its own system prompt, tool set, model, and role β turning it into a specialized assistant for a specific domain.
AI_CHAT page (right-click > New AI Chat, or via the API)| Setting | Description |
|---|---|
| System Prompt | Custom instructions that define the agent's behavior and expertise |
| Enabled Tools | Which of the 13+ workspace tools this agent can use |
| AI Provider | Which provider powers this agent (overrides drive/user default) |
| AI Model | Which model to use (overrides drive/user default) |
| Agent Role | PARTNER, PLANNER, or WRITER |
// Step 1: Create the AI_CHAT page
POST /api/pages
{
"driveId": "drive-123",
"title": "Research Assistant",
"type": "AI_CHAT",
"parentId": "project-folder-id"
}
// Step 2: Configure the agent
PATCH /api/pages/{pageId}/agent-config
{
"systemPrompt": "You are a research assistant specializing in market analysis. Always cite sources and provide data-driven insights.",
"enabledTools": ["read_page", "regex_search", "glob_search", "multi_drive_search"],
"aiProvider": "anthropic",
"aiModel": "claude-sonnet-4-20250514"
}
Three built-in roles define the agent's baseline capabilities:
The default role. Full read/write/delete capabilities with balanced conversation style.
Read-only strategic planning role. Cannot modify workspace content.
Execution-focused role with minimal conversation. Writes and creates efficiently.
Agents understand their position in the workspace hierarchy:
π Website Redesign/
βββ π Brand Guidelines
βββ π User Research
βββ π UI Components/
β βββ π Button Spec
β βββ π€ UI Design AI β Knows about UI Components, can reference parent docs
βββ π€ Project AI β Knows about entire project
No configuration is needed β context is automatic based on the page's position in the tree.
The ask_agent tool enables agents to consult each other:
// Marketing AI asks the Finance AI about budget
ask_agent({
agentId: "page-ai-finance-456",
agentPath: "/finance/Budget Analyst",
question: "What's our Q4 budget for marketing campaigns?",
context: "Planning new social media campaign"
})
ask_agent with a question and target agentAgent communication includes depth tracking to prevent infinite loops:
Agents can discover other agents across the workspace:
// Find all agents in a specific drive
list_agents({ driveId: "drive-123" })
// Find all agents across all accessible drives
multi_drive_list_agents({
groupByDrive: true,
includeTools: true
})
Beyond role-based filtering, you can specify exactly which tools an agent can use:
// Content editor β only reads and edits
enabledTools: ["read_page", "replace_lines"]
// Research analyst β only searches
enabledTools: ["read_page", "regex_search", "glob_search", "multi_drive_search"]
// Project manager β creates and manages tasks
enabledTools: ["create_page", "read_page", "update_task", "list_pages", "ask_agent"]
// Full autonomy β all tools
enabledTools: [] // Empty = use role-based defaults (all tools for PARTNER)
AI agent conversations support multiple users simultaneously:
This makes agents effective for team collaboration, not just individual use.
Specific system prompts: The more specific your prompt, the better the agent performs. Include domain knowledge, preferred response format, and constraints.
Minimal tool sets: Give agents only the tools they need. A research agent doesn't need create_page or trash.
Hierarchical placement: Place agents near the content they need. An agent in a project folder automatically understands that project.
Agent specialization: Create multiple focused agents rather than one general-purpose agent. Use ask_agent for cross-domain questions.
Model matching: Use powerful models (Claude Opus, GPT-5) for complex reasoning tasks and faster models (Gemini Flash, GPT-4.1 mini) for simple tasks.
Search docs, blog posts, and more.