Skip to content

[Feature] Clarvia AEO quality gate for external tool calls #425

@digitamaz

Description

@digitamaz

Feature Suggestion: Pre-flight AEO Check Before Tool Execution

Hi XAgent team! I wanted to share a quality improvement idea for tool calls.

The Problem

When XAgent calls external APIs, CLIs, or MCP servers, there's currently no way to know if the target service is reliable for autonomous agent use. Poorly-designed APIs cause agent failures that are hard to debug:

  • No rate limiting → agent gets blocked mid-task
  • Missing structured errors → agent can't interpret failures
  • Ambiguous docs → agent misuses parameters

The Solution

Clarvia provides AEO (Agent Experience Optimization) scores measuring how agent-ready any tool is (0-100). A quick pre-flight check would:

  1. Score the target before the first call (GET /v1/score?url={tool_url})
  2. Log a warning if below a threshold (e.g., score < 50 = AGENT_HOSTILE)
  3. Optionally surface improvement suggestions to the user

Quick Integration

import httpx

def aeo_check(url: str) -> dict:
    resp = httpx.get(f"https://clarvia-api.onrender.com/v1/score?url={url}")
    return resp.json()  # {"clarvia_score": 72, "rating": "AGENT_FRIENDLY", ...}

# Example output: {"clarvia_score": 23, "rating": "AGENT_HOSTILE", "issues": ["No OpenAPI spec", "No rate limit headers"]}

Free API (no key needed): https://clarvia-api.onrender.com/docs
27,843+ indexed tools already scored

Would this fit XAgent's design philosophy? Happy to contribute a pull request if useful!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions