agentsvc.io

services / agent-run

textoperational · 3091 ms

Task Agent with Tools (AI)

Hand off a whole research or lookup task in one call: a Claude Haiku 5.5 agent plans the steps, calls up to 38 agentsvc.io tools in parallel (web and news search, page reading, papers, GitHub and npm, company registers and sanctions, crypto prices, token checks, DeFi TVL and yields, wallets, FX and macro data, weather, DNS, WHOIS, SSL, CVEs) and returns a Markdown answer with sources and the list of tool calls it made. Up to 12 steps and about 90 seconds. Read only: it cannot spend money or send anything. Example: compare two DeFi protocols, check a company and its domain, or summarize what changed this week on a topic. AI-written, check the sources.

Run free trial ↗3 free calls per day with the example input. Paid: $0.500 USDC, no limit.

Call it

import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client();
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.EVM_PRIVATE_KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);

const res = await payFetch("https://agentsvc.io/api/v1/proxy/agent-run", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({"task":"What is the TVL of Aave and Morpho right now? Answer in two sentences.","max_steps":4}),
});
const { data, payment } = await res.json();  // payment.status "settling"; header X-Payment-Settle: sync returns payment.transaction

Input

FieldTypeDescription
task *stringWhat to find out or do, in plain words, max 4000 characters
max_stepsinteger = 8Upper limit of model rounds

Output

FieldTypeDescription
answer_markdownstring
stepsarray
tools_usedarray
usageobject
modelstring
notestring

Example response (data)

{
  "answer_markdown": "Aave's TVL is about $16.8B on Aave V3 (the largest version, with $13.9B on Ethereum), plus about $0.65B on Aave V4 and $0.26B on Aave Horizon RWA, for roughly $17.7B in total across Aave's lending deployments. Morpho's TVL is about $11.0B on Morpho Blue (Ethereum $5.0B, Base $4.4B) plus about $7.4M on Morpho Midnight, as of DefiLlama's 2026-10-15 10:32 UTC snapshot.\n\nSources:\n- DefiLlama via defi-tvl tool, protocol mode: aave\n- DefiLlama via defi-tvl tool, protocol mode: morpho",
  "steps": [
    {
      "tool": "defi-tvl",
      "input": {
        "mode": "protocol",
        "protocol": "aave"
      },
      "ok": true,
      "ms": 460
    },
    {
      "tool": "defi-tvl",
      "input": {
        "mode": "protocol",
        "protocol": "morpho"
      },
      "ok": true,
      "ms": 617
    }
  ],
  "tools_used": [
    "defi-tvl"
  ],
  "usage": {
    "tool_calls": 2,
    "model_input_tokens": 28176,
    "model_output_tokens": 397,
    "seconds": 3.7
  },
  "model": "claude-haiku-5-5",
  "note": "AI-written from tool data; check the sources before acting on it."
}