Processing Agent
The Processing agent executes the distillcore pipeline using the configuration recommended by the Triage agent.
Tools
| Tool | API | Description |
|---|---|---|
process_document | process_document_async() | Run full 7-stage pipeline |
save_result | Store.save() | Persist result to storage |
Output: ProcessingDecision
class ProcessingDecision(BaseModel):
source_filename: str
document_type: str
document_title: str
page_count: int
section_count: int
chunk_count: int
structuring_coverage: float
chunking_coverage: float
end_to_end_coverage: float
validation_passed: bool
warnings: list[str]
document_id: str
reasoning: strHow It Works
- Receives the
TriageDecisionas context - Builds a
DistillConfigfrom triage recommendations (preset, chunk size, strategy, min_tokens, OCR, etc.) - Calls
process_documentwith the configured pipeline — includingChunkConfig(strategy=, min_tokens=)from triage - Calls
save_resultto persist the processed document - Returns coverage metrics and document metadata