agents¶
knowledge_graph.clinical.agents
codex exec agent jobs with schema output, validation feedback, and bounded parallelism.
Used by the Synthetic-100 generation (synthetic) and annotation (annotation, hpo_annotation) stages.
read_response(path)
¶
Return a decoded response and retry feedback for missing or malformed JSON.
Source code in src/knowledge_graph/clinical/agents.py
12 13 14 15 16 17 18 19 20 | |
agent(job, prompt, accept, args, semaphore, *, attempts, followup)
async
¶
Run codex exec in the job directory until accept(response) reports no errors; errors go into the next prompt.
Source code in src/knowledge_graph/clinical/agents.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | |
bullet_feedback(header, lines)
¶
Source code in src/knowledge_graph/clinical/agents.py
44 45 | |
run(jobs, args)
¶
Run job coroutine factories with at most args.max_parallel at a time; exit status 1 when any job fails.
Source code in src/knowledge_graph/clinical/agents.py
48 49 50 51 52 53 54 55 | |