# anilalapati-66/agentpandu architecture

> Architecture diagram of the GitHub repository anilalapati-66/agentpandu, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/anilalapati-66/agentpandu
- Repository: https://github.com/anilalapati-66/agentpandu

## Overview

Agent Pandu is a career operations product built around a persistent, cited knowledge record. The primary workflow is user-provided material becoming sourced facts, which chat and career tools use to produce grounded answers, job matches, résumé tailoring, and interview preparation. The README documents these capabilities; sampled sources show parts of the pipeline UI, memory query, context assembly, and workflow execution. Several API and career subsystems are represented at their tree-supported directory level because their implementation files were not sampled.

Main entry points: [`apps/api/src/FirestoreService.ts`](https://github.com/anilalapati-66/agentpandu/blob/main/apps/api/src/FirestoreService.ts) (Cited fact store), [`apps/api/src/managers/UserQueryManager.ts`](https://github.com/anilalapati-66/agentpandu/blob/main/apps/api/src/managers/UserQueryManager.ts) (User queries), [`apps/web/src/app/chat/page.tsx`](https://github.com/anilalapati-66/agentpandu/blob/main/apps/web/src/app/chat/page.tsx) (Web app), [`apps/api/src/routes/chat.ts`](https://github.com/anilalapati-66/agentpandu/blob/main/apps/api/src/routes/chat.ts) (Grounded chat)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["User experience"]
  node_web["Web app<br/>[page.tsx]"]
  node_chat_ui["Chat interface<br/>[ChatFeed.tsx]"]
  node_pipeline_ui["Pipeline dashboard"]
  node_hunt_hook["Hunt controls<br/>[usePipelineHunt.ts]"]
  node_hunt_client["Pipeline API client"]
  node_session_client["Chat sessions<br/>[chat-sessions.ts]"]
  node_api_client["Web API client<br/>[api.ts]"]
end

subgraph group_knowledge["Career knowledge"]
  node_api["Fastify API<br/>[index.ts]"]
  node_ingestion["Document ingestion"]
  node_fact_store[("Cited fact store")]
  node_memory_query["Knowledge queries"]
  node_chat_routes["Grounded chat<br/>[chat.ts]"]
end

subgraph group_operations["Career operations"]
  node_career_routes["Career advisor<br/>[hunt.ts]"]
  node_resume["Résumé tailoring<br/>[resume-tailor.ts]"]
  node_interview["Interview study<br/>[study-buddy.ts]"]
end

subgraph group_coordination["Execution and persistence"]
  node_context["Context selection<br/>[ContextEngine.ts]"]
  node_workflow["Workflow execution<br/>[WorkflowEngine.ts]"]
  node_storage[("SQLite storage<br/>[SqliteStorage.ts]")]
  node_user_manager["User queries"]
  node_config["API configuration<br/>[config.ts]"]
  node_crypto["Credential security<br/>[cryptoUtils.ts]"]
  node_user_types["User domain types<br/>[userTypes.ts]"]
end

node_person(("User"))

node_person -->|"uses"| node_web
node_web -.->|"presents"| node_chat_ui
node_web -.->|"presents"| node_pipeline_ui
node_pipeline_ui -->|"uses"| node_hunt_hook
node_hunt_hook -->|"calls"| node_hunt_client
node_hunt_client -.->|"requests"| node_api
node_person -->|"provides material"| node_ingestion
node_ingestion -->|"stores sourced facts"| node_fact_store
node_chat_routes -.->|"queries"| node_memory_query
node_memory_query -.->|"reads facts"| node_fact_store
node_chat_routes -.->|"assembles context"| node_context
node_person -->|"asks questions"| node_chat_routes
node_person -->|"requests job ranking"| node_career_routes
node_career_routes -->|"gets match scores"| node_resume
node_resume -->|"reads career record"| node_fact_store
node_person -->|"practices interviews"| node_interview
node_interview -->|"uses cited record"| node_fact_store
node_workflow -->|"checkpoints"| node_storage
node_user_manager -->|"reads admin ID"| node_config
node_user_manager -->|"uses credential functions"| node_crypto
node_user_manager -->|"uses domain types"| node_user_types
node_session_client -->|"persists local sessions"| node_person
node_api_client -.->|"calls"| node_api

click node_web "https://github.com/anilalapati-66/agentpandu/blob/main/apps/web/src/app/chat/page.tsx"
click node_chat_ui "https://github.com/anilalapati-66/agentpandu/blob/main/apps/web/src/components/ChatFeed.tsx"
click node_pipeline_ui "https://github.com/anilalapati-66/agentpandu/blob/main/apps/web/src/components/pipeline-dashboard.tsx"
click node_hunt_hook "https://github.com/anilalapati-66/agentpandu/blob/main/apps/web/src/hooks/usePipelineHunt.ts"
click node_hunt_client "https://github.com/anilalapati-66/agentpandu/blob/main/apps/web/src/lib/pipeline-hunt-client.ts"
click node_api "https://github.com/anilalapati-66/agentpandu/blob/main/apps/api/src/index.ts"
click node_ingestion "https://github.com/anilalapati-66/agentpandu/blob/main/apps/api/src/ingestion/firstRunIngestion.ts"
click node_fact_store "https://github.com/anilalapati-66/agentpandu/blob/main/apps/api/src/FirestoreService.ts"
click node_memory_query "https://github.com/anilalapati-66/agentpandu/blob/main/packages/career/src/query-engine/MemoryKnowledgeQueryEngine.ts"
click node_chat_routes "https://github.com/anilalapati-66/agentpandu/blob/main/apps/api/src/routes/chat.ts"
click node_career_routes "https://github.com/anilalapati-66/agentpandu/blob/main/apps/api/src/routes/jobs/hunt.ts"
click node_resume "https://github.com/anilalapati-66/agentpandu/blob/main/apps/api/src/resume-tailor.ts"
click node_interview "https://github.com/anilalapati-66/agentpandu/blob/main/apps/api/src/routes/study-buddy.ts"
click node_context "https://github.com/anilalapati-66/agentpandu/blob/main/packages/context/src/engine/ContextEngine.ts"
click node_workflow "https://github.com/anilalapati-66/agentpandu/blob/main/packages/execution/src/workflow/WorkflowEngine.ts"
click node_storage "https://github.com/anilalapati-66/agentpandu/blob/main/packages/storage/src/adapters/sqlite/SqliteStorage.ts"
click node_user_manager "https://github.com/anilalapati-66/agentpandu/blob/main/apps/api/src/managers/UserQueryManager.ts"
click node_config "https://github.com/anilalapati-66/agentpandu/blob/main/apps/api/src/config.ts"
click node_crypto "https://github.com/anilalapati-66/agentpandu/blob/main/apps/api/src/cryptoUtils.ts"
click node_user_types "https://github.com/anilalapati-66/agentpandu/blob/main/apps/api/src/userTypes.ts"
click node_session_client "https://github.com/anilalapati-66/agentpandu/blob/main/apps/web/src/lib/chat-sessions.ts"
click node_api_client "https://github.com/anilalapati-66/agentpandu/blob/main/apps/web/src/lib/api.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_web,node_chat_ui,node_pipeline_ui,node_hunt_hook,node_hunt_client,node_session_client,node_api_client,node_person toneBlue
class node_api,node_ingestion,node_fact_store,node_memory_query,node_chat_routes toneAmber
class node_career_routes,node_resume,node_interview toneMint
class node_context,node_workflow,node_storage,node_user_manager,node_config,node_crypto,node_user_types toneRose
```

## Components

### User experience

- [Web app](https://github.com/anilalapati-66/agentpandu/blob/main/apps/web/src/app/chat/page.tsx): `apps/web/src/app/chat/page.tsx`
- [Chat interface](https://github.com/anilalapati-66/agentpandu/blob/main/apps/web/src/components/ChatFeed.tsx): `apps/web/src/components/ChatFeed.tsx`
- [Pipeline dashboard](https://github.com/anilalapati-66/agentpandu/blob/main/apps/web/src/components/pipeline-dashboard.tsx): `apps/web/src/components/pipeline-dashboard.tsx`
- [Hunt controls](https://github.com/anilalapati-66/agentpandu/blob/main/apps/web/src/hooks/usePipelineHunt.ts): `apps/web/src/hooks/usePipelineHunt.ts`
- [Pipeline API client](https://github.com/anilalapati-66/agentpandu/blob/main/apps/web/src/lib/pipeline-hunt-client.ts): `apps/web/src/lib/pipeline-hunt-client.ts`
- [Chat sessions](https://github.com/anilalapati-66/agentpandu/blob/main/apps/web/src/lib/chat-sessions.ts): `apps/web/src/lib/chat-sessions.ts`
- [Web API client](https://github.com/anilalapati-66/agentpandu/blob/main/apps/web/src/lib/api.ts): `apps/web/src/lib/api.ts`

### Career knowledge

- [Fastify API](https://github.com/anilalapati-66/agentpandu/blob/main/apps/api/src/index.ts): `apps/api/src/index.ts`
- [Document ingestion](https://github.com/anilalapati-66/agentpandu/blob/main/apps/api/src/ingestion/firstRunIngestion.ts): `apps/api/src/ingestion/firstRunIngestion.ts`
- [Cited fact store](https://github.com/anilalapati-66/agentpandu/blob/main/apps/api/src/FirestoreService.ts): `apps/api/src/FirestoreService.ts`
- [Knowledge queries](https://github.com/anilalapati-66/agentpandu/blob/main/packages/career/src/query-engine/MemoryKnowledgeQueryEngine.ts): `packages/career/src/query-engine/MemoryKnowledgeQueryEngine.ts`
- [Grounded chat](https://github.com/anilalapati-66/agentpandu/blob/main/apps/api/src/routes/chat.ts): `apps/api/src/routes/chat.ts`

### Career operations

- [Career advisor](https://github.com/anilalapati-66/agentpandu/blob/main/apps/api/src/routes/jobs/hunt.ts): `apps/api/src/routes/jobs/hunt.ts`
- [Résumé tailoring](https://github.com/anilalapati-66/agentpandu/blob/main/apps/api/src/resume-tailor.ts): `apps/api/src/resume-tailor.ts`
- [Interview study](https://github.com/anilalapati-66/agentpandu/blob/main/apps/api/src/routes/study-buddy.ts): `apps/api/src/routes/study-buddy.ts`

### Execution and persistence

- [Context selection](https://github.com/anilalapati-66/agentpandu/blob/main/packages/context/src/engine/ContextEngine.ts): `packages/context/src/engine/ContextEngine.ts`
- [Workflow execution](https://github.com/anilalapati-66/agentpandu/blob/main/packages/execution/src/workflow/WorkflowEngine.ts): `packages/execution/src/workflow/WorkflowEngine.ts`
- [SQLite storage](https://github.com/anilalapati-66/agentpandu/blob/main/packages/storage/src/adapters/sqlite/SqliteStorage.ts): `packages/storage/src/adapters/sqlite/SqliteStorage.ts`
- [User queries](https://github.com/anilalapati-66/agentpandu/blob/main/apps/api/src/managers/UserQueryManager.ts): `apps/api/src/managers/UserQueryManager.ts`
- [API configuration](https://github.com/anilalapati-66/agentpandu/blob/main/apps/api/src/config.ts): `apps/api/src/config.ts`
- [Credential security](https://github.com/anilalapati-66/agentpandu/blob/main/apps/api/src/cryptoUtils.ts): `apps/api/src/cryptoUtils.ts`
- [User domain types](https://github.com/anilalapati-66/agentpandu/blob/main/apps/api/src/userTypes.ts): `apps/api/src/userTypes.ts`

### Other components

- **User**

## Connections

- User → Web app: uses (evidence: `README.md`)
- Web app → Chat interface: presents
- Web app → Pipeline dashboard: presents
- Pipeline dashboard → Hunt controls: uses (evidence: `apps/web/src/components/pipeline-dashboard.tsx`)
- Hunt controls → Pipeline API client: calls (evidence: `apps/web/src/hooks/usePipelineHunt.ts`)
- Pipeline API client → Fastify API: requests
- User → Document ingestion: provides material (evidence: `README.md`)
- Document ingestion → Cited fact store: stores sourced facts (evidence: `README.md`)
- Grounded chat → Knowledge queries: queries
- Knowledge queries → Cited fact store: reads facts
- Grounded chat → Context selection: assembles context
- User → Grounded chat: asks questions (evidence: `README.md`)
- User → Career advisor: requests job ranking (evidence: `README.md`)
- Career advisor → Résumé tailoring: gets match scores (evidence: `README.md`)
- Résumé tailoring → Cited fact store: reads career record (evidence: `README.md`)
- User → Interview study: practices interviews (evidence: `README.md`)
- Interview study → Cited fact store: uses cited record (evidence: `README.md`)
- Workflow execution → SQLite storage: checkpoints (evidence: `packages/execution/src/workflow/WorkflowEngine.ts`)
- User queries → API configuration: reads admin ID (evidence: `apps/api/src/managers/UserQueryManager.ts`)
- User queries → Credential security: uses credential functions (evidence: `apps/api/src/managers/UserQueryManager.ts`)
- User queries → User domain types: uses domain types (evidence: `apps/api/src/managers/UserQueryManager.ts`)
- Chat sessions → User: persists local sessions
- Web API client → Fastify API: calls
