How rounaksenskr/proposalflow-ai works
ProposalFlow AI turns a freelancer’s client lead into a researched, tailored proposal, then pauses for human approval before recording the result. FastAPI accepts leads and exposes status and review endpoints; the LangGraph workflow coordinates validation, research, portfolio retrieval, proposal drafting, critique, retry routing, review, and persistence. Retrieval combines BM25 and vector search with reciprocal-rank fusion over the Markdown knowledge base. Research uses Tavily and Groq. The graph, routes, research, and retrieval implementations were sampled; generator and persistence details are inferred only from the README and source tree, so their internal wiring is not expanded.
Main entry points: graph.py Workflow Graph · routes.py Lead and Review Routes · research.py Client Research · app.py FastAPI App
Components 19
API and Entry
- FastAPI App
src/proposal_bot/api/app.py - Lead and Review Routes
src/proposal_bot/api/routes.py
Proposal Workflow
- Workflow Graph
src/proposal_bot/graph.py - Lead Ingestion
src/proposal_bot/nodes/ingestion.py - Proposal Generator
src/proposal_bot/nodes/generator.py - Proposal Critic
src/proposal_bot/nodes/critic.py - Human Review
src/proposal_bot/graph.py - Proposal Persistence
src/proposal_bot/nodes/persist.py
Research and Retrieval
- Client Research
src/proposal_bot/nodes/research.py - Case Retrieval
src/proposal_bot/nodes/retrieval.py - Hybrid Retriever
src/proposal_bot/rag/hybrid_retriever.py - Portfolio Knowledge Base
data/knowledge_base
State and Records
- Proposal Records
src/proposal_bot/db/models.py - Database Session
src/proposal_bot/db/session.py - Graph Checkpoints
src/proposal_bot/api/routes.py
Other components
- Freelancer
- Tavily Search
- Groq LLM
- Freelancer Reviewer
Connections 20
- Freelancer → FastAPI App: submits lead
- FastAPI App → Lead and Review Routes: dispatches requests
- Lead and Review Routes → Workflow Graph: invokes workflow
- Workflow Graph → Lead Ingestion: dispatches
- Workflow Graph → Client Research: dispatches
- Workflow Graph → Case Retrieval: dispatches
- Workflow Graph → Proposal Generator: dispatches
- Workflow Graph → Proposal Critic: dispatches
- Workflow Graph → Human Review: dispatches
- Workflow Graph → Proposal Persistence: dispatches
- Client Research → Tavily Search: searches
- Client Research → Groq LLM: extracts intelligence
- Case Retrieval → Hybrid Retriever: queries
- Hybrid Retriever → Portfolio Knowledge Base: loads documents
- Human Review → Freelancer Reviewer: requests decision
- Freelancer Reviewer → Lead and Review Routes: submits decision
- Lead and Review Routes → Graph Checkpoints: reads and resumes
- Lead and Review Routes → Workflow Graph: reads status
- Proposal Persistence → Database Session: uses session
- Database Session → Proposal Records: creates tables