Strict Mode for Production¶
Use strict validation to ensure your agent card follows all A2A best practices before going live.
Problem¶
You want to enforce the highest quality standards before deploying:
- All recommended fields should be present
- No warnings allowed
- Full compliance with A2A specification
Solution¶
What Strict Mode Does¶
| Normal Mode | Strict Mode |
|---|---|
| Validates required fields | Validates required AND recommended fields |
| Warnings don't fail | Warnings ARE errors |
| Flexible on optional fields | Expects completeness |
| Score threshold: pass at 60+ | Score threshold: pass at 85+ |
Example Output¶
$ capiscio validate ./agent-card.json --strict
❌ Validation Failed (Strict Mode)
Score: 72/100 (Minimum required: 85)
Errors:
• Missing recommended field: skills[0].inputModes
• Missing recommended field: skills[1].outputModes
• Provider.url should use HTTPS
• Missing optional but recommended: version
Run without --strict to see the difference.
CI/CD Integration¶
Add strict validation to your GitHub Actions:
.github/workflows/validate.yml
- name: Validate (Strict)
uses: capiscio/validate-a2a@v1
with:
agent-card: './agent-card.json'
strict: true
Progressive Strategy¶
Use different modes for different environments:
.github/workflows/validate.yml
jobs:
validate:
strategy:
matrix:
include:
- branch: develop
strict: false
- branch: main
strict: true
steps:
- uses: capiscio/validate-a2a@v1
if: github.ref == format('refs/heads/{0}', matrix.branch)
with:
strict: ${{ matrix.strict }}
How It Works¶
Strict mode elevates the validation rules:
- Recommended → Required: Fields marked "recommended" in the A2A spec are treated as required
- Warnings → Errors: Any warning becomes a blocking error
- Higher Threshold: The compliance score must be 85+ instead of 60+
- Complete Skills: All skill fields must be fully populated
See Also¶
- Schema-Only Mode — Quick syntax check
- CI/CD Quickstart — Set up automated validation
- Scoring System — Understand the scores