How pegasystems/infinity-ai-agent-demonstrations works
Two complementary but independently running applications support agent development: the Inspector explores configuration and conducts live chats; DeepEval captures representative sessions, manages golden datasets, runs regression evaluations, and exposes results through APIs and QA tooling. The recommended handoff is human-mediated rather than a direct app-to-app call. Several DeepEval subsystems are documented but their runtime wiring was not sampled, so those links are omitted or marked unverified.
Main entry points: server.js Express server · app.py FastAPI application · capture_golden_session.py Golden session capture · auth.py API client authentication
Components 24
Agent Inspector
- Inspector browser UI
apps/pega-agent-inspector/public/js/inspector-panel.js - Chat and config UI
apps/pega-agent-inspector/public/js/chat-panel.js - Express server
apps/pega-agent-inspector/src/server.js - Token route
apps/pega-agent-inspector/src/routes/auth.js - Agent inspection route
apps/pega-agent-inspector/src/routes/agent.js - Chat route
apps/pega-agent-inspector/src/routes/chat.js - Pega OAuth client
apps/pega-agent-inspector/src/lib/PegaAuth.js - Pega DX API client
apps/pega-agent-inspector/src/lib/PegaDXApi.js - DX chat handler
apps/pega-agent-inspector/src/lib/ApiChatHandler.js - A2A handler
apps/pega-agent-inspector/src/lib/A2AHandler.js
Evaluation Platform
- DeepEval web app
apps/deepeval-pega/DeepEval_Pega/DeepEval_Pega.py - Golden session capture
apps/deepeval-pega/capture_golden_session.py - FastAPI application
apps/deepeval-pega/api/app.py - API client authentication
apps/deepeval-pega/api/auth.py - API data models
apps/deepeval-pega/api/models.py - Project management
apps/deepeval-pega/api/routers/projects.py - Golden datasets
apps/deepeval-pega/api/routers/datasets.py - Evaluation endpoints
apps/deepeval-pega/api/routers/evaluations.py - Evaluation runner
apps/deepeval-pega/api/evaluation_runner.py
QA Results
- Result parsing and reports
apps/deepeval-pega/report_generator.py - QA result storage
apps/deepeval-pega/db_etl.py - QA outcomes MCP server
apps/deepeval-pega/qa_results_mcp_server.py
Other components
- Developer
- Pega agent services
Connections 33
- Developer → Inspector browser UI: inspects agents
README.md - Developer → Chat and config UI: tests interactively
README.md - Inspector browser UI → Express server: uses served app
apps/pega-agent-inspector/src/server.js - Chat and config UI → Express server: calls proxy
README.md - Express server → Token route: mounts route
apps/pega-agent-inspector/src/server.js - Express server → Agent inspection route: mounts route
apps/pega-agent-inspector/src/server.js - Express server → Chat route: mounts route
apps/pega-agent-inspector/src/server.js - Token route → Pega OAuth client: requests tokens
apps/pega-agent-inspector/src/routes/auth.js - Agent inspection route → Pega DX API client: inspects via
apps/pega-agent-inspector/src/routes/agent.js - Agent inspection route → A2A handler: inspects via
apps/pega-agent-inspector/src/routes/agent.js - Chat route → DX chat handler: dispatches API chat
apps/pega-agent-inspector/src/routes/chat.js - Chat route → A2A handler: dispatches A2A chat
apps/pega-agent-inspector/src/routes/chat.js - DX chat handler → Pega DX API client: sends messages
apps/pega-agent-inspector/src/lib/ApiChatHandler.js - Pega OAuth client → Pega agent services: gets access token
- Pega DX API client → Pega agent services: reads and chats
- A2A handler → Pega agent services: fetches card, sends RPC
apps/pega-agent-inspector/src/lib/A2AHandler.js - Developer → Golden session capture: records conversations
README.md - Golden session capture → Pega agent services: retrieves session history
apps/deepeval-pega/capture_golden_session.py - Developer → DeepEval web app: configures and evaluates
README.md - DeepEval web app → Golden session capture: creates golden sessions
apps/deepeval-pega/DeepEval_Pega/DeepEval_Pega.py - FastAPI application → Project management: mounts router
apps/deepeval-pega/api/app.py - FastAPI application → Golden datasets: mounts router
apps/deepeval-pega/api/app.py - FastAPI application → Evaluation endpoints: mounts router
apps/deepeval-pega/api/app.py - FastAPI application → API client authentication: registers OAuth
apps/deepeval-pega/api/app.py - Project management → API client authentication: checks scopes
apps/deepeval-pega/api/routers/projects.py - Golden datasets → API client authentication: checks scopes
apps/deepeval-pega/api/routers/datasets.py - Evaluation endpoints → API client authentication: checks scopes
apps/deepeval-pega/api/routers/evaluations.py - Golden datasets → Golden session capture: builds datasets
apps/deepeval-pega/api/routers/datasets.py - Evaluation endpoints → Evaluation runner: starts evaluation
apps/deepeval-pega/api/routers/evaluations.py - Evaluation runner → Result parsing and reports: produces run output
- Result parsing and reports → QA result storage: persists QA results
- QA outcomes MCP server → QA result storage: queries outcomes
- Developer → QA outcomes MCP server: queries QA outcomes
README.md