Zum Inhalt springen

Agent Creation

Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.

Get Started

Drop this into ~/.claude/skills/flowmcp-agent-creation/SKILL.md:

---
name: flowmcp-agent-creation
description: Help a user build a FlowMCP-driven AI agent — schema selection, skill definition, LLM loop
---
# FlowMCP Agent Creation
Use this skill when a user wants to build an AI agent that uses FlowMCP schemas as its tool layer. Guide them through schema selection, skill definition, and the LLM loop so they end up with a working multi-tool agent.
## Steps
1. Pick the data sources: `flowmcp search <topic>` then `flowmcp add <schema>` (e.g. one crypto + one mobility schema)
2. Verify the active toolset: `flowmcp list`
3. Define the agent skill in `~/.claude/skills/<agent-name>/SKILL.md` — describe purpose, allowed tools, output shape
4. Wire the LLM loop: call FlowMCP with the user query, pass tool results back into the next turn
5. Test with a real prompt and verify the agent invokes the expected schemas
6. Reference the full tutorial: https://flowmcp.github.io/guides/agent-creation/
## References
- Tutorial: https://flowmcp.github.io/guides/agent-creation/
- FlowMCP CLI: https://github.com/FlowMCP/flowmcp-cli

This guide walks through building an AI agent that uses FlowMCP schemas as its tool layer. By the end, you have a working agent that pulls from multiple data sources and reasons across them with a single LLM loop.

A simple “crypto research agent” that:

  • Pulls token prices from a CoinGecko schema
  • Pulls on-chain data from an Etherscan schema
  • Lets the LLM decide which tools to chain
  • Returns a structured answer

Total time: 15–20 minutes.

  • Node.js 22+
  • FlowMCP CLI installed: npm install -g github:FlowMCP/flowmcp-cli
  • An API key for one LLM (Anthropic, OpenAI, or local Ollama)
Terminal window
flowmcp search coingecko
flowmcp add coingecko-tokens
flowmcp add etherscan-tokens
flowmcp list

You should now see two tools active. The CLI auto-loaded them into a local group.

A Skill bundles a workflow with the right tools. Save this as crypto-research-skill.mjs:

export const skill = {
name: 'crypto-research',
inputs: {
token_name: 'string',
chain_id: 'number'
},
prefill: {
currency: 'usd',
include_24h_change: true
},
tools: [
'coingecko-tokens.simplePrice',
'etherscan-tokens.tokenInfo'
],
description: 'Look up a token by name, fetch price + chain info.'
}

The Skill carries its own parameter reference, prefilled defaults, and the curated tool list. The LLM does not have to guess.

A minimal Node.js example using the Anthropic SDK:

import { Anthropic } from '@anthropic-ai/sdk'
import { skill } from './crypto-research-skill.mjs'
const client = new Anthropic({ apiKey: process.env.ANTHROPIC_API_KEY })
const response = await client.messages.create({
model: 'claude-haiku-4-5-20251001',
max_tokens: 1024,
tools: skill.tools.map( ( name ) => ({ name, input_schema: { type: 'object' } }) ),
messages: [{
role: 'user',
content: 'Look up ETH price and contract info on Ethereum mainnet.'
}]
})
console.log( response.content )

You should see the LLM pick simplePrice first, then tokenInfo — without you scripting the order.

When the user asks a different kind of question (e.g. “What is Aave’s TVL?”), activate a third schema:

Terminal window
flowmcp add defillama-tvl

The agent now has three tools and can reason about which to call.

  • API keys live in ~/.flowmcp/.env, never in the LLM context
  • LLM-loop has a max-iteration cap (avoid runaway loops)
  • Skill input validation rejects malformed input before LLM sees it
  • Telemetry: log tool calls per agent session for debugging
  • Mock mode tested for demos / offline scenarios