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.
| Parameter |
What to find out |
Examples |
| Data target |
What blockchain data do they need? |
pool metrics, token price, wallet balance, NFT data |
| Protocol |
Which DeFi protocol or chain feature? |
Uniswap, Aave, SushiSwap, native transfers |
| Chain |
Which blockchain? |
Ethereum, Arbitrum, Polygon, Base, Stellar |
| Schedule |
How often / what triggers it? |
daily, hourly, on-demand, on wallet activity, on contract event, Telegram chatbot |
| Analysis |
What kind of insights? |
performance summary, anomaly alerts, trend report, trade signal |
| Delivery |
How should results arrive? |
email, Telegram, Slack, Google Sheets |
| Actions |
Should the workflow do anything? |
execute a swap, transfer tokens, write to a contract |
| Specifics |
Any 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.
| Function |
What it does |
| Read API |
Call any REST/GraphQL API — the most flexible option |
| Read Smart Contract |
Query any smart contract directly on-chain |
| Read Market Data |
Get token prices, volumes, market metrics |
| Read Wallet |
Wallet balances, transfers, transaction history |
| Read NFT |
NFT collections, floor prices, traits, holders |
| Read Graph |
Query TheGraph subgraphs with custom GraphQL |
| Read Deployment |
Pull output from your own deployed code on K3 |
| AI Web Scraper |
Extract structured data from any web page |
| AI Agent with tools |
AI 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:
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.
Search for existing templates — call findAgentByFunctionality() with the
user's intent. If someone already built a similar workflow, use it as a starting
point.
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
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.
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:
- Run it manually with
executeWorkflow() to trigger an immediate test
- Check the run with
getWorkflowRuns() or getWorkflowRunById()
- 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
| Tool |
What it does |
generateWorkflow |
Start building a workflow from natural language |
editGeneratedWorkflow |
Continue the conversation with the orchestrator |
executeWorkflow |
Run a workflow manually |
getWorkflowById |
Get workflow details and config |
getWorkflowRuns |
List execution history |
getWorkflowRunById |
Get a specific run's details and output |
updateWorkflow |
Pause/unpause a scheduled workflow |
findAgentByFunctionality |
Search for existing workflow templates |
listAgentTemplates |
Browse all available templates |
getAgentTemplateById |
Get details on a specific template |
listTeamMcpServerIntegrations |
See what data sources the team has connected |
listMcpServerIntegrations |
Browse all available MCP data sources |
Important Rules
- Always test data sources before building the full workflow. A quick test
fetch saves a lot of debugging time.
- The orchestrator is conversational — expect multiple rounds of back-and-forth
via
editGeneratedWorkflow. That's how it's designed to work.
- Ask the user for anything you can't look up — never guess email addresses,
Telegram handles, or wallet addresses.
- Discover team integrations — call
listTeamMcpServerIntegrations() to see
what's available. Every team is different.
- Verify workflows work before telling the user it's done. Run it, check the
output, confirm delivery.
- 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.
- 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---2name: k3-blockchain-agent3description: Build automated blockchain analysis workflows on K3 — from natural language requests to deployed, running automations that fetch on-chain data, analyze it with AI, and deliver insights via email, Telegram, or Slack. Use this skill whenever the user mentions blockchain workflows, on-chain analytics, DeFi monitoring, token tracking, wallet alerts, pool analysis, protocol dashboards, NFT tracking, automated trading, smart contract monitoring, or wants to automate anything involving blockchain data. Also trigger when the user mentions K3, workflow builder, or wants scheduled crypto/DeFi reports. Even if they just say "monitor this wallet" or "track this token" — this skill applies.4---5
6# K3 Blockchain Agent
7
8Transform requests like *"Send me daily updates about the WETH/USDC pool on Uniswap"*
9into fully deployed workflows that fetch data, run AI analysis, and deliver reports
10automatically.
11
12## Setup
13
14This skill requires the **K3 Development MCP** to be connected. The MCP provides
15tools like `generateWorkflow`, `executeWorkflow`, `findAgentByFunctionality`, and
16others that let you create and manage blockchain workflows programmatically.
17
18If the K3 MCP isn't connected yet, tell the user they need to add it before
19proceeding. Once connected, verify by calling `listTeamMcpServerIntegrations()` —
20this confirms the connection and shows what data source integrations (TheGraph,
21CoinGecko, etc.) the user's team has wired up. Every team's integrations will be
22different — discover what's available rather than assuming.
23
24## How Workflow Building Works
25
26The K3 orchestrator is **conversational**. You describe what you want in plain
27language, and the orchestrator asks clarifying questions, then builds and deploys
28the workflow. Your job is to show up with the right information so the conversation
29is productive.
30
31The loop:
32
33```
34UNDERSTAND → what does the user actually want?
35FIND DATA → how do we get that information into the workflow?
36TEST → does the data actually come back correctly?
37BUILD → give the orchestrator everything it needs
38DEPLOY → launch it and verify it works
39```
40
41Skipping "test" is the most common mistake — you end up with a deployed workflow
42that returns empty data.
43
44## Step 1: Understand the Request
45
46When a user asks for a workflow, figure out these parameters. Ask if anything is
47unclear — don't guess on addresses or emails.
48
49| Parameter | What to find out | Examples |
50|-----------|-----------------|----------|
51| **Data target** | What blockchain data do they need? | pool metrics, token price, wallet balance, NFT data |
52| **Protocol** | Which DeFi protocol or chain feature? | Uniswap, Aave, SushiSwap, native transfers |
53| **Chain** | Which blockchain? | Ethereum, Arbitrum, Polygon, Base, Stellar |
54| **Schedule** | How often / what triggers it? | daily, hourly, on-demand, on wallet activity, on contract event, Telegram chatbot |
55| **Analysis** | What kind of insights? | performance summary, anomaly alerts, trend report, trade signal |
56| **Delivery** | How should results arrive? | email, Telegram, Slack, Google Sheets |
57| **Actions** | Should the workflow do anything? | execute a swap, transfer tokens, write to a contract |
58| **Specifics** | Any addresses or IDs? | pool address, token contract, wallet address |
59
60If the user is new to DeFi, briefly explain relevant concepts as you go (what TVL
61means, what a liquidity pool is, etc.). Don't assume they know the jargon.
62
63## Step 2: Find the Right Data
64
65This is the critical step. K3 has many ways to get data into a workflow, and you
66need to figure out which approach works for the user's specific request.
67
68### K3 data functions
69
70These are the built-in functions for getting data into a workflow. Read
71`references/node-types.md` for full details on each.
72
73| Function | What it does |
74|----------|-------------|
75| **Read API** | Call any REST/GraphQL API — the most flexible option |
76| **Read Smart Contract** | Query any smart contract directly on-chain |
77| **Read Market Data** | Get token prices, volumes, market metrics |
78| **Read Wallet** | Wallet balances, transfers, transaction history |
79| **Read NFT** | NFT collections, floor prices, traits, holders |
80| **Read Graph** | Query TheGraph subgraphs with custom GraphQL |
81| **Read Deployment** | Pull output from your own deployed code on K3 |
82| **AI Web Scraper** | Extract structured data from any web page |
83| **AI Agent with tools** | AI that dynamically decides what to fetch |
84
85### How to find the data you need
86
87The goal is to figure out the best way to get the specific data the user wants.
88Think of it as problem-solving — there are multiple valid approaches and you
89should explore them:
90
911. **Check what the team already has** — call `listTeamMcpServerIntegrations()` to
92 see what MCP data sources are connected. If they have TheGraph, CoinGecko, or
93 other integrations set up, those are the easiest path.
94
952. **Search for existing templates** — call `findAgentByFunctionality()` with the
96 user's intent. If someone already built a similar workflow, use it as a starting
97 point.
98
993. **Think about which K3 function fits**:
100 - Need on-chain contract data? → **Read Smart Contract** can query it directly
101 - Need token prices or market data? → **Read Market Data** has it built in
102 - Need complex DeFi metrics (TVL, volume, fees)? → **Read Graph** with the right
103 subgraph, or **Read API** to a protocol's analytics endpoint
104 - Need wallet info? → **Read Wallet** for balances and history
105 - Need NFT data? → **Read NFT** for collections and metadata
106 - Need data from any public API? → **Read API** can call anything
107 - Need to scrape a website? → **AI Web Scraper** can extract and structure it
108
1094. **Search the web** for the right endpoint. If you need a specific protocol's data,
110 look up `{protocol name} API`, `{protocol name} subgraph`, or `{protocol name}
111 GraphQL endpoint`. Many protocols publish public APIs and subgraphs.
112
1135. **Ask the user** — they may know the API endpoint, have an API key, or know
114 exactly which smart contract to read from.
115
116The key insight: there's rarely just one way to get the data. A Uniswap pool's TVL
117could come from Read Graph (subgraph query), Read API (calling an analytics endpoint),
118or even Read Smart Contract (reading the pool contract directly). Pick whichever is
119most reliable and gives you the data format you need.
120
121### Test before you build
122
123Before constructing the full workflow, verify the data source actually returns
124what you expect:
125
126```
1271. Create a minimal test workflow with generateWorkflow()
128 — just a trigger + one data fetch step, nothing else
1292. Deploy and run it with executeWorkflow()
1303. Check the output with getWorkflowRunById() (set includeWorkflowData: true)
1314. If the data looks right → proceed to full build
1325. If empty or wrong → try a different approach and test again
133```
134
135This saves a lot of debugging later. A deployed workflow with bad data is worse
136than no workflow.
137
138## Step 3: Build the Workflow
139
140Now give the K3 orchestrator everything it needs. Use `generateWorkflow()` with
141a detailed prompt that includes:
142
143- **Trigger type and schedule** (e.g., "runs daily" or "triggers on wallet activity")
144- **Data source and how to query it** (e.g., "use Read Graph to query pool X" or
145 "use Read Smart Contract to get the pair's reserves")
146- **What the AI should analyze** (e.g., "highlight TVL changes over 5%")
147- **Any actions to take** (e.g., "execute a swap on Uniswap if condition is met")
148- **How to deliver results** (e.g., "send Telegram alert" or "email the report")
149- **Any MCP integration IDs** the orchestrator needs (from team integrations)
150
151Set `deployWorkflow: false` on the first call so you can review before deploying.
152
153The orchestrator will likely ask follow-up questions — answer them using
154`editGeneratedWorkflow()` with the same `generatedWorkflowId`. This back-and-forth
155is normal; expect 2-4 rounds.
156
157Once the configuration looks correct, call `editGeneratedWorkflow()` one final time
158with `deployWorkflow: true`.
159
160For the full list of available functions, triggers, AI models, and output options,
161read `references/node-types.md`.
162
163## Step 4: Deploy and Verify
164
165After deploying:
166
1671. **Run it manually** with `executeWorkflow()` to trigger an immediate test
1682. **Check the run** with `getWorkflowRuns()` or `getWorkflowRunById()`
1693. **Verify the full chain**: Did data fetch? Did AI analyze? Did notification send?
170
171If something failed, use `editGeneratedWorkflow()` to fix it — you don't need to
172start over. See `references/troubleshooting.md` for common issues.
173
174Tell the user what happened: "Your workflow is live and will run daily. I just ran
175a test — here's what the first report looks like: [summary]."
176
177## K3 MCP Tool Reference
178
179| Tool | What it does |
180|------|-------------|
181| `generateWorkflow` | Start building a workflow from natural language |
182| `editGeneratedWorkflow` | Continue the conversation with the orchestrator |
183| `executeWorkflow` | Run a workflow manually |
184| `getWorkflowById` | Get workflow details and config |
185| `getWorkflowRuns` | List execution history |
186| `getWorkflowRunById` | Get a specific run's details and output |
187| `updateWorkflow` | Pause/unpause a scheduled workflow |
188| `findAgentByFunctionality` | Search for existing workflow templates |
189| `listAgentTemplates` | Browse all available templates |
190| `getAgentTemplateById` | Get details on a specific template |
191| `listTeamMcpServerIntegrations` | See what data sources the team has connected |
192| `listMcpServerIntegrations` | Browse all available MCP data sources |
193
194## Important Rules
195
1961. **Always test data sources** before building the full workflow. A quick test
197 fetch saves a lot of debugging time.
1982. **The orchestrator is conversational** — expect multiple rounds of back-and-forth
199 via `editGeneratedWorkflow`. That's how it's designed to work.
2003. **Ask the user for anything you can't look up** — never guess email addresses,
201 Telegram handles, or wallet addresses.
2024. **Discover team integrations** — call `listTeamMcpServerIntegrations()` to see
203 what's available. Every team is different.
2045. **Verify workflows work** before telling the user it's done. Run it, check the
205 output, confirm delivery.
2066. **Be mindful of context** — don't call many K3 MCP tools at once or dump large
207 responses. Fetch what you need, check it, move on.
2087. **Use web search** to find API endpoints, subgraph URLs, and smart contract
209 addresses when you don't know them. The web is your research tool.
210
211## Going Deeper
212
213- `references/node-types.md` — All trigger types, data functions, AI functions,
214 DeFi/trading actions, and notification options
215- `references/data-sources.md` — How to discover and evaluate data sources for
216 different blockchain data needs
217- `references/workflow-patterns.md` — Common workflow architectures and when to
218 use each one
219- `references/troubleshooting.md` — Diagnosing and fixing common workflow issues