Documentation

Integrating Civagent with CivicPlus Municipal Websites

CivicPlus powers over thousands of local government websites across the United States. This guide covers deploying Civagent’s JavaScript embed on CivicPlus-hosted sites to provide residents with conversational access to municipal information and services.


Overview

CivicPlus provides the website framework, content management, and resident-facing portal. Civagent adds a conversational layer—a chat widget that answers resident questions using your municipality’s knowledge base, documents, and connected data sources.

The integration requires adding a script tag to your CivicPlus site. No backend changes or data migration required.


Embedding the Chat Widget

Script Installation

Add this script to your CivicPlus site’s custom HTML section, footer template, or individual page templates:

<script
  src="https://civagent.com/agentic-embed.js"
  data-agent-id="your-jurisdiction-agent-id"
  data-ws-url="wss://your-agent-endpoint"
  data-theme="light"
  data-button-label="Ask a Question"
></script>

The widget appears as a floating button in the corner of the page. Clicking it opens the chat interface.

Configuration Parameters

Parameter Required Description
data-agent-id Yes Jurisdiction-specific agent identifier
data-ws-url Yes WebSocket endpoint for agent communication
data-theme No light or dark to match your CivicPlus theme
data-button-label No Custom button text (default: “Chat”)
data-greeting No Initial message shown when chat opens
data-auto-open No Set true to open chat automatically on page load

CivicPlus Admin Steps

  1. Log into your CivicPlus admin panel
  2. Navigate to Design > Custom Code or Settings > Header/Footer Scripts
  3. Paste the embed script in the footer section
  4. Save and publish

The widget loads asynchronously and does not block page rendering. Token authentication occurs automatically—no resident login required.

Page-Specific Deployment

To show the widget only on certain pages (e.g., permits, parks, utilities), add the script to individual page templates rather than the global footer. CivicPlus allows custom HTML per page or section.


Knowledge Base

Civagent answers questions using content you provide. The knowledge base supports multiple content types:

Document Upload

Upload PDFs, Word documents, and text files containing municipal information:

  • Permit applications and requirements
  • Fee schedules
  • Ordinances and municipal codes
  • Department policies and procedures
  • FAQs and how-to guides
  • Meeting minutes and agendas

Documents are processed, chunked, and stored as vector embeddings. When a resident asks a question, the agent retrieves relevant passages and synthesizes an answer.

Website Content Ingestion

Point Civagent at your CivicPlus site URLs to ingest published content:

  • Department pages
  • Service descriptions
  • Contact information
  • Hours and locations
  • News and announcements

The agent crawls specified pages and indexes the content. Updates sync on a configurable schedule.

Structured Data

Import structured information as JSON or CSV:

  • Staff directories
  • Facility locations and hours
  • Program schedules
  • Fee tables
  • Service area boundaries

Structured data enables precise answers: “What are the pool hours on Saturday?” returns the exact schedule rather than a general page link.

Content Management

  • Add, update, or remove documents through the Civagent dashboard
  • Set refresh schedules for web content
  • Review which sources the agent cites in responses
  • Flag incorrect answers for knowledge base refinement

Data Source Connections

Beyond the knowledge base, Civagent connects to live data systems for real-time queries.

GIS Services

Connect to ArcGIS REST endpoints for spatial queries—polling places, flood zones, district boundaries, property records. Residents ask location-based questions and receive answers grounded in your GIS data.

Open Data Portals

Query datasets published through ArcGIS Hub or Socrata portals. Public data becomes conversationally accessible without residents navigating the portal interface.

Third-Party Systems

Civagent supports connections to permit systems, utility billing, 311 platforms, and other municipal backends through API integration. Contact the Civagent team for connector availability.


Agent Capabilities

Enable modules based on your department needs:

Websites

Answer resident questions using knowledge base content. “How do I get a parking permit?” returns step-by-step instructions synthesized from your uploaded documents and website content.

311

Receive service requests, classify by department, route appropriately. Integrates with CivicPlus SeeClickFix where applicable. The agent handles initial intake and status inquiries while staff manage resolution.

Permits

Guide applicants through requirements, answer questions about the application process, provide status updates. “What do I need for a fence permit?” returns requirements from your permit documentation.

Records

Help residents understand public records request procedures, provide forms, track request status. Staff review and approve before release.

Meetings

Answer questions about upcoming meetings, provide agenda access, summarize past meeting actions. Syncs with CivicPlus Agenda and Meeting Management where that integration exists.

Parks

Handle facility booking inquiries, program registration questions, schedule information. “Is the soccer field available Saturday at 2pm?” queries your reservation system.


Compliance

Data Retention

Configure retention policies for conversation records, knowledge base documents, and audit logs. Retention periods can vary by department or project. Legal holds suspend deletion when litigation or records requests require preservation.

Audit Trail

All agent interactions generate tamper-evident audit records documenting queries, responses, knowledge base access, and administrative actions. Logs export for records requests and compliance reviews.

Standards Alignment

Civagent’s 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.

Accessibility

CivicPlus sites must meet WCAG 2.1 AA standards per DOJ ADA compliance deadlines. Civagent’s chat interface supports keyboard navigation, screen readers, and sufficient color contrast. The conversational interface provides an alternative access path for residents who find traditional navigation difficult.


Implementation Checklist

Pre-deployment

  • [ ] Gather documents for knowledge base (permits, FAQs, policies, fee schedules)
  • [ ] Identify CivicPlus pages to ingest
  • [ ] Document retention requirements by record type
  • [ ] Determine which agent modules to enable
  • [ ] Obtain CivicPlus admin access for script installation

Configuration

  • [ ] Upload documents to Civagent knowledge base
  • [ ] Configure website content ingestion
  • [ ] Connect GIS or other data sources if applicable
  • [ ] Set retention policies
  • [ ] Test agent responses against common questions

Deployment

  • [ ] Add embed script to CivicPlus footer or page templates
  • [ ] Verify widget appears correctly
  • [ ] Test on mobile devices
  • [ ] Confirm theme matches site design

Monitoring

  • [ ] Review conversation logs for common questions
  • [ ] Identify knowledge gaps and add content
  • [ ] Track resolution rates and staff time savings

Operational Notes

Human in the Loop: Agents answer questions and draft responses. Staff approve any actions that modify records or commit the municipality to a position. The agent may draft a response to a public records request, but a records officer reviews and releases.

No Data Training: Civagent does not train on customer data. Conversations and documents remain within the municipal tenant with no third-party sharing.

Source Attribution: Responses cite the documents or data sources used. Residents see where answers come from; staff can verify accuracy.

Multi-language Support: The agent handles queries in multiple languages without separate configuration. A resident can ask “¿Cómo solicito un permiso?” and receive a response in Spanish.


Support

For CivicPlus admin questions (custom HTML, footer scripts, page templates), contact your CivicPlus account representative.

For Civagent setup and configuration, contact the Civagent team for jurisdiction onboarding, knowledge base setup, and data source connections.