The Autonomous Stack

Documents & Content · PDF · v2.0

PDF Creator & Editor Pack v2.0

Crée des PDF depuis Markdown/JSON, modifie des PDF existants (fusion, ajout de page, filigrane, métadonnées), et extrait le contenu PDF vers JSON. Worker autonome avec queue, retry, dead-letter, BYO-LLM.

$3.00one-timePay with crypto

pdf document-generation merge watermark metadata extraction autonomous-agents

agent ⟶ theautonomousstack.xyz

01GET /api/v1/pack/pdf-creator-v1

402 Payment RequiredX-PAYMENT-REQUIRED

02sign TransferWithAuthorization3.00 USDC · Base (eip155:8453)

03GET + PAYMENT-SIGNATURE

200 OKapplication/zip · 24 files

pay per pack over x402no account

What's inside

Un agent autonome runnable qui crée des PDF depuis du Markdown/JSON/texte, modifie des PDF existants (fusion, ajout de page, filigrane, métadonnées), et extrait le contenu PDF vers JSON — en CLI ou en mode écoute.

Table of contents

  1. What's in this pack
  2. Target audience
  3. Agent architecture
  4. Quick-start
  5. Runnable agent

What's in this pack

File Purpose
README.md This file. Overview, quick-start, runnable agent.
SOUL.md Mission, valeurs, OODA loop, anti-patterns de l'agent PDF.
PROMPTS.md Prompts système prêts à l'emploi pour piloter l'agent en langage naturel.
SPEC.md Spec technique : sous-commandes, interfaces, codes de sortie.
CHECKLIST.md Checklist de déploiement pas-à-pas.
DEPLOYMENT.md Self-deploy (venv + deps) et mode « attente d'instructions ».
pdf_agent.py Agent runnable : create / modify / extract / listen.
requirements.txt Dépendances pip réellement utilisées par pdf_agent.py.
deploy.sh Self-deploy : venv + pip install -r requirements.txt + smoke-test.
pdf-creator-v1.json Manifest machine-readable du pack.

Target audience

Agent architecture

Instruction (CLI / stdin / JSON)
        │
        ▼
┌──────────────────┐
│ OBSERVE          │  → lire l'entrée (fichier .md/.json/.txt ou PDF source)
└────────┬─────────┘
         ▼
┌──────────────────┐
│ ORIENT           │  → détecter le type d'entrée + la commande (create | modify | extract)
└────────┬─────────┘
         ▼
┌──────────────────┐
│ DECIDE           │  → choisir le moteur : fpdf2 (riche) ou générateur pur-Python (offline)
└────────┬─────────┘
         ▼
┌──────────────────┐
│ ACT              │  → create : Markdown/JSON → PDF
│                  │  → modify : fusion / +page / filigrane / métadonnées (pypdf)
│                  │  → extract : PDF → JSON (texte + métadonnées)
└────────┬─────────┘
         ▼
┌──────────────────┐
│ VERIFY           │  → le PDF existe, démarre par %PDF, taille > 0
└──────────────────┘

Quick-start

  1. Copy all files to your agent workspace.
  2. bash deploy.sh to create the venv and install dependencies.
  3. python pdf_agent.py --help — affiche l'aide, aucun appel réseau, ne crash jamais.
  4. python pdf_agent.py create --in doc.md --out doc.pdf — premier PDF.
  5. Read SPEC.md to wire listen / JSON instructions into your A2A pipeline.

Runnable agent

python pdf_agent.py --help                                   # aide, jamais de crash
python pdf_agent.py create --in doc.md   --out doc.pdf        # Markdown → PDF
python pdf_agent.py create --in data.json --out data.pdf --title "Rapport"
python pdf_agent.py modify --in a.pdf --add b.pdf --out merged.pdf      # fusion
python pdf_agent.py modify --in a.pdf --watermark "CONFIDENTIEL" --out wm.pdf
python pdf_agent.py modify --in a.pdf --meta Title=Facture --meta Author=Bot --out m.pdf
python pdf_agent.py extract --in document.pdf --out document.json        # extraction JSON
echo 'create --in doc.md --out doc.pdf' | python pdf_agent.py listen     # mode écoute

Dépendances : fpdf2 (création riche, retour à la ligne) et pypdf (modification). Au lancement d'une action, l'agent vérifie/installe ses dépendances (désactivable via --no-install). Sans fpdf2 ni réseau, create bascule sur un générateur PDF pur-Python déterministe — utilisé par les tests et garanti hors-ligne. modify et extract requièrent pypdf.