Documentation

OpenClaw for Government

A personal agent is different from a public-facing chatbot or a shared departmental tool. It belongs to one person. It maintains a private memory of your decisions, preferences, and working context. It connects to your Teams or Slack workspace. Over time, it becomes an increasingly capable assistant that handles the mechanical parts of your job — the searching, formatting, scheduling, and remembering — so you can focus on work that requires judgment.

Your personal agent runs on Civagent’s infrastructure with full access to the platform’s memory system, scheduling engine, knowledge bases, and tool creation capabilities. You interact with it through a chat interface, a messaging app, or both.


Creating Your Personal Agent

Step 1: Create an Agent

From the Civagent dashboard:

  1. Click Create Agent
  2. Set the agent visibility to Personal
  3. Give it a name — this is what appears in your messaging channels
  4. Provide initial instructions describing your role and what you need help with

The instructions seed the agent’s understanding of your work. Be specific: “I manage three federal grants in the Department of Health. I report weekly to the division director. I coordinate with four county offices on allowable costs and compliance.” The agent uses this context from its first interaction forward.

Step 2: Build the Knowledge Base

Upload the documents your agent should know:

  • Department policies and procedures
  • Grant guidelines and compliance requirements
  • Fee schedules and rate tables
  • Meeting minutes and decision records
  • Ordinances, regulations, or statutes you reference regularly
  • Templates and standard formats you use

Documents are processed and stored as searchable knowledge. When you ask a question, the agent retrieves relevant passages and synthesizes an answer grounded in your actual source material.

You can also point the agent at web content — internal portals, open data pages, or policy sites — to keep its knowledge current.

Step 3: Connect a Messaging Channel

This is what turns a dashboard tool into a personal assistant you can reach from anywhere. Civagent supports Microsoft Teams, Slack, WhatsApp, and Telegram.

Microsoft Teams is the most common choice for government environments. Connect your existing Azure Bot Service resource to your personal agent — no code changes required. Copy your App ID and Client Secret into the Civagent dashboard, update the messaging endpoint in Azure, and your agent appears in Teams. Full setup instructions: Connecting Civagent to Microsoft Teams.

Slack works the same way. Paste your Bot User OAuth Token and Signing Secret, configure the Request URL in Slack’s Event Subscriptions, and the agent responds to direct messages and mentions. Full setup instructions: Connecting Civagent to Slack.

WhatsApp and Telegram are available for agencies that use mobile messaging or need to support field staff. Configuration follows the same pattern — provide credentials, set a webhook URL, and the agent is reachable by text.

Once connected, you message your agent the same way you message a colleague. Ask a question, give an instruction, or request a document — right from Teams, Slack, or your phone.


Memory: An Assistant That Learns

The most useful assistant is one you do not have to repeat yourself to. Your personal agent maintains a structured memory system that persists across every conversation.

How It Works

When you interact with your agent, it stores what it learns as categorized memories:

Memory Type What It Captures Example
Preference How you like things done “Budget memos should use the FY26 template”
Observation Facts learned from conversations “Director Williams prefers one-page summaries”
Fact Verified reference information “Grant #4821 has a $2.3M annual ceiling”
Event Dated occurrences “Quarterly report submitted March 1”
Summary Aggregated insights “Three recurring issues in county compliance reviews”

Memories persist across sessions — days, weeks, months. The agent searches them semantically, not by keyword, so relevant context surfaces automatically when a related situation arises.

What This Means in Practice

Early on, you tell your agent that procurement requests over $25,000 require three competitive bids. A month later, you ask it to help draft a procurement request for $30,000 in consulting services. The agent remembers the threshold and includes the three-bid requirement without being reminded.

Over time, the agent builds a working picture of your role: who you report to, which formats you prefer, what deadlines matter, which colleagues handle which responsibilities. It stops asking questions you have already answered and starts anticipating what you need.


Scheduling: An Assistant That Works Around the Clock

Your agent can perform tasks on a recurring schedule, on a delay, or at a specific time — without you being online.

Schedule Types

Recurring tasks run on a cron schedule. Examples:

  • Every weekday at 7 AM: scan for new regulatory filings and summarize in Teams
  • Every Monday at 9 AM: check upcoming deadlines across all active grants
  • First of each month: compile last month’s activity into a status report draft

One-time tasks run at a specific time:

  • Tomorrow at 2 PM: remind me to submit the revised budget narrative
  • In 3 hours: check whether the RFP response was posted

Heartbeat tasks run periodically with the agent’s full context — memory, knowledge base, tools — to monitor conditions and notify you only when something needs attention. Configure active hours so overnight checks do not result in 3 AM messages.

Delivery

Scheduled task results are delivered to your connected channel. The Monday deadline summary appears in your Teams chat. The regulatory filing scan shows up in Slack. The agent reaches you wherever you told it to.


Custom Tools: An Assistant That Extends Itself

Most AI assistants are limited to whatever capabilities they shipped with. Your personal agent can create its own functions.

How It Works

Say you regularly need to validate contract numbers against your agency’s format — a two-letter prefix, a fiscal year, and a six-digit sequence. You describe the need to your agent. It writes a JavaScript validation function, deploys it in a secure sandbox, and starts using it immediately. No IT ticket. No development cycle. The function runs in isolation, cannot access anything outside its scope, and becomes a permanent part of the agent’s toolkit.

What You Can Build

  • Format validators: Vendor IDs, case numbers, grant codes, document reference numbers
  • Data transformers: Convert between report formats, restructure CSV exports, normalize address fields
  • Calculators: Fee schedules with local adjustments, overtime calculations, mileage reimbursements
  • Parsers: Extract structured data from specific report templates your department uses

These are the small, specialized tasks that no vendor builds features for — but that consume hours every week. Your agent automates them once and handles them going forward.

Guardrails

Custom functions run in isolated sandboxes. They cannot access the filesystem, execute system commands, or reach internal networks. They receive defined inputs, perform computation, and return results. The agent cannot deploy functions that violate security boundaries.


Workspace: An Assistant That Refines Itself

Your personal agent maintains workspace files that shape its behavior — a living set of notes it writes to itself based on what it observes about your work.

Workspace Files

File Purpose
Identity Who the agent is, its role and specialization
Soul Personality, communication style, behavioral tendencies
User Context about you — your role, team, priorities
Tools Guidelines for how to use available tools effectively

When you tell your agent to keep responses under three sentences, it writes that to its workspace. When it learns you prefer bullet points for status updates but narrative for briefings, it records the distinction. These files feed into the agent’s system prompt, so the adjustments persist across every future interaction.

After a few weeks, your agent has internalized your working style. After a few months, it has developed specialized knowledge about your specific workflows. The agent does not just remember facts — it learns how you work.


A Week with a Personal Agent

Consider a program manager at a state agency who manages federal grants.

Monday 7:00 AM — The agent sends a Teams message summarizing last week’s activity across all three grants, flagging one county office that has not submitted its monthly report.

Tuesday 10:30 AM — A county partner emails about allowable costs. The program manager forwards the question to her agent in Teams. The agent finds the relevant section in the grant guidelines (which it has in its knowledge base), drafts a response in the format she always uses for county correspondence, and sends it back for her review.

Wednesday 2:00 PM — From her phone between meetings, she texts her agent: “What was the funding ceiling we discussed for the parks initiative?” The agent searches its memory, finds the conversation from two weeks ago, and replies with the figure and the context.

Thursday 9:00 AM — The agent reminds her that the quarterly report for one grant is due in ten days. It offers to pull together the expenditure data it has been tracking and draft the narrative sections using last quarter’s format.

Friday 8:00 AM — The agent drafts her weekly update to the division director, formatted the way the director prefers, incorporating the week’s developments without her having to reconstruct them from memory.

She reviews, edits, sends. What used to take most of Friday morning takes fifteen minutes.


Privacy and Governance

A personal agent that remembers everything raises obvious questions about data handling. Civagent addresses these by design.

Memory isolation. Each personal agent’s memory is scoped to that agent and, optionally, to the individual user. No cross-contamination between employees. A colleague cannot query your agent’s memories.

Audit trails. Every agent interaction — every query, every response, every tool invocation — generates an audit record. These records are exportable for compliance reviews and records requests.

Retention policies. Configure how long conversation records, memories, and audit logs are retained. Legal holds suspend deletion when litigation or regulatory investigations require preservation.

Human in the loop. The agent drafts; you decide. It does not send emails, publish documents, or take external actions without your review. This is not a policy — it is how the system works.

No data training. Civagent does not use customer data to train models. Your conversations, documents, and memories remain within your tenant.

Standards alignment. Compliance controls align with NIST 800-53 (AU-11, SI-12) for audit and retention, and SOC 2 (C1.2, P5.1) for data handling.


Getting Started Checklist

Setup

  • [ ] Create a personal agent from the Civagent dashboard
  • [ ] Write initial instructions describing your role and responsibilities
  • [ ] Upload key documents to the knowledge base (policies, guidelines, templates)
  • [ ] Connect Microsoft Teams or Slack (Teams guide | Slack guide)
  • [ ] Send a test message to verify the channel connection

First Week

  • [ ] Use the agent for common questions — test its knowledge base
  • [ ] Tell it your preferences: response length, format, terminology
  • [ ] Ask it to remember key facts: reporting deadlines, team contacts, recurring tasks
  • [ ] Set up one recurring scheduled task (e.g., Monday morning briefing)

First Month

  • [ ] Review how the agent has adapted to your style
  • [ ] Identify repetitive tasks that could become custom tools
  • [ ] Add more documents to the knowledge base as you encounter gaps
  • [ ] Configure additional scheduled tasks based on your workflow

Ongoing

  • [ ] Update the agent’s knowledge base when policies or procedures change
  • [ ] Correct the agent when it gets something wrong — it updates its memory
  • [ ] Review audit logs periodically for compliance

Support

For personal agent configuration, knowledge base setup, and channel connections, contact the Civagent team.

For Microsoft Teams setup, see Connecting Civagent to Microsoft Teams.

For Slack setup, see Connecting Civagent to Slack.