diff --git a/docs/concepts/scoring.md b/docs/concepts/scoring.md index 46ee11d..10ab297 100644 --- a/docs/concepts/scoring.md +++ b/docs/concepts/scoring.md @@ -297,133 +297,12 @@ Agents meeting all thresholds receive a **"✅ Production ready"** recommendatio --- -## Using Scores in Your Application +## Using Scores -### CLI Validation +Scores are available via the CLI (`--json` for structured output) and the Python SDK (`validate_agent_card()`). -```bash -# Basic validation with scoring -capiscio validate agent-card.json - -# Include availability testing -capiscio validate https://agent.example.com --test-live - -# JSON output for CI/CD (includes all scores) -capiscio validate agent.json --json > results.json -``` - -!!! note "JSON Output" - Use `--json` to get structured output including `complianceScore`, `trustScore`, and availability results. - -[**See full CLI usage guide →**](../reference/cli/index.md) - -### Python API - -```python -from capiscio_sdk import secure, SecurityConfig - -# Wrap your agent with security -agent = secure(MyAgentExecutor(), SecurityConfig.production()) - -# Validate an agent card -result = await agent.validate_agent_card("https://partner.example.com") - -# Access scores -print(f"Compliance: {result.compliance.total}") # 0-100 -print(f"Trust: {result.trust.total}") # 0-100 -print(f"Availability: {result.availability.total}") # 0-100 or None - -# Use ratings for decisions -if result.trust.rating == TrustRating.HIGHLY_TRUSTED: - await process_payment(partner_url) -``` - -[**See full Python SDK guide →**](../reference/sdk-python/index.md) - ---- - -## Decision-Making Examples - -### Example 1: Production Deployment - -```python -result = await validate_agent_card(candidate_url) - -# Financial transactions: Require high trust AND compliance -if result.trust.rating == TrustRating.HIGHLY_TRUSTED and \ - result.compliance.total >= 90: - await process_payment(candidate_url) -else: - log_rejection(candidate_url, "Insufficient trust/compliance") - -# Data sync: Prioritize availability -if result.availability.rating == AvailabilityRating.FULLY_AVAILABLE: - await sync_data(candidate_url) -else: - schedule_retry(candidate_url) -``` - -### Example 2: Monitoring and Alerting - -```python -result = await validate_agent_card(partner_url) - -# Alert on trust degradation -if result.trust.total < 70: - alert("Partner trust score dropped", severity="HIGH") - # Possible causes: expired signatures, provider changes - -# Alert on availability issues -if result.availability.rating == AvailabilityRating.UNAVAILABLE: - alert("Partner unreachable", severity="MEDIUM") - failover_to_backup() - -# Log compliance warnings -if result.compliance.total < 80: - log_warning("Partner has compliance issues", result.issues) -``` - -### Example 3: Agent Selection - -```python -# Rank multiple candidates by weighted score -candidates = [await validate_agent_card(url) for url in urls] - -def score_for_payments(result): - return ( - result.trust.total * 0.5 + # Trust matters most - result.compliance.total * 0.3 + # Compliance important - (result.availability.total or 0) * 0.2 # Availability nice-to-have - ) - -best_agent = max(candidates, key=score_for_payments) -``` - ---- - -## Migration from Single Score - -If you're migrating from the legacy single-score system: - -### Old API (Deprecated) - -```python -result = validator.validate(agent_card) -if result.score >= 80: - deploy_agent() -``` - -### New API (Current) - -```python -result = validator.validate(agent_card) - -# Be specific about what matters -if result.compliance.total >= 90 and result.trust.total >= 80: - deploy_agent() -``` - -The old `result.score` property still exists but returns `compliance.total` and is deprecated. Use the three dimensions for all new code. +- [**CLI validation reference →**](../reference/cli/index.md) +- [**Python SDK reference →**](../reference/sdk-python/index.md) --- diff --git a/docs/concepts/validation.md b/docs/concepts/validation.md index 946d74d..1632e50 100644 --- a/docs/concepts/validation.md +++ b/docs/concepts/validation.md @@ -263,43 +263,6 @@ Each skill in the `skills` array must have: - Registry submission - Compliance verification -### Conservative Mode - -=== "Command" - - ```bash - capiscio validate agent.json --conservative - ``` - -=== "Output" - - ```ansi - ✅ BASIC VALIDATION PASSED - - Mode: Conservative (minimal) - - ┌───────────────────────────────────────┐ - │ Score: 60/100 │ - │ Checks: 5 passed, 0 failed │ - └───────────────────────────────────────┘ - - ✓ Basic schema structure valid - ✓ Required fields present - - ℹ️ Skipped: endpoint testing, security checks - ``` - -**Characteristics:** -- Minimal validation requirements -- Basic schema structure checking -- Optional endpoint testing -- Permissive security requirements - -**Use Cases:** -- Early development -- Legacy agent support -- Basic structure validation - ## Advanced Feature Detection ### Legacy Endpoint Handling diff --git a/docs/getting-started/index.md b/docs/getting-started/index.md index f7d94de..6778527 100644 --- a/docs/getting-started/index.md +++ b/docs/getting-started/index.md @@ -60,41 +60,6 @@ Get a complete agent identity in **under 60 seconds**: --- -## Choose Your Setup Path - -