How brookww/qagent works
QAgent is a local research assistant that turns paper inputs into reviewed, theorem-level mathematical questions and exports selected questions with supporting guidance. Its main workflow resolves and reads papers, assesses evidence, generates candidates through the Codex CLI, validates and reviews them for novelty and direct-corollary risk, then selects and exports results. The README documents the product stages; sampled source and the source index support several internal links. Some implementation details are unsampled, so uncertain connections are omitted.
Main entry points: app.py Streamlit UI · deep_paper_reader.py Deep paper reader · hard_review.py Hard review · paper_fetcher.py Paper fetcher
Components 25
Input and control
- Streamlit UI
app.py - Input resolver
src/qagent/input_resolver.py
Paper understanding
- Paper fetcher
src/qagent/paper_fetcher.py - Text extraction
src/qagent/paper_text_extractor.py - Deep paper reader
src/qagent/deep_paper_reader.py - Evidence preflight
src/qagent/evidence_preflight.py - Theorem extraction
src/qagent/theorem_extractor.py - Gap extraction
src/qagent/gap_extractor.py - Reading quality
src/qagent/reading_quality.py - Paper literature survey
src/qagent/paper_literature_survey.py
Question generation
- Candidate generation
src/qagent/runner.py
Validation and review
- Candidate validation
src/qagent/candidate_validator.py - Question validators
src/qagent/validators.py - Novelty review
src/qagent/novelty_review.py - Candidate survey
src/qagent/survey.py - Hard review
src/qagent/hard_review.py - Candidate critic
src/qagent/critic.py - Quality audit
src/qagent/quality_audit.py
Export and diagnostics
- Question export
src/qagent/exporter.py - Candidate export
src/qagent/candidate_exporter.py - Backend diagnostics
src/qagent/backend_diagnostics.py - GPT Pro handoff
src/qagent/gpt_pro_handoff.py - Generated outputs
outputs
Other components
- Researcher
- Codex CLI
Connections 27
- Researcher → Streamlit UI: submits papers
README.md - Streamlit UI → Input resolver: resolves inputs
README.md - Input resolver → Paper fetcher: fetches sources
README.md - Paper fetcher → Text extraction: extracts text
README.md - Streamlit UI → Evidence preflight: checks evidence
README.md - Streamlit UI → Paper literature survey: surveys papers
README.md - Streamlit UI → Deep paper reader: reads papers
- Deep paper reader → Paper fetcher: fetches source
src/qagent/deep_paper_reader.py - Deep paper reader → Text extraction: extracts text
src/qagent/deep_paper_reader.py - Deep paper reader → Theorem extraction: extracts theorems
src/qagent/deep_paper_reader.py - Deep paper reader → Gap extraction: extracts gaps
src/qagent/deep_paper_reader.py - Deep paper reader → Reading quality: assesses reading
src/qagent/deep_paper_reader.py - Streamlit UI → Candidate generation: generates candidates
README.md - Candidate generation → Codex CLI: invokes backend
README.md - Streamlit UI → Candidate validation: validates candidates
README.md - Candidate validation → Question validators: checks theorem form
src/qagent/candidate_validator.py - Streamlit UI → Novelty review: reviews novelty
README.md - Streamlit UI → Hard review: runs hard review
README.md - Hard review → Candidate critic: reviews candidates
src/qagent/hard_review.py - Hard review → Candidate survey: surveys candidates
src/qagent/hard_review.py - Streamlit UI → Quality audit: audits quality
README.md - Streamlit UI → Question export: exports selection
README.md - Streamlit UI → Candidate export: exports candidates
app.py - Streamlit UI → Backend diagnostics: checks backend
app.py - Streamlit UI → GPT Pro handoff: writes handoff
README.md - Question export → Generated outputs: writes questions
README.md - Candidate export → Generated outputs: writes artifacts