Every office runs on the same tedious patterns. Someone asks "where's the latest version of that document?" in Slack. Someone else spends 30 minutes writing the weekly status report. A third person manually checks three dashboards every morning and pastes numbers into a spreadsheet.
An AI agent eliminates these patterns. Not by replacing anyone, but by handling the repetitive coordination work that eats hours from every team member's week.
This guide covers setting up an AI agent specifically for office use: connecting it to Slack or Google Chat, giving it access to the right tools, locking it down securely for a multi-person workplace, and automating the tasks that nobody wants to do manually.
- An office AI agent connects to Slack, Google Chat, or Microsoft Teams and handles team requests in natural language
- Common tasks: generating reports, answering questions about processes, summarizing documents, scheduling reminders, drafting communications
- Security is critical in workplace settings: restrict access by user, channel, and command type
- Start with one team and 2-3 specific use cases before expanding
- Setup takes about 45-60 minutes for a basic working deployment
What an Office AI Agent Actually Does
Before diving into setup, understand what a workplace agent handles well and what it doesn't.
Great For
High repetition, low judgmentGood For
Research and draftingNot For
Final decisions and approvalsTasks it handles well:
- Generating weekly/monthly status reports from data sources
- Answering "how do we do X?" questions about company processes
- Summarizing long documents, meeting notes, or email threads
- Drafting communications (emails, announcements, responses)
- Setting reminders and scheduling follow-ups
- Looking up information across multiple tools
- Creating first drafts of standard documents (SOPs, templates, briefs)
Tasks that need human oversight:
- Anything involving sensitive client data
- Final approvals on external communications
- Financial decisions or commitments
- HR-related conversations
- Anything that requires reading political dynamics in the room
Prerequisites
What you need before starting:
- A dedicated machine or server to run the agent (a Mac Mini, a Linux box, or a cloud VPS). It needs to stay on 24/7.
- Node.js 22+ installed on that machine (download)
- An AI model access via an Anthropic API key, a Claude Pro/Max subscription (setup-token via Claude Code CLI), or an OpenAI API key. Subscriptions provide flat monthly pricing. API keys are pay-per-token. See the OpenClaw provider docs for all options.
- Admin access to your workspace tool (Slack, Google Chat, or Microsoft Teams) to create a bot/app
- IT/security team approval if your organization has policies about third-party integrations or AI tools
- 30-60 minutes for initial setup
Step 1: Install OpenClaw on Your Office Server
Choose a machine that stays on. A Mac Mini in a closet, a Linux server under someone's desk, or a cloud VPS all work. The agent needs to be reachable by your messaging platform.
# Install OpenClaw
curl -fsSL https://openclaw.ai/install.sh | bash
# Run the setup wizard
openclaw onboard --install-daemon
The wizard walks through:
- API key: Paste your Anthropic or OpenAI key
- Model selection: Claude Sonnet is the recommended balance of capability and cost for office use
- Workspace: Accept the default (
~/.openclaw/workspace) - Gateway port: Default 18789 (fine for internal use)
- Daemon install: Say yes so it starts automatically on reboot
Verify it's running:
openclaw gateway status
Step 2: Connect to Slack
Slack is the most common office chat platform and the easiest to connect. The setup uses Slack's Socket Mode, which means no public URL is needed.
Create a Slack App
Go to api.slack.com/apps and click "Create New App" > "From scratch". Name it something clear like "Office Assistant" and select your workspace.
Enable Socket Mode
In the left sidebar, click "Socket Mode" and toggle it on. Then go to "Basic Information" > "App-Level Tokens" > "Generate Token and Scopes". Add the connections:write scope. Copy the App Token (starts with xapp-).
Set Bot Permissions
Go to "OAuth & Permissions" and add these bot token scopes:
chat:write- Send messagesapp_mentions:read- React to @mentionschannels:history- Read channel messagesgroups:history- Read private channel messagesim:history- Read DMsim:write- Send DMsusers:read- Look up user inforeactions:write- Add emoji reactionsfiles:read- Read shared files
Click "Install to Workspace" and copy the Bot User OAuth Token (starts with xoxb-).
Subscribe to Events
Go to "Event Subscriptions", enable events, and subscribe to:
message.channels- Public channel messagesmessage.groups- Private channel messagesmessage.im- Direct messagesapp_mention- When someone @mentions the bot
Enable App Home
Go to "App Home" and enable the "Messages Tab" so users can DM the bot directly.
Configure OpenClaw
Option 1 (recommended): Use environment variables to keep tokens out of config files:
SLACK_APP_TOKEN=xapp-your-app-token
SLACK_BOT_TOKEN=xoxb-your-bot-token
Option 2: Add tokens to the env section of ~/.openclaw/openclaw.json:
{
"env": {
"SLACK_APP_TOKEN": "xapp-your-app-token",
"SLACK_BOT_TOKEN": "xoxb-your-bot-token"
},
"channels": {
"slack": {
"enabled": true
}
}
}
Then restart: openclaw gateway restart
After saving, protect the config file: chmod 600 ~/.openclaw/openclaw.json
See the full Slack channel docs for advanced options.
Invite to Channels
In Slack, invite the bot to channels where it should be active: /invite @Office Assistant
Alternative: Connect to Google Chat
For Google Workspace offices, Google Chat is the native option:
- Create a Google Cloud project and enable the Google Chat API
- Create a Service Account and download the JSON key
- Configure the Chat app in the Google Cloud Console with an HTTP endpoint
- Set the service account file path in OpenClaw config:
{
"channels": {
"googlechat": {
"enabled": true,
"serviceAccountFile": "~/.openclaw/googlechat-service-account.json"
}
}
}
Google Chat requires a publicly accessible webhook URL. Use a reverse proxy or tunnel service if the server is behind a firewall.
Alternative: Microsoft Teams
For Microsoft 365 environments, Teams integration is available through the Microsoft Bot Framework. The setup involves creating an Azure Bot resource, registering the app, and connecting via webhook. Check the OpenClaw docs for the detailed walkthrough.
Step 3: Configure the Office Agent Identity
The agent's workspace files define how it behaves. For an office setting, the instructions need to be professional, clear about boundaries, and focused on team productivity.
SOUL.md (Office Agent Personality)
# SOUL.md - Office Assistant
## Role
I am the office AI assistant. I help the team with research, drafting,
reporting, and coordination tasks. I'm fast, accurate, and always
available in Slack.
## Communication Style
- Professional but approachable
- Concise by default, detailed when asked
- Always cite sources when providing information
- Use bullet points and structured formatting for readability
## Boundaries
- I never share information from private channels in public channels
- I flag sensitive requests for human review
- I don't make commitments or promises on behalf of team members
- I clearly label when something is a draft versus final output
- I ask for clarification when a request is ambiguous rather than guessing
AGENTS.md (Operating Rules)
# AGENTS.md - Operating Rules
## Core Principles
1. Accuracy over speed. Never guess when you can verify.
2. Default to the most conservative interpretation of requests
involving client data, finances, or external communications.
3. Label all AI-generated content as drafts unless explicitly
told to finalize.
## Channel Behavior
- In public channels: only respond when @mentioned
- In DMs: respond to all messages
- In project channels: follow channel-specific instructions
## Confidentiality
- Never reference content from one person's DM in another conversation
- Never share information from private channels in public channels
- If asked about another person's work, direct them to ask that person
## Memory
- Record project decisions and outcomes
- Track recurring questions (these should become documentation)
- Remember team preferences (formatting, tone, tools)
USER.md (Office Context)
# USER.md - Office Context
## Organization
- Company: [Your Company Name]
- Industry: [Your Industry]
- Team size: [Number of people who will use the agent]
## Tools We Use
- Project management: [Jira/Asana/Linear/Notion]
- Documents: [Google Docs/Notion/Confluence]
- Communication: Slack
- Code: [GitHub/GitLab]
## Common Requests
- Weekly status reports (due Fridays)
- Meeting summary formatting
- Client communication drafts
- Process documentation lookups
Step 4: Set Up Office Automations
The real value of an office agent comes from automated routines that run without anyone asking.
Daily Standup Summary
Create a cron job that collects yesterday's activity and posts a summary:
openclaw cron add \
--name "Daily Standup Summary" \
--cron "0 9 * * 1-5" \
--session isolated \
--message "Generate a daily standup summary for the team. Check recent Slack messages in project channels for updates, blockers, and completed items. Format as a clean summary with sections for each team member or project. Post to #standup channel." \
--delivery announce
Weekly Status Report
openclaw cron add \
--name "Weekly Status Report" \
--cron "0 16 * * 5" \
--session isolated \
--message "Generate the weekly status report. Summarize this week's accomplishments, in-progress items, and next week's priorities. Use data from project channels and any shared dashboards. Format as a professional report and post to #reports." \
--delivery announce
Meeting Follow-Up Reminders
openclaw cron add \
--name "Meeting Action Items Check" \
--cron "0 14 * * 1-5" \
--session isolated \
--message "Check for any meeting action items from the past 48 hours that haven't been addressed. Send a polite DM reminder to the responsible person." \
--delivery announce
Common Office Automation Ideas
| Automation | Frequency | What It Does |
|---|---|---|
| Morning brief | Daily, 9 AM | Summary of pending items and today's calendar |
| End-of-day wrap | Daily, 5 PM | What was accomplished, what carries over |
| New hire onboarding | On trigger | Send welcome docs, FAQs, tool access instructions |
| Client update draft | Weekly | Pull project data, draft client-facing update |
| Expense report reminder | Monthly | Remind team to submit expenses before deadline |
| KPI dashboard | Weekly | Compile metrics from various sources into one report |
| Document review reminder | As needed | Flag documents pending review for more than 3 days |
Step 5: Security Configuration (Critical for Offices)
An office agent handles team data. Security is not optional here.
Access Control: Who Can Use It
Restrict which Slack users can interact with the agent:
{
"channels": {
"slack": {
"enabled": true,
"appToken": "xapp-...",
"botToken": "xoxb-...",
"dmPolicy": "allowlist",
"allowFrom": [
"U01ABC123",
"U02DEF456",
"U03GHI789"
]
}
}
}
Find Slack user IDs by clicking on a user's profile > "More" > "Copy member ID".
For a more open setup where everyone in the workspace can use it (smaller teams where all members are trusted):
{
"channels": {
"slack": {
"dm": {
"policy": "pairing"
}
}
}
}
With pairing mode, anyone can message the bot, but they must approve a one-time pairing code first. This is safer than "open" mode and still easy for small teams.
dmPolicy: "open" in workplace settings. Open mode lets anyone in the Slack workspace send commands to the agent with zero authentication. Use "pairing" (requires one-time approval) or "allowlist" (only listed user IDs) instead. Even in trusted workspaces, access control prevents accidental misuse and creates an audit trail of who is using the agent.
Channel Restrictions
Control which channels the agent responds in:
{
"channels": {
"slack": {
"groups": {
"C01GENERAL": { "requireMention": true },
"C02PROJECTS": { "requireMention": false },
"C03SENSITIVE": { "enabled": false }
}
}
}
}
This means:
- In #general: only responds when @mentioned
- In #projects: responds to all messages (active assistant)
- In #sensitive: completely ignores all messages
Command Restrictions
Limit what the agent can execute on the server. For office use, start with the most restrictive setting and expand only as needed:
{
"tools": {
"exec": {
"security": "deny"
}
}
}
This completely disables shell command execution. For most office use cases (answering questions, drafting content, summarizing), the agent doesn't need shell access at all.
If you need limited command access (checking service status, calling internal APIs):
{
"tools": {
"exec": {
"security": "allowlist",
"allowlist": [
"date",
"cal",
"curl https://api.internal.*"
]
}
}
}
See the exec approvals docs for fine-grained control including per-command approval prompts.
"security": "full" for exec. This gives the agent unrestricted shell access to the server. Start with "deny", then move to "allowlist" only for specific commands you've verified are safe. Review what commands the agent runs by checking gateway logs: openclaw logs --follow
Data Handling Rules
Add explicit data handling rules to the agent's instructions:
## Data Handling (add to AGENTS.md)
### What I Can Store
- Project names and statuses
- Process documentation
- Meeting action items
- General team preferences
### What I Must Never Store
- Passwords, API keys, or credentials
- Client personal data (PII)
- Financial account numbers
- Health information
- Salary or compensation details
### If Someone Shares Sensitive Data
- Do NOT write it to memory
- Process the request in the current session only
- Remind the user to share sensitive data through secure channels
Step 6: Build an Office Knowledge Base
The agent's memory system becomes a living knowledge base for the office. Seed it with information the team frequently asks about.
Creating the Initial Knowledge Base
Write key information into MEMORY.md:
# MEMORY.md - Office Knowledge
## Company Info
- Founded: 2020
- Headquarters: San Francisco, CA
- Team size: 24
## Processes
### Expense Reports
- Submit via [Expensify/Concur]
- Deadline: 5th of each month
- Approval chain: Manager > Finance
- Receipts required for amounts over $25
### Time Off Requests
- Submit through [HR platform]
- Minimum 2 weeks notice for planned PTO
- Manager approval required
- Emergency PTO: notify manager directly
### Client Onboarding
- Step 1: NDA signing (via DocuSign)
- Step 2: Kickoff call scheduling
- Step 3: Project setup in [tool]
- Step 4: Slack channel creation
- Owner: Account Manager
## Tools and Access
### WiFi
- Network: [CompanyName-Secure]
- Password: Ask IT at #it-help
### VPN
- Software: [Cisco/OpenVPN]
- Setup guide: [internal link]
- Contact for issues: #it-help
## Frequently Asked Questions
### "How do I get access to [tool]?"
Submit a request in #it-help with your manager CC'd.
### "What's the PTO policy?"
[Summary of PTO policy]
### "Where are the brand guidelines?"
[Link to brand guidelines document]
Growing the Knowledge Base Over Time
The agent learns from conversations. When someone asks a question and the answer isn't in memory, tell the agent to "remember this for next time." Over weeks, the knowledge base grows organically from real team questions.
Set up a weekly review:
openclaw cron add \
--name "Knowledge Base Review" \
--cron "0 10 * * 5" \
--session isolated \
--message "Review this week's conversations. Identify any questions that were asked multiple times. If the answers aren't in MEMORY.md, add them. Also flag any outdated information in memory that needs updating." \
--delivery announce
Step 7: Train the Team
Deploying the technology is half the work. The other half is getting people to actually use it.
Launch Communication
Send a clear message to the team when rolling out:
Hi team,
We've set up an AI assistant in Slack called @Office Assistant.
What it can do:
- Answer questions about our processes (PTO, expenses, onboarding)
- Draft emails, reports, and summaries
- Set reminders and follow-ups
- Look up information across our tools
How to use it:
- DM it directly for personal requests
- @mention it in channels for team requests
- It only responds when mentioned in public channels
What it does NOT do:
- Access confidential HR or financial data
- Send messages on your behalf without confirmation
- Make decisions - it drafts, you approve
Try asking it: "What's our expense report process?" or
"Draft a client update email for [project]"
Questions? Reach out to [admin name].
Setting Expectations
| Expectation | Reality |
|---|---|
| "It knows everything" | It knows what's in its memory and what it can search online |
| "It replaces someone's job" | It handles the repetitive parts so people focus on judgment calls |
| "It's always right" | It's a first draft machine. Always review output. |
| "It works instantly" | First response takes 5-15 seconds depending on complexity |
| "It's a security risk" | Access-controlled, doesn't store PII, logs all interactions |
Usage Patterns That Work
- "Draft this for me": Ask for a first draft of any standard communication
- "Summarize this": Paste meeting notes or long threads for a clean summary
- "How do we...?": Process questions get instant answers from the knowledge base
- "Remind me to...": Set follow-ups without leaving Slack
- "What happened with...?": Get project context from stored memory
Step 8: Monitor and Improve
Track Usage
Check what the agent is being asked and how it performs:
# View recent sessions
openclaw sessions list --limit 20
# Check specific session history
openclaw sessions history --session-key <key>
# View gateway health
openclaw status --all
Monitor Costs
API costs scale with usage. Track monthly spending:
# Check token usage
openclaw status
Typical office agent costs:
| Team Size | Estimated Monthly API Cost |
|---|---|
| 5 people | $5-15 |
| 15 people | $15-40 |
| 50 people | $40-100 |
These estimates assume Claude Sonnet as the primary model. Opus costs roughly 5x more per token.
Gather Feedback
After the first week, ask the team:
- What tasks are you using it for most?
- What did it get wrong?
- What do you wish it could do?
- Is anything confusing about how to interact with it?
Use this feedback to update MEMORY.md, refine the AGENTS.md instructions, and add new automations.
The Complete Office Configuration
Here's a production-ready configuration for a Slack-based office agent. Tokens are stored as environment variables (never hardcoded in config files that might be version-controlled):
{
// Keep tokens in env vars, not inline
"env": {
"SLACK_APP_TOKEN": "xapp-your-app-token",
"SLACK_BOT_TOKEN": "xoxb-your-bot-token",
"BRAVE_API_KEY": "YOUR_BRAVE_SEARCH_KEY"
},
"agents": {
"defaults": {
"model": {
"primary": "anthropic/claude-sonnet-4-20250514"
},
"heartbeat": { "every": "30m" },
"timeoutSeconds": 1800
}
},
"channels": {
"slack": {
"enabled": true,
"dm": {
"policy": "allowlist",
"allowFrom": ["U01ABC123", "U02DEF456"]
},
"groupPolicy": "allowlist",
"channels": {
"C01GENERAL": { "allow": true, "requireMention": true },
"C02PROJECTS": { "allow": true, "requireMention": true }
},
"groupAllowFrom": ["U01ABC123", "U02DEF456"],
"replyToMode": "all"
}
},
"tools": {
"exec": {
"security": "allowlist",
"allowlist": ["date", "cal"]
},
"web": {
"search": {
"enabled": true
}
}
}
}
After saving the config, restrict file permissions:
chmod 600 ~/.openclaw/openclaw.json
This prevents other users on the machine from reading the config file (which contains API tokens).
## Scaling Beyond One Team
Once the first team is comfortable:
1. **Add more channels**: Invite the bot to additional Slack channels with appropriate mention settings
2. **Create team-specific skills**: Build skills for each department (marketing has different needs than engineering)
3. **Set up per-channel instructions**: Different channels can have different system prompts so the agent adjusts its behavior
4. **Consider multiple agents**: For large organizations, separate agents for different departments prevent context mixing and improve security
```json5
{
"channels": {
"slack": {
"groups": {
"C01MARKETING": {
"requireMention": false,
"systemPrompt": "You are the marketing team assistant. Focus on content, campaigns, and brand voice."
},
"C02ENGINEERING": {
"requireMention": true,
"systemPrompt": "You are the engineering team assistant. Focus on technical accuracy and code review."
}
}
}
}
}
What Not to Do
Don't Give Full Access on Day One
Start with read access to Slack. Add capabilities gradually as trust builds.
Don't Skip Security Config
Set up allowFrom and exec allowlists before anything else, even in small offices.
Don't Expect Perfection Immediately
The second month is dramatically better than the first week. Memory and instructions compound.
Don't Force Adoption
Let early adopters discover value naturally. Their enthusiasm is more convincing than any mandate.
Don't Ignore Feedback
Wrong answers erode trust faster than slow answers. Fix memory immediately when corrections are needed.
- Data processing: Both Anthropic and OpenAI state they don't train on API data, but verify this for your specific plan and region
- Data residency: API calls may route through servers outside your country. Check provider data processing agreements for GDPR/CCPA compliance
- Audit trail: OpenClaw logs all sessions. Configure log retention to meet your organization's requirements
- Employee notification: Some jurisdictions require informing employees when AI systems process their communications
Measuring Success
After 30 days, measure the impact:
| Metric | How to Measure |
|---|---|
| Time saved | Survey team: "How many minutes per day does the assistant save you?" |
| Questions handled | Count DMs and mentions in Slack |
| Knowledge base growth | Size of MEMORY.md over time |
| Adoption rate | What percentage of the team uses it weekly? |
| Accuracy | Track corrections needed per week |
Next Steps
- OpenClaw Setup Guide: Personal agent setup for individual use
- How to Build an AI Agent Team: Multi-agent orchestration with coordinator and specialists
- Best AI Tools for Solopreneurs: Complementary tools that work alongside your agent
- Why Every Business Needs an AI Strategy: The business case for AI adoption
Official resources:
- OpenClaw Documentation (complete reference)
- Slack Channel Setup (detailed Slack configuration)
- Google Chat Setup (Google Workspace integration)
- Gateway Configuration (all config options)
- Exec Approvals (command safety controls)
- OpenClaw Discord (community support)
Start with one team, one channel, and two or three specific tasks. Build trust through consistent, accurate results. Then expand. The best office AI deployments don't happen in a big bang launch. They grow organically as the team discovers new ways to use an assistant that never sleeps, never forgets, and never minds being asked the same question twice.