← 返回
数据分析 中文

K3 Blockhain Agent Skill

Build automated blockchain analysis workflows on K3 — from natural language requests to deployed, running automations that fetch on-chain data, analyze it wi...
在K3上构建自动化区块链分析工作流——从自然语言请求到部署,运行自动化获取链上数据并进行分析
alexgrankinukr-hash
数据分析 clawhub v1.0.0 1 版本 99899.9 Key: 无需
★ 0
Stars
📥 998
下载
💾 14
安装
1
版本
#latest

概述

K3 Blockchain Agent

Transform requests like "Send me daily updates about the WETH/USDC pool on Uniswap"

into fully deployed workflows that fetch data, run AI analysis, and deliver reports

automatically.

Setup

This skill requires the K3 Development MCP to be connected. The MCP provides

tools like generateWorkflow, executeWorkflow, findAgentByFunctionality, and

others that let you create and manage blockchain workflows programmatically.

If the K3 MCP isn't connected yet, tell the user they need to add it before

proceeding. Once connected, verify by calling listTeamMcpServerIntegrations()

this confirms the connection and shows what data source integrations (TheGraph,

CoinGecko, etc.) the user's team has wired up. Every team's integrations will be

different — discover what's available rather than assuming.

How Workflow Building Works

The K3 orchestrator is conversational. You describe what you want in plain

language, and the orchestrator asks clarifying questions, then builds and deploys

the workflow. Your job is to show up with the right information so the conversation

is productive.

The loop:

UNDERSTAND → what does the user actually want?
FIND DATA  → how do we get that information into the workflow?
TEST       → does the data actually come back correctly?
BUILD      → give the orchestrator everything it needs
DEPLOY     → launch it and verify it works

Skipping "test" is the most common mistake — you end up with a deployed workflow

that returns empty data.

Step 1: Understand the Request

When a user asks for a workflow, figure out these parameters. Ask if anything is

unclear — don't guess on addresses or emails.

ParameterWhat to find outExamples
--------------------------------------
Data targetWhat blockchain data do they need?pool metrics, token price, wallet balance, NFT data
ProtocolWhich DeFi protocol or chain feature?Uniswap, Aave, SushiSwap, native transfers
ChainWhich blockchain?Ethereum, Arbitrum, Polygon, Base, Stellar
ScheduleHow often / what triggers it?daily, hourly, on-demand, on wallet activity, on contract event, Telegram chatbot
AnalysisWhat kind of insights?performance summary, anomaly alerts, trend report, trade signal
DeliveryHow should results arrive?email, Telegram, Slack, Google Sheets
ActionsShould the workflow do anything?execute a swap, transfer tokens, write to a contract
SpecificsAny addresses or IDs?pool address, token contract, wallet address

If the user is new to DeFi, briefly explain relevant concepts as you go (what TVL

means, what a liquidity pool is, etc.). Don't assume they know the jargon.

Step 2: Find the Right Data

This is the critical step. K3 has many ways to get data into a workflow, and you

need to figure out which approach works for the user's specific request.

K3 data functions

These are the built-in functions for getting data into a workflow. Read

references/node-types.md for full details on each.

FunctionWhat it does
-----------------------
Read APICall any REST/GraphQL API — the most flexible option
Read Smart ContractQuery any smart contract directly on-chain
Read Market DataGet token prices, volumes, market metrics
Read WalletWallet balances, transfers, transaction history
Read NFTNFT collections, floor prices, traits, holders
Read GraphQuery TheGraph subgraphs with custom GraphQL
Read DeploymentPull output from your own deployed code on K3
AI Web ScraperExtract structured data from any web page
AI Agent with toolsAI that dynamically decides what to fetch

How to find the data you need

The goal is to figure out the best way to get the specific data the user wants.

Think of it as problem-solving — there are multiple valid approaches and you

should explore them:

  1. Check what the team already has — call listTeamMcpServerIntegrations() to

see what MCP data sources are connected. If they have TheGraph, CoinGecko, or

other integrations set up, those are the easiest path.

  1. Search for existing templates — call findAgentByFunctionality() with the

user's intent. If someone already built a similar workflow, use it as a starting

point.

  1. Think about which K3 function fits:
    • Need on-chain contract data? → Read Smart Contract can query it directly
    • Need token prices or market data? → Read Market Data has it built in
    • Need complex DeFi metrics (TVL, volume, fees)? → Read Graph with the right

subgraph, or Read API to a protocol's analytics endpoint

  • Need wallet info? → Read Wallet for balances and history
  • Need NFT data? → Read NFT for collections and metadata
  • Need data from any public API? → Read API can call anything
  • Need to scrape a website? → AI Web Scraper can extract and structure it
  1. Search the web for the right endpoint. If you need a specific protocol's data,

look up {protocol name} API, {protocol name} subgraph, or `{protocol name}

GraphQL endpoint`. Many protocols publish public APIs and subgraphs.

  1. Ask the user — they may know the API endpoint, have an API key, or know

exactly which smart contract to read from.

