Skip to content

Now-AI-Foundry/Agent-Extractor-UI

Repository files navigation

AI Agent Documentation Generator - ServiceNow Fluent Project

Issue Identified

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.

Solution

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.

Project Structure

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

How It Works

  1. User Interface: React app in src/client/ provides dropdown selectors for AI Agents and Agentic Workflows
  2. API Layer: REST API defined in src/fluent/scripted-rest-apis/docGenerator.now.ts
  3. Handler: src/server/documentationHandler.js receives the request and calls the Script Includes
  4. Script Includes: Fluent Script Includes in src/fluent/script-includes/ contain the business logic
  5. HTML Generation: Script Includes generate rich HTML presentations with ServiceNow branding

Building and Deploying

# Install dependencies
npm install

# Build the application
npm run build

# Deploy to ServiceNow instance
npm run deploy

Features

  • 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

Next Steps

  1. Complete the Script Include implementations with all missing methods
  2. Add cross-scope privileges if accessing AI Agent tables from different scope
  3. Test with actual AI Agent and Agentic Workflow records
  4. Add error handling and validation

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published