@sparsh9g/colleagent-research

4
0
flwr new @sparsh9g/colleagent-research

colleagent-research-agent

The public research side of Colleagent. It reads only public data and never receives student identity. It is a Python package (colleagent_research) and also a Flower AgentApp (colleagent_research.agent_app:app). The same code runs inside the bridge process, as a Flower AgentApp run, or from the CLI. Contract: ../docs/CONTRACT-v4.md. Flower notes: FLOWER_NOTES.md.

Status (2026-09-29): real product back end. Results are computed from what the student enters. 45 tests pass.

What is real

PieceHow it worksData
West Valley College catalogEvery course page on westvalley.edu, parseddata/colleges/wvc/catalog.json: 979 courses in 78 subjects. Each course has code, title, units, prerequisites (text, codes, AND/OR groups), co-requisites, UC/CSU transfer status, Cal-GETC area, C-ID, and its catalog URL. Built by scripts/build_wvc_catalog.py.
School registry (fast path)8 programs, each requirement with a source URL and a short verbatim evidence snippet. Every snippet is re-found on its official page (scripts/verify_registry.py --live: ALL GOOD, 8 programs, 24 pages)data/schools/*.json
Discovery (any other school/program)Resolve the school's official domain (IPEDS). Search that domain. Fetch the pages. Extract requirements with the LLM. Grade them with the same fact-checker. Cache the result in data/discovered/.data/institutions.json: 2,824 four-year U.S. institutions (NCES IPEDS HD2024, public data).
Course lookupEquivalency tables: WVC course(s) → requirement, with alternatives (anyOf) and honors variantsdata/equivalency/wvc/*.json (all "derived", Medium or Low). Discovered programs use a topic → WVC course map (Low).
Fact-checkerHigh = the evidence snippet is on the official page. Medium = the page loads but the exact snippet is not on it, or the page is not official. Low = unreachable, no source, or a placeholder. A hand-verified ceiling can only lower a grade.factcheck.py
Source storagePages are never stored whole. Each page is fetched, turned into text, and split into sections. Only the sections about transfer requirements are kept (keyword scoring; fetcher.relevance_scorer can be swapped), plus the text around every evidence snippet. The cache holds {url, fetchedAt, contentHash, relevantExcerpts[], evidence[]}.cache/*.json
Change detectionIn live mode, each page's contentHash is compared with the cached one. A changed page emits a "Source changed: …" event and is re-graded. Changed discovered programs are re-extracted.fetcher.py, research.py
Re-verifyRe-fetches one source (live, with a cache fallback) and re-checks its snippet. If the snippet is gone, it returns changed: true and Medium.
Professor finderSAMPLE. Names are fictional and numbers are illustrative. There is no ToS-safe public source for ratings. Only course codes arrive.data/professors.json
Counselor directoryFICTIONAL. 9 counselors, example.edu emails. Criteria: program areas, interests, target systems, special programs (Honors, EOPS, Puente, Umoja, Veterans), GPA focus, languages, modality, days, last-name assignment, availability.data/counselors.json

"ASSIST" appears in no user-facing string, status line, note or basis. The two old demo claims about the agreement site are marked Low.

Supported now (fast path: verified registry)

programIdProgramReqsSourcesNotes
usc-marshall-busUSC Marshall, Business Administration (B.S.)7USC brochure PDF, Marshall + Admission pagesIn-person lab rule. The WRIT 130 mapping (Transfer Planning Guide) is Low.
berkeley-haas-busUC Berkeley Haas, Business Administration (B.S.)11Haas transfer page3.0 GPA, 60 units. The articulation claim is Low.
stanford-econStanford, Economics (B.A.)6Stanford transfer pagesSAT/ACT required. ECON 1 credit is decided after admission (Low).
ucla-business-econUCLA, Business Economics (B.A.)13admission.ucla.edu, UC pages, TAG matrix PDFUC 2.4 hard minimum. The 3.2 GPA is a soft factor (hard:false).
ucsb-econUC Santa Barbara, Economics11UCSB selective-majors, econ.ucsb.edu, UC pages2.75 prep GPA across the screening courses.
uci-business-adminUC Irvine, Business Administration (B.A.)12admissions.uci.edu, catalogue.uci.edu, UC pages3.0 GPA. No TAG.
ucdavis-managerial-econUC Davis, Managerial Economics (B.S.)12UC Business Administration transfer pathway, UC Davis catalogWeakest program: Davis admissions pages return 403 to the fetcher. Course rules are Medium and the calculus mapping is Low.
sjsu-businessSan José State, Business Administration (B.S.)13sjsu.edu impaction, CSU eligibility, deadline pagesGolden Four, impaction courses, local-area GPA bump (Medium).

Any other school or program goes through discovery. Nothing is ever labeled "not supported". Without a configured model, a discovered target shows placeholders at Low confidence with the message "requirements are still being verified". An operator-level event names what is missing.

Model tiers: fast (Kimi) vs deep (Flower Endeavor)

TierEnvUsed for
deepLLM_DEEP_BASE_URL / LLM_DEEP_API_KEY / LLM_DEEP_MODEL (e.g. https://api.flower.ai/v1, flwrlabs/endeavor-1.0), LLM_DEEP_TIMEOUT_S (90)ALL research reasoning: discovery extraction, official-page URL finding, the live deep check (forced / source changed), final-check re-extraction of changed discovered pages. Default tier of llm.complete(..., tier="deep").
fastLLM_FAST_BASE_URL / LLM_FAST_API_KEY / LLM_FAST_MODEL (e.g. Nebius Token Factory Kimi)Interactive, non-research steps only (tier="fast"). No current research step uses it; counselor email drafting and re-verify are deterministic (no LLM).
frontierLLM_FRONTIER_* (unset by default)Optional research fallback when deep fails or times out.
  • Backward compatible: fast/deep without their own variables use the single legacy config (LLM_PROVIDER / FLWR_RUNTIME_* / LLM_MODEL). frontier never inherits it.
  • Fallback (never to fast): deep error/timeout → frontier if configured (event data.fellBack: true, data.model = model actually used, data.requestedModel) → otherwise the verified registry baseline for verified schools ("live re-check timed out — showing verified data") or a Low-confidence "still verifying" partial result for unknown schools.
  • Per-school fan-out: one deep sub-agent per school, all in parallel (COLLEAGENT_DEEP_CONCURRENCY, 5), each inside COLLEAGENT_SCHOOL_TIMEBOX_S (75 s). A school never shows "not supported".
  • Cache-first (default): ready programs (verified registry + discovery cache) are served immediately. Per program, in the background (recheck.py): FRESH (every source page fetched within COLLEAGENT_RECHECK_TTL_HOURS, default 168 = weekly; 24 = daily) → nothing, no fetch, no model ("Verified N days ago"); STALE → cheap recheck: re-fetch the source pages (COLLEAGENT_RECHECK_FETCH, live_fallback) and compare the stored contentHash — unchanged → "re-checked, no changes", NO model call; changed → "Source changed — re-verifying" and the deep model re-reads the live pages against the baseline. NEW programs (not cached) go through deep discovery. CLI/cron entry (not installed as a system cron): python -m colleagent_research recheck [--ttl-hours 24] [--force] [--program ID].
  • Force live (per request: POST /plans {"profile": …, "forceLive": true}, the Demo-tools toggle; or globally COLLEAGENT_DEEP_EVERY_RUN=1, default OFF): cached discovered programs are re-discovered live and every verified program gets the deep check → per requirement confirmed / changed (both texts kept, "Source changed since <verifiedAt>") / new / missing / unclear. Advisory only: it never rewrites the plan. A change or new rule is reported only with a verbatim quote found on the live official page.
  • Events: before each deep call the lane emits e.g. "Endeavor is reasoning through University of Michigan's official transfer pages…" with data.reasoning: true, data.model, data.modelLabel, data.tier, data.timeboxS. GET /health → llm.tiers: {fast, deep, frontier: {configured, model, label, source}} (never keys or URLs) and deepEveryRun.
  • Finding official pages without a search key: IPEDS gives the official domain; find_official_pages crawls the official home/admissions pages for links containing "transfer" (~2 s, deterministic), and only if that finds nothing asks the deep model for URLs on that domain + common transfer paths. Everything off the official domain is dropped. Bot-blocked sites (e.g. umich.edu returned 403) end as Low "still verifying".
  • Background completion: a school that runs out of its 75 s box keeps reading (COLLEAGENT_FINISH_IN_BACKGROUND=1, up to COLLEAGENT_BACKGROUND_TIMEBOX_S=150) and caches the result, so the next run of that school is instant. The live deep check of verified schools also uses the 150 s background box (nobody waits on it).
  • Latency knobs: COLLEAGENT_DEEP_CONTEXT_CHARS (8000), LLM_DEEP_REASONING_EFFORT (default low for Endeavor), one automatic retry on a transient 5xx (Endeavor returned intermittent 502 providers failed).
  • Measured 2026-09-29 (real keys, this Mac): Kimi smoke ~3 s; Endeavor smoke 7–15 s. 5 unfamiliar schools (Michigan, NYU, UT Austin, Georgia Tech, UW) in parallel: 2 of 5 finished inside the 75 s box (58 s, 65 s, 8 High-confidence rules each); NYU finished in the background at 148 s; UW timed out once and finished on the repeat run (92 s); Michigan's site refused automated reads (403) → Low "still verifying". Repeat run: cached schools instant (0.1 s). Maya's 3 verified schools, forced deep check in parallel: 76–119 s per school (p50 ~101 s), 7/6/10 confirmed, Berkeley 1 changed, 2–5 new rules each (all quote-checked on the live page).
  • Privacy: unchanged. Prompts carry only public school/program/major/college strings; official page text and public registry baselines travel as public_context; assert_public guards every tier.
  • Measured cheap recheck (live network, no model): Berkeley 0.8 s, Stanford 4.6 s, both "re-checked, no changes".
  • Disable / rollback: keep COLLEAGENT_DEEP_EVERY_RUN=0 and don't send forceLive (cache-first; deep only for new schools or changed sources); raise COLLEAGENT_RECHECK_TTL_HOURS to skip rechecks; unset the LLM_DEEP_*/LLM_FAST_* vars to return to the legacy single-model behaviour; or revert this PR (no data migrations; new plan fields deepChecks/deepEveryRun are additive).

