The ServiceNow Build Agent (Claude) truncated the Script Include code during the conversion to Fluent format:
- AIAgentExporter: 617 lines → 340 lines (45% lost)
- AIAgentDocumentationGenerator: 2500+ lines → 440 lines (82% lost)
This caused missing functionality in the generated documentation.
The complete working Script Includes are in the working/ folder. The Fluent Script Includes have been updated to properly reference and use these complete implementations.
src/
├── client/ # React UI components
│ ├── components/
│ ├── services/
│ ├── index.html
│ ├── main.jsx
│ └── app.jsx
├── server/
│ └── documentationHandler.js # REST API handler (now uses Script Includes)
└── fluent/
├── script-includes/
│ ├── aiAgentExporter.now.ts
│ └── aiAgentDocumentationGenerator.now.ts
├── scripted-rest-apis/
│ └── docGenerator.now.ts
├── ui-pages/
│ └── aiAgentDocPage.now.ts
└── index.now.ts
working/ # Complete working Script Include implementations
├── AIAgentExporter.js
├── AIAgentDataModelAnalyzer.js
└── AIAgentDocumentationGenerator.js
- User Interface: React app in
src/client/provides dropdown selectors for AI Agents and Agentic Workflows - API Layer: REST API defined in
src/fluent/scripted-rest-apis/docGenerator.now.ts - Handler:
src/server/documentationHandler.jsreceives the request and calls the Script Includes - Script Includes: Fluent Script Includes in
src/fluent/script-includes/contain the business logic - HTML Generation: Script Includes generate rich HTML presentations with ServiceNow branding
# Install dependencies
npm install
# Build the application
npm run build
# Deploy to ServiceNow instance
npm run deploy- Select AI Agent or Agentic Workflow from dropdown
- Generate rich HTML documentation with:
- ServiceNow branding
- Agent details (name, description, role, instructions)
- Tool listings with descriptions
- Interactive expand/collapse sections
- Professional presentation styling
- View generated documentation in embedded iframe
- Complete the Script Include implementations with all missing methods
- Add cross-scope privileges if accessing AI Agent tables from different scope
- Test with actual AI Agent and Agentic Workflow records
- Add error handling and validation