The key insight: there's rarely just one way to get the data. A Uniswap pool's TVL

could come from Read Graph (subgraph query), Read API (calling an analytics endpoint),

or even Read Smart Contract (reading the pool contract directly). Pick whichever is

most reliable and gives you the data format you need.

Test before you build

Before constructing the full workflow, verify the data source actually returns

what you expect:

1. Create a minimal test workflow with generateWorkflow()
   — just a trigger + one data fetch step, nothing else
2. Deploy and run it with executeWorkflow()
3. Check the output with getWorkflowRunById() (set includeWorkflowData: true)
4. If the data looks right → proceed to full build
5. If empty or wrong → try a different approach and test again

This saves a lot of debugging later. A deployed workflow with bad data is worse

than no workflow.

Step 3: Build the Workflow

Now give the K3 orchestrator everything it needs. Use generateWorkflow() with

a detailed prompt that includes:

  • Trigger type and schedule (e.g., "runs daily" or "triggers on wallet activity")
  • Data source and how to query it (e.g., "use Read Graph to query pool X" or

"use Read Smart Contract to get the pair's reserves")

  • What the AI should analyze (e.g., "highlight TVL changes over 5%")
  • Any actions to take (e.g., "execute a swap on Uniswap if condition is met")
  • How to deliver results (e.g., "send Telegram alert" or "email the report")
  • Any MCP integration IDs the orchestrator needs (from team integrations)

Set deployWorkflow: false on the first call so you can review before deploying.

The orchestrator will likely ask follow-up questions — answer them using

editGeneratedWorkflow() with the same generatedWorkflowId. This back-and-forth

is normal; expect 2-4 rounds.

Once the configuration looks correct, call editGeneratedWorkflow() one final time

with deployWorkflow: true.

For the full list of available functions, triggers, AI models, and output options,

read references/node-types.md.

Step 4: Deploy and Verify

After deploying:

  1. Run it manually with executeWorkflow() to trigger an immediate test
  2. Check the run with getWorkflowRuns() or getWorkflowRunById()
  3. Verify the full chain: Did data fetch? Did AI analyze? Did notification send?

If something failed, use editGeneratedWorkflow() to fix it — you don't need to

start over. See references/troubleshooting.md for common issues.

Tell the user what happened: "Your workflow is live and will run daily. I just ran

a test — here's what the first report looks like: [summary]."

K3 MCP Tool Reference

ToolWhat it does
-------------------
generateWorkflowStart building a workflow from natural language
editGeneratedWorkflowContinue the conversation with the orchestrator
executeWorkflowRun a workflow manually
getWorkflowByIdGet workflow details and config
getWorkflowRunsList execution history
getWorkflowRunByIdGet a specific run's details and output
updateWorkflowPause/unpause a scheduled workflow
findAgentByFunctionalitySearch for existing workflow templates
listAgentTemplatesBrowse all available templates
getAgentTemplateByIdGet details on a specific template
listTeamMcpServerIntegrationsSee what data sources the team has connected
listMcpServerIntegrationsBrowse all available MCP data sources

Important Rules

  1. Always test data sources before building the full workflow. A quick test

fetch saves a lot of debugging time.

  1. The orchestrator is conversational — expect multiple rounds of back-and-forth

via editGeneratedWorkflow. That's how it's designed to work.

  1. Ask the user for anything you can't look up — never guess email addresses,

Telegram handles, or wallet addresses.

  1. Discover team integrations — call listTeamMcpServerIntegrations() to see

what's available. Every team is different.

  1. Verify workflows work before telling the user it's done. Run it, check the

output, confirm delivery.

  1. Be mindful of context — don't call many K3 MCP tools at once or dump large

responses. Fetch what you need, check it, move on.

  1. Use web search to find API endpoints, subgraph URLs, and smart contract

addresses when you don't know them. The web is your research tool.

Going Deeper

  • references/node-types.md — All trigger types, data functions, AI functions,

DeFi/trading actions, and notification options

  • references/data-sources.md — How to discover and evaluate data sources for

different blockchain data needs

  • references/workflow-patterns.md — Common workflow architectures and when to

use each one

  • references/troubleshooting.md — Diagnosing and fixing common workflow issues

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-29 09:40 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

data-analysis

Stock Analysis

udiedrichsen
{"answer":"基于雅虎财经数据,分析股票与加密货币。支持投资组合管理、自选股预警、股息分析、8维评分、热门趋势扫描及传闻/早期信号探测。适用于股票分析、持仓追踪、财报异动、加密监控、热门股追踪或提前发掘非主流传闻。"}
★ 270 📥 57,040
data-analysis

A股量化 AkShare

mbpz
A股量化数据分析工具,基于AkShare库获取A股行情、财务数据、板块信息等。用于回答关于A股股票查询、行情数据、财务分析、选股等问题。
★ 166 📥 60,295
data-analysis

Data Analysis

ivangdavila
{"answer":"数据分析与可视化。查询数据库、生成报告、自动化电子表格,将原始数据转化为清晰可行的见解。适用于:(1) 您……"}
★ 199 📥 65,287