See .env.example.

Transferability + UC TAG sub-agents (transfer.py, COLLEAGENT_FEATURE_TAG, default on)

Under each school's requirements lane: <school>.transferability checks every student course code against the college catalog's UC/CSU transfer status and the program's equivalency rules (consistent / conflict / not found); <school>.tag (UC targets) reads UC's official TAG matrix (participation, GPA minimum, units, filing window, major-exclusion mentions) with verbatim evidence. Equivalency sources are pluggable: the college catalog is implemented; the official transfer agreements are reported unavailable (automated access was refused, so nothing is scraped); national equivalency databases (e.g. Transferology) and schools' own transfer-credit lookup tools exist for institutions outside UC/CSU and are TODO, to be added only where their terms allow.

LLM and search providers (gitignored .env)

Put these in research-agent/.env or bridge/.env. Real environment variables win.

LLM_PROVIDER=flower        # flower (primary) | anthropic | openai | ollama | none (default)
LLM_MODEL=openai/gpt-5-nano   # optional; Flower default shown
SEARCH_PROVIDER=flower     # flower | brave | tavily | serper | llm | none; default: flower when LLM_PROVIDER=flower
# only for the optional thin clients:
# ANTHROPIC_API_KEY=…  OPENAI_API_KEY=…  OLLAMA_URL=http://127.0.0.1:11434  BRAVE_API_KEY=…  TAVILY_API_KEY=…  SERPER_API_KEY=…
  • flower (primary, fully implemented): Flower's model runtime through the OpenAI-compatible Responses API (openai SDK, max_retries=0). It uses FLWR_RUNTIME_BASE_URL + FLWR_RUNTIME_API_KEY. The Flower runtime sets both inside an AgentApp run, so discovery must run as the AgentApp (COLLEAGENT_RESEARCH_RUNTIME=flower on the bridge). Search uses Flower's built-in web_search connector, called through agent.connectors during the run.
  • The anthropic, openai and ollama providers are thin optional httpx clients. They only activate when they are selected and configured.
  • Privacy: prompts are built only from the school, program, major and college strings. Fetched official-page text is passed separately as public context. llm.assert_public refuses any prompt that contains an email, phone number, GPA, student ID, a grade next to a course code, or "transcript:".
  • llm.register(...) and search.register(...) install fakes. The tests use them for a deterministic discovery run.

