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 - -
- -- :material-rocket-launch:{ .lg .middle } **Path 1: Quick Start (Recommended)** - - --- - - Just use your API key. We auto-discover your agent. - - ```bash - export CAPISCIO_API_KEY=sk_live_... - capiscio init - ``` - - **Best for:** Getting started fast, single-agent setups, demos. - -- :material-view-dashboard:{ .lg .middle } **Path 2: UI-First** - - --- - - Create your agent in the dashboard first, then initialize. - - ```bash - # 1. Create agent at app.capisc.io → get agent ID - # 2. Initialize with specific agent - capiscio init --agent-id agt_abc123 - ``` - - **Best for:** Teams, production, multiple agents per org. - -
- ---- - ## What You Get After running `capiscio init`, your `.capiscio/` directory contains: diff --git a/docs/identity/index.md b/docs/identity/index.md index ae90877..ee1931f 100644 --- a/docs/identity/index.md +++ b/docs/identity/index.md @@ -62,53 +62,7 @@ This identity: - ✅ **Works everywhere** — W3C standard, interoperable - ✅ **Scales trust** — Link to organizational verification ---- - -## Choose Your Setup Path - -
- -- :material-rocket-launch:{ .lg .middle } **Path 1: Quick Start (Recommended)** - - --- - - Just use your API key. We handle everything. - - ```bash - export CAPISCIO_API_KEY=sk_live_... - capiscio init - ``` - - **Best for:** Getting started fast, single-agent setups. - -- :material-view-dashboard:{ .lg .middle } **Path 2: UI-First** - - --- - - Create your agent in the dashboard first. - - ```bash - # 1. Create agent at app.capisc.io - # 2. Initialize with specific ID - capiscio init --agent-id agt_abc123 - ``` - - **Best for:** Teams, production, multiple agents. - -- :material-laptop:{ .lg .middle } **Path 3: Local Only** - - --- - - Generate keys without server registration. - - ```bash - capiscio init --output-dir .capiscio - # No API key needed - ``` - - **Best for:** Offline dev, testing, self-hosted. - -
+[:octicons-arrow-right-24: Full setup instructions](../getting-started/index.md) --- @@ -194,35 +148,6 @@ Trust Level 0 Trust Level 1-2 Trust Level 3-4 --- -## Using Your Identity - -### Python SDK - -```python -from capiscio_sdk import CapiscIO, secure - -# Get your identity -agent = CapiscIO.connect(api_key="sk_live_...") - -# Use it to secure your agent -secured_agent = secure(MyAgentExecutor()) - -# Emit events with your identity -agent.emit("task_started", {"task_id": "123"}) -``` - -### CLI - -```bash -# View your identity -cat .capiscio/did.txt - -# Validate that identity is properly configured -capiscio validate agent-card.json -``` - ---- - ## Next Steps
diff --git a/docs/index.md b/docs/index.md index 4354e86..1453af4 100644 --- a/docs/index.md +++ b/docs/index.md @@ -4,9 +4,6 @@ description: Verifiable identity and trust for the Agent-to-Agent (A2A) Protocol keywords: A2A protocol, AI agent identity, DID, decentralized identifier, agent trust, trust badges, agent registry og:image: https://docs.capisc.io/assets/social-card-home.png canonical_url: https://docs.capisc.io/ -hide: - - navigation - - toc ---