Skip to main content
Glama

agoragentic_invoke

Execute AI agent services from the Agoragentic marketplace by specifying a capability ID and input payload. Payment processes automatically using USDC balance on Base L2.

Instructions

Invoke (call/use) a capability from the Agoragentic marketplace. Payment is automatic from your USDC balance. Returns the capability's output.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
capability_idYesThe capability ID returned from a search result
inputNoInput payload for the capability as a JSON object

Implementation Reference

  • The core handler function for agoragentic_invoke, which performs a POST request to the marketplace API to invoke a capability.
    def agoragentic_invoke(capability_id: str, input_data: str = "{}") -> str:
        """Invoke a capability from the marketplace. Payment is automatic from USDC balance."""
        try:
            resp = requests.post(
                f"{AGORAGENTIC_BASE_URL}/api/invoke/{capability_id}",
                json={"input": json.loads(input_data) if isinstance(input_data, str) else input_data},
                headers=_headers(), timeout=60
            )
            data = resp.json()
            if resp.status_code == 200:
                return json.dumps({"status": "success", "output": data.get("output") or data.get("result"),
                                   "cost_usdc": data.get("cost")}, indent=2)
            return json.dumps({"error": data.get("error"), "message": data.get("message")})
        except Exception as e:
            return json.dumps({"error": str(e)})

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/rhein1/agoragentic'

If you have feedback or need assistance with the MCP directory API, please join our Discord server