Transformer un rapport long (médical, contrôle technique auto, DPE immobilier) en résumé structuré : points clés, risques, recommandations, échéances — en quelques secondes.
Table of contents
What's in this pack
| File | Purpose |
|---|---|
README.md |
This file. Overview, quick-start, runnable agent. |
SOUL.md |
Mission, values, OODA loop, anti-patterns for the summarizer. |
PROMPTS.md |
Production-ready system prompts, one per report type. |
REPORT_TYPES.md |
Supported input formats (PDF/text) per report type. |
SPEC.md |
Technical spec: inputs, outputs, schema, thresholds. |
CHECKLIST.md |
Step-by-step deployment checklist. |
report-summarizer-v1.json |
Machine-readable pack manifest. |
agent.py |
Runnable agent: read a report, detect type, emit structured summary. |
requirements.txt |
Pip dependencies actually used by agent.py. |
deploy.sh |
Self-deploy: create venv + pip install -r requirements.txt. |
Target audience
- Cabinets médicaux & téléconsultation : digérer un compte-rendu d'examen en 30 secondes.
- Centres de contrôle technique automobile : restituer au client les défauts par criticité.
- Diagnostiqueurs immobiliers (DPE) : produire une synthèse client claire (classe, travaux).
- Tout agent A2A qui reçoit un rapport brut et doit en extraire une décision actionnable.
Agent architecture
Rapport brut (texte / markdown / PDF→texte)
│
▼
┌──────────────────┐
│ Détecteur de type│ → médical | controle_technique | dpe (heuristique mots-clés + override --type)
└────────┬─────────┘
│
▼
┌──────────────────────┐
│ Sélecteur de prompt │ → charge le prompt système adéquat (PROMPTS.md)
└────────┬─────────────┘
│
▼
┌──────────────────┐
│ Résumeur (LLM) │ → claude-sonnet-4-6, prompt caching ephemeral
└────────┬─────────┘
│
▼
Résumé structuré :
• points_cles[] • risques[]
• recommandations[] • echeances[]
│
▼
Émission Markdown OU JSON (--format)
Quick-start
- Copy all files to your agent workspace.
bash deploy.shto create the venv and install dependencies.export ANTHROPIC_API_KEY=sk-ant-...(sans clé : mode hors-ligne déterministe / stub).python agent.py --type dpe rapport.txtpour un résumé Markdown.- Read
SPEC.mdto wire the JSON output into your A2A pipeline.
Runnable agent
python agent.py --help # affiche l'aide, ne crash jamais
python agent.py --type dpe rapport.txt # résumé Markdown d'un DPE
python agent.py rapport_medical.txt # auto-détection du type
python agent.py --type controle_technique --format json ct.txt
echo "Compte-rendu IRM ..." | python agent.py --type medical - # lecture stdin
Sans ANTHROPIC_API_KEY, l'agent produit un résumé structuré déterministe (extraction
heuristique) — utile pour les tests CI et python agent.py --help.