Documentation
Integrating Civagent with Granicus Websites
Granicus powers government websites for over 7,000 organizations through its govAccess and OpenCities CMS platforms. This guide covers deploying Civagent’s JavaScript embed on Granicus-hosted sites to provide residents with conversational access to municipal information and services.
Overview
Granicus provides the website framework, content management, and digital services platform. 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 to your Granicus site through the Developer Toolkit or custom content areas. No backend changes or data migration required.
Embedding the Chat Widget
Script Installation
Add this script to your Granicus site:
<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 Granicus 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 |
govAccess Installation
govAccess provides multiple options for adding custom scripts:
Developer Toolkit (DTK)
For organizations with DTK access:
- Access the Developer Toolkit in your govAccess admin
- Add the embed script to your site’s global scripts or footer template
- Deploy changes through your standard workflow
Custom Content Areas
For simpler deployments:
- Navigate to Configurations > Custom Content
- Create or edit a custom content block
- Add the embed script using the HTML editor
- Set the content block to display site-wide or on specific pages
Flex Components
Add the script within a Flex component for page-specific deployment:
- Edit the target page
- Add a Flex component with custom HTML capability
- Paste the embed script
- Publish the page
OpenCities Installation
OpenCities uses a template-based system:
- Access your OpenCities admin panel
- Navigate to site settings or theme customization
- Locate the footer or global scripts section
- Add the embed script
- Publish changes
For page-specific deployment, work with your Granicus support contact to add scripts to individual page templates.
Verification
After adding the script:
- Clear your browser cache and reload the site
- Confirm the chat button appears in the expected position
- Test the widget opens and responds to queries
- Verify appearance on mobile devices
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 Granicus 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, keeping answers current as you update your Granicus site.
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 library 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
Granicus Product Integrations
Civagent complements existing Granicus solutions:
govDelivery Communications
Granicus govDelivery handles email, SMS, and social communications. Civagent handles inbound questions; govDelivery handles outbound notifications. The agent can reference communication archives when answering questions about past announcements or alerts.
EngagementHQ
For jurisdictions using Granicus EngagementHQ (Bang the Table), the agent can direct residents to active engagement projects, explain participation options, and summarize feedback themes from completed projects.
Meeting Management
Civagent answers questions about upcoming meetings, provides agenda access, and summarizes past meeting actions. If your Granicus site integrates with meeting management tools, the agent surfaces this information conversationally.
Digital Forms
Granicus provides digital forms with signatures and payment processing. Civagent guides residents to the appropriate forms and explains requirements. “How do I apply for a business license?” returns the process steps and links to the relevant Granicus form.
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. 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.
Alerts
Reference past emergency notifications and routine communications distributed through govDelivery. “What was the boil water notice about?” retrieves the relevant alert content.
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
Granicus sites are built to comply with WCAG AA requirements. 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 Granicus pages to ingest
- [ ] Document retention requirements by record type
- [ ] Determine which agent modules to enable
- [ ] Confirm access to Developer Toolkit or custom content areas
Configuration
- [ ] Upload documents to Civagent knowledge base
- [ ] Configure website content ingestion
- [ ] Connect additional data sources if applicable
- [ ] Set retention policies
- [ ] Test agent responses against common questions
Deployment
- [ ] Add embed script via DTK, custom content, or Flex component
- [ ] Verify widget appears correctly across page templates
- [ ] 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 Granicus admin questions (Developer Toolkit, custom content, page templates), contact your Granicus account representative or access the Granicus Support Portal.
For Civagent setup and configuration, contact the Civagent team for jurisdiction onboarding, knowledge base setup, and data source connections.