Setup

cd ~/Yoda/colleagent/research-agent
python3 -m venv .tools && .tools/bin/pip install uv
UV_PYTHON=/opt/homebrew/bin/python3.12 .tools/bin/uv sync

Run

.venv/bin/python -m colleagent_research schools                        # ready programs
.venv/bin/python -m colleagent_research courses "micro"                # catalog search
.venv/bin/python -m colleagent_research plan --targets "ucla-business-econ,Harvard University — Economics" --codes "ECON C2001,MATH 003A"
.venv/bin/python -m colleagent_research plan --live                    # re-fetch every page (hash change detection)
.venv/bin/python -m colleagent_research reverify stan-test             # live re-check with cache fallback
.venv/bin/python -m colleagent_research warm                           # refresh cache/: excerpts kept, evidence found, changed/unchanged
.venv/bin/python scripts/verify_registry.py --live                     # every registry snippet on its page + equivalency codes in catalog
.venv/bin/python scripts/build_wvc_catalog.py [--live]                 # rebuild the WVC catalog (cache/wvc holds course-page main content only)
.venv/bin/python scripts/build_institutions.py                         # rebuild the IPEDS institution list
.venv/bin/python -m pytest -q                                          # 45 tests

Tests cover: packet guard; fact-check grades; every registry program verifying from cache; catalog; course search; target resolution; equivalency codes present in the catalog; honors variants; discovery end to end with a fake search and a fake model over mocked HTTP (High, Medium, citation repair, official-domain filter, cache fast path); placeholders with no "not supported" wording; relevance filtering (nav, footer and campus-life text dropped, pinned evidence kept); change detection; a "Source changed" event on a registry page; LLM privacy guard.

Flower AgentApp

# terminal 1: local SuperLink (no account)
PATH=$PWD/.venv/bin:$PATH FLWR_HOME=$PWD/.flwr-home .venv/bin/flower-superlink --insecure
# terminal 2
FLWR_HOME=$PWD/.flwr-home .venv/bin/flwr build                        # FAB ≈ 2.3 MB (catalog, registry, institutions, cache)
.venv/bin/python -m colleagent_research.flower_client                  # research task as an AgentApp run

Verified 2026-09-29: the bridge's full e2e ran with COLLEAGENT_RESEARCH_RUNTIME=flower against a local SuperLink. The plan run took 5.9 s and the whole flow 14.4 s. A local SuperLink has no model, so discovery there shows placeholders. Task JSON: {"task":"research"|"reverify"|"professors"|"status", ...}.

Sparsh-only steps

  1. cd ~/Yoda/colleagent/research-agent && .tools/bin/uv run flwr login supergrid (browser sign-in). This is what makes Flower's models and web_search available.
  2. Create research-agent/.env with LLM_PROVIDER=flower (and optionally LLM_MODEL=…, using whatever model the organizers name).
  3. Run research as the AgentApp on SuperGrid so discovery has the runtime model. For the bridge, SuperGrid needs the supergrid connection in flower_client.run_task, which is not wired yet. The tested path is a local SuperLink. To try discovery by hand: flwr chat → /load . → send a JSON task: {"task":"research","packet":{"college":"West Valley College","major":"Economics","targets":["Harvard University — Economics"],"courseCodes":[]}}.
  4. Alternative without Flower: set LLM_PROVIDER=anthropic + ANTHROPIC_API_KEY, and a search key (SEARCH_PROVIDER=brave + BRAVE_API_KEY), in .env.
  5. The morning of the demo: .venv/bin/python -m colleagent_research warm and scripts/verify_registry.py --live.

Canonical ids (colleagent_research/canonical.py)

Stdlib-only, deterministic, no network: canonical_institution(name_or_domain) -> {id: "ipeds-<UNITID>", unitid, name, domain, state, matchedBy} or None when unknown/ambiguous (institution_candidates() lists the options, institution_id_or_slug() falls back to slug-<name>); canonical_program(institution_id, name) -> {id, slug, name} (Econ / Economics, B.A. / economics major -> same slug); research_key(institution_id, slug) -> program:ipeds-110635:economics. Data: data/ipeds/hd.json (NCES IPEDS HD2024, see data/ipeds/README.md; rebuild with scripts/build_ipeds.py). VERIFIED_SCHOOL_IDS maps the 8 registry schools to their ids.

Shared knowledge store (public-only)

colleagent_research/knowledge.py is a separate SQLite (WAL) DB, research-agent/.knowledge/knowledge.db (ignored by version control; override with COLLEAGENT_KNOWLEDGE_DB), holding public institution/program/requirement/course/equivalency/source facts. It never lives in the bridge's private DB, and every write passes a fail-closed guard (forbidden keys, email/phone values). run_research reads it FIRST (see "Knowledge-first research" below).

  • await lookup_program(school, program, research=..., required=None, check_source=None, canonicalize=..., emit=...) reuses fresh facts, cheap-checks stale sources (check_source(url) -> (status, hash)), and calls research(gaps) only for missing/changed facts. Concurrent identical lookups share one research job. TTL: COLLEAGENT_KNOWLEDGE_TTL_DAYS (default 7).
  • Seed/bootstrap (idempotent): uv run python -m colleagent_research.knowledge_import.

Query-driven course lookup

await lookup_courses("Northwestern University", "intro cs", research=..., min_results=3) normalizes the topic query (lowercase, intro->introductory, cs->computer science, stopwords dropped), matches stored courses (code/title/description tokens), and returns them with zero research when >= min_results fresh matches exist or the same topic was researched within the TTL (remembered in course_queries). Otherwise it calls research(gap) once with {kind: "courses", institution_id, query, have: [codes]} (singleflight key courses:<institution_id>:<sorted tokens>, no student ids), keeps only rows with a source URL + evidence + confidence, and upserts them. Imported (verified) catalog rows never expire; researched rows follow COLLEAGENT_KNOWLEDGE_TTL_DAYS. Queries containing emails/phones/secrets are rejected.

Catalog acquisition (catalog_acquire.py)

lookup_courses(school, query, research=catalog_acquire.make_research(school)) is the real acquisition behind the store-first lookup. On a gap it: resolves the school's official domain(s) (school_resolve.official_domains if present, else the IPEDS directory), searches (search.py, provider-agnostic) restricted to those domains, ranks known catalog backends first (Acalog preview_course, CourseLeaf /courses/<subject>/, Kuali), fetches at most max_pages (6) via fetch_catalog_source(url) (http -> pdf; never raises; off-domain redirects dropped), parses course blocks deterministically, keeps courses matching the query, and merges duplicate codes. Fields not on the page stay absent (no invented codes/units/prereqs); every row carries source, contentHash, verifiedAt, an evidence snippet from the page and confidence (high = official backend + title + units/description; else medium). A deep-tier model extraction runs only when a page parses to nothing and only keeps claims whose evidence/code/units literally occur in the page text. Blocked pages yield partial results. Limitation: rows without a course code are skipped (the store is keyed by code). Tests: tests/test_catalog_acquire.py.

Runtime adapters + bench (knowledge_runtime.py, scripts/knowledge_bench.py)

knowledge_lookup(school, program, store=None, emit=None) wires lookup_program to real adapters (run_research uses lookup_program + its own shared-fetcher adapters, see below): check_source(url) = live GET into a throwaway cache dir (no model, no repo-cache writes; COLLEAGENT_FETCH_MODE=cache_only answers from the cached hash, never the network) -> ("ok"|"unreachable", hash); make_research() = existing discovery.discover for "*" gaps, and for specific stale/changed gaps a re-fetch of only that source plus factcheck.check of only those requirements (no rediscovery). With no model/search configured a "*" gap returns nothing (discovery's Low placeholders are dropped, never stored) and the status line says so. Gaps and labels pass assert_public / validate_packet (fail closed). Measured counters (agents, pages fetched, cache reads, model calls, source checks) are on research.counters and result["runtime"].

uv run python scripts/knowledge_bench.py prints a measured cold/warm table + JSON (scenarios A-F). Default is offline (real store/check_source/fact-check on the committed cache; the "*" discovery is a labeled SIMULATED stand-in). --live needs a configured model/search, else exits 2.

Knowledge-first research (knowledge_gate.py, research.run_research)

Every target is looked up in the store before any agent exists (store bootstrapped once from the verified registry + discovered JSON seeds + WVC catalog via knowledge_import.run). peek classifies fresh | stale | missing | forced without network or model; lookup_program (singleflight) does the rest: fresh -> facts only ("Found N verified facts in shared knowledge — no research agents needed"), stale -> per-source cheap check through the run's own fetcher (no model; unchanged -> mark_checked, changed -> only that source's facts re-fact-checked, recheck_facts), missing/forced -> ONE deep sub-agent per school (existing time box + background finish) whose result is fact-checked and upserted by knowledge_gate.record_program (the seam where live discovery writes into the store; the background completion path calls it from a done-callback). registry.save_discovered JSON is still written as a seed/for reverify. Verified programs keep using their registry object (identical requirements/events); store-only programs are rebuilt with program_from_store. Freshness = COLLEAGENT_RECHECK_DAYS (default 7; COLLEAGENT_RECHECK_TTL_HOURS alias), per SOURCE in recheck.py too (store last_checked_at, or the fetch-cache copy if newer); a recheck only re-reads facts tied to a changed source and settles unchanged sources in the store. Result carries knowledge per school and aggregated (hit, reusedFacts, staleFacts, refreshedFacts, newFacts, agentsLaunched, sourceChecks, sourceFetches, searchCalls, modelCalls, latencyMs, all counted at the real call sites). Known gap: when a source changed, the targeted re-review is the deterministic fact-checker; the model deep re-read of changed sources is not re-run through the store (the background deep check still runs for sources the store considers stale, or forceLive).

Random-school discovery (foundation, not wired into the live plan)

Acquisition engine for schools outside the 8 verified programs. Public labels in, normalized public facts out.

  • school_resolve.resolve_school(text) -> {status: resolved|ambiguous|unknown, canonicalName, ipedsUnitId, id, aliases, officialDomain, officialUrl, rule, candidates?} (offline, IPEDS + generic alias rules; "UW" is ambiguous with candidates).
  • discover_school.discover_school(school, program, ...) -> DiscoveryResult (.to_dict(), .to_knowledge()): search (official domain only) -> bounded fetch (temp cache, redirects stay official) -> llm.complete_ex(tier="deep") extraction; requirements without a verbatim quote in a fetched page are dropped. Timeouts/blocked pages give partial / still_verifying, never an exception.
  • discover_many.discover_many(items, max_concurrency=5, school_timeout_s=...) runs one isolated task per school; returns results + {fastest, median, slowest}.
  • scripts/rehearse_random_schools.py [--resolve-only] rehearses 10 varied schools; without a deep model + search it prints why and exits 2.
  • to_knowledge() output feeds KnowledgeStore.upsert_institution/upsert_program/upsert_source/upsert_requirements and matches the requirement shape knowledge_runtime.make_research returns (id,text,category,rule,source{label,url},evidence,confidence,content_hash). Nothing here writes to the production store or cache/.
  • Live runs need LLM_DEEP_* (or frontier) and a search provider; none were available when this was built, so only the offline path is measured.

Closed-loop random-school research (research_school.py)

await run_research_school({"task":"research_school","school":...,"program":...,"forceLive":bool,"fetchMode":...}, emitter) is the entry the Research AgentApp dispatches. It validates public inputs (extra/private keys or PII-looking labels raise PacketRejected), resolves the school via IPEDS, then calls knowledge.lookup_program (singleflight) with a research(gaps) callback: fresh -> facts from the store, 0 search/model/agents/fetches; stale -> per-source content-hash check, unchanged = 0 model, changed = only that source's facts re-fact-checked (no model); miss / forceLive -> acquire_rows (= discover_school: search -> official-domain filter -> fetch -> deep extraction grounded in fetched page text -> fact-check) and the rows are upserted by lookup_program's existing write path. forceLive never deletes; a failed refresh keeps prior facts and says so. Result = DiscoveryResult.normalized(): status complete|partial|still_verifying, institution, program, requirements[{category,text,rule,sourceUrl,evidence,confidence High|Medium|Low,confidenceReason,needsCounselorReview}], sources[{url,official,acquisitionMethod,foundVia,contentHash,fetchedAt,status}], research{searchProvider,extractionModel,modelRuntime,knowledgeHit,agentsLaunched,searchCalls,sourceFetches,modelCalls,latencyMs}, reasons. Search snippets are never facts; only fetched official pages (IPEDS domain + subdomains, or an explicit allowlist: built-ins + COLLEAGENT_SOURCE_ALLOWLIST, recorded as provenance) can ground one. searchProvider is unavailable (with a reason) when the Flower connector is not attached; a non-Flower provider is never labelled Flower. discover_school.RENDERERS is the (empty) hook where a Playwright renderer attaches for JS-heavy pages. Error text is scrubbed of env secret values / bearer tokens.

discover_many.research_many(items, ...): store lookups for all schools first, concurrent bounded research only for misses/stale/forced; a timed-out school is still_verifying, never an exception. The live plan (run_research) uses this acquisition instead of discovery.discover when COLLEAGENT_ACQUISITION=school (default off).

Operator flow: paste the Endeavor key (LLM_DEEP_API_KEY) in research-agent/.env, SEARCH_PROVIDER=flower, then uv run python scripts/research_doctor.py (config state only) and uv run python scripts/live_research_smoke.py --school "Idaho State University" --program "Computer Science" (runs cold then warm THROUGH the Research AgentApp on a local SuperLink so Flower web_search is used; --inprocess is the clearly labelled non-Flower mode). scripts/rehearse_random_schools.py [--schools FILE] [--repeat] prints per-school resolution/status/search/pages/requirements/H-M-L/cold-warm/agents/model calls/latency/reason.

Data this AgentApp expects (not included in the Flower Hub package)

Flower Hub limits uploads to 1 MB, so this package ships code only. The agent reads the data below from a data/ folder next to colleagent_research/. All of it is public; the full set lives in the project's GitHub repository (Stanford-Hackathon/Main-Repo, research-agent/data/). Without it the agent still starts, but school resolution needs data/ipeds/hd.json.

PathPurposeShape
data/ipeds/hd.jsonUS institution directory (NCES IPEDS) used to resolve a school and its official web domain{"columns": ["UNITID","INSTNM","IALIAS","CITY","STABBR","DOMAIN","ICLEVEL"], "rows": [[...], ...]}
data/institutions.jsonExtra school names / aliases for matching{"institutions": [{"unitid","name","city","state","web","domain","control","alias"}]}
data/colleges/<collegeId>/catalog.jsonThe home community college's public course catalog (course lookup){"college", "subjects": [...], "courses": [{"code","title","units","prerequisiteCodes","transfer","source","evidence", ...}]}
data/schools/<programId>.jsonVerified transfer requirements per target program, each with source URL, quoted evidence and confidenceone program per file
data/equivalency/<collegeId>/<programId>.jsonCourse equivalencies from the home college to a target programone program per file
data/aid/*.json, data/aid/schools/*.jsonPublished financial-aid programs (federal, state, college, target school) with sourcesone program per file

Private student data is never part of this package or its data: the research side only ever receives the college, major, public target labels and bare course codes.