How rahul-bijarniya-1/embedded-agent works
GoodScore E-Agent grounds chat answers, summaries, and spoken explanations in data already displayed in the browser. The main flow is page data and user input → HTTP validation and rate limiting → computed context and a grounded prompt → Gemini text generation → cleaned response; speech uses a separate synthesis path with browser-voice fallback. The README documents the main lifecycle and capabilities. Several backend modules were not sampled, so their internal call relationships are shown only where the README explicitly describes them.
Main entry points: router.py HTTP routes · agent.js Chat and explain UI · assistant.py Assistant orchestration · index.html Dashboard
Components 21
Browser experience
- Dashboard
embedded-agent-fe/index.html - Credit details
embedded-agent-fe/credit.html - Transactions
embedded-agent-fe/transactions.html - Loan details
embedded-agent-fe/loan-details.html - Chat and explain UI
embedded-agent-fe/agent.js
HTTP and mock data
- HTTP routes
embedded-agent-be/agent/router.py - Mock data API
embedded-agent-be/server.py - Rate limiter
embedded-agent-be/agent/limiter.py
Grounded answers
- Request schemas
embedded-agent-be/agent/schemas.py - Assistant orchestration
embedded-agent-be/agent/assistant.py - Page context
embedded-agent-be/agent/context.py - Money calculations
embedded-agent-be/agent/money.py - Grounded prompts
embedded-agent-be/agent/prompts.py - Response cache
embedded-agent-be/agent/cache.py - Gemini text client
embedded-agent-be/agent/llm.py
Speech and operations
- Request observability
embedded-agent-be/agent/observability.py - Agent settings
embedded-agent-be/agent/config.py - Speech synthesis
embedded-agent-be/agent/tts.py
Other components
- User
- Vertex AI Gemini
- Browser voice
Connections 25
- User → Dashboard: uses
README.md - User → Credit details: uses
README.md - User → Transactions: uses
README.md - User → Loan details: uses
README.md - Dashboard → Chat and explain UI: mounts explain
README.md - Credit details → Chat and explain UI: mounts explain
README.md - Transactions → Chat and explain UI: mounts chat
README.md - Loan details → Chat and explain UI: mounts chat
README.md - Chat and explain UI → HTTP routes: posts actions
README.md - HTTP routes → Rate limiter: rate limits
embedded-agent-be/agent/router.py - HTTP routes → Request schemas: validates requests
README.md - HTTP routes → Assistant orchestration: dispatches actions
README.md - Assistant orchestration → Page context: builds context
README.md - Page context → Money calculations: computes facts
README.md - Assistant orchestration → Grounded prompts: builds prompt
README.md - Assistant orchestration → Response cache: checks cache
README.md - Assistant orchestration → Gemini text client: calls model
README.md - Gemini text client → Vertex AI Gemini: generates text
README.md - Assistant orchestration → Speech synthesis: synthesizes speech
README.md - Speech synthesis → Vertex AI Gemini: generates audio
embedded-agent-be/agent/tts.py - Chat and explain UI → Browser voice: fallback speech
README.md - Chat and explain UI → HTTP routes: requests audio
embedded-agent-fe/agent.js - Request observability → HTTP routes: adds request IDs
embedded-agent-be/server.py - Mock data API → HTTP routes: serves alongside
README.md - Agent settings → HTTP routes: configures service
embedded-agent-be/server.py