From e9feefb4f5854f1cc33253d203691bccccd1135c Mon Sep 17 00:00:00 2001 From: cshannon1218 Date: Thu, 20 Nov 2025 11:21:38 -0600 Subject: [PATCH] Third and hopefully final round of link and style guie cleanup. --- .../native-vrf/commit-reveal-cadence.md | 21 ++-- .../agents/agentkit-flow-guide.md | 72 ++++++----- .../agents/eliza/build-plugin.md | 28 ++--- .../agents/eliza/index.md | 36 +++--- .../use-AI-to-build-on-flow/agents/index.md | 14 +-- .../cursor/cadence-rules.md | 117 +++++++++--------- .../cursor/flow-data-sources.md | 50 ++++---- .../use-AI-to-build-on-flow/cursor/index.md | 36 +++--- .../cursor/indexing-docs.md | 66 +++++----- .../use-AI-to-build-on-flow/index.md | 48 +++---- .../use-AI-to-build-on-flow/llms/chatgpt.md | 8 +- .../llms/claude-code.md | 86 ++++++------- .../use-AI-to-build-on-flow/llms/gemini.md | 8 +- .../use-AI-to-build-on-flow/llms/index.md | 8 +- .../mcp/contribute-to-mcp.md | 4 +- .../use-AI-to-build-on-flow/mcp/index.md | 8 +- .../mcp/use-mcp-in-cursor.md | 18 +-- 17 files changed, 320 insertions(+), 308 deletions(-) diff --git a/docs/blockchain-development-tutorials/native-vrf/commit-reveal-cadence.md b/docs/blockchain-development-tutorials/native-vrf/commit-reveal-cadence.md index 7ac97d51f7..2bb16656df 100644 --- a/docs/blockchain-development-tutorials/native-vrf/commit-reveal-cadence.md +++ b/docs/blockchain-development-tutorials/native-vrf/commit-reveal-cadence.md @@ -21,13 +21,13 @@ keywords: Randomness is a critical component in blockchain applications. It allows fair and unpredictable outcomes for use cases like gaming, lotteries, and cryptographic protocols. -The most basic approach that you can use to generate a random number on EVM chains is to use block hashes, which combines the block hash with a user-provided seed and hashes them together. You can use the has that results as a pseudo-random generator seed. However, this approach has limitations. A validator that influences the random source used to compute transactions can manipulate the block hash. The block proposer can decide what to include into a block and can iterate through different combinations until they find a favorable random source. +The most basic approach that you can use to generate a random number on EVM chains is to use block hashes, which combines the block hash with a user-provided seed and hashes them together. You can use the hash that results as a pseudo-random generator seed. However, this approach has limitations. A validator that influences the random source used to compute transactions can manipulate the block hash. The block proposer can decide what to include into a block and can iterate through different combinations until they find a favorable random source. [Chainlink VRF][chainlink-vrf] is a popular tool that improves on this. It provides another approach you can use to generate provably random values on Ethereum and other blockchains. It relies on a decentralized oracle network to deliver cryptographically secure randomness from off-chain sources. However, this dependence on external oracles introduces several weaknesses, such as cost, latency, and scalability concerns. -In contrast, Flow offers a simpler and more integrated approach with its native onchain Randomness Beacon at the protocol level, which eliminates reliance on external oracles and sidestepping their associated risks. +In contrast, Flow offers a simpler and more integrated approach with its native onchain Randomness Beacon at the protocol level, which eliminates reliance on external oracles and the need to sidestep their associated risks. -In addition to instant randomness that is available to any transaction (via `revertibleRandom` function), Flow provides a solution to the problem of a user reverting a transaction with an unfavorable outcome. Commit-Reveal schemes on Flow also rely on protocol-native secure randomness and they fix the issue of post-selection by trustless users. Commit-Reveal tools on Flow can be used within both Cadence and Consumer Decentralized Finance (DeFi) contracts. This tutorial focuses on Cadence. +In addition to instant randomness that is available to any transaction (via `revertibleRandom` function), Flow provides a solution to the problem of a user who reverts a transaction with an unfavorable outcome. Commit-Reveal schemes on Flow also rely on protocol-native secure randomness and they fix the issue of post-selection by trustless users. Commit-Reveal tools on Flow can be used within both Cadence and Consumer Decentralized Finance (DeFi) contracts. This tutorial focuses on Cadence. ## Objectives @@ -55,7 +55,7 @@ To illustrate this concept, we will build a Coin Toss game on Flow, which demons ### What is the Coin Toss Game? -The Coin Toss Game is a decentralized betting game that showcases the commit-reveal pattern. Players place bets without knowing the random outcome, which ensures fairness and resistance to manipulation. +The Coin Toss Game is a decentralized betting game that showcases the commit-reveal pattern. Players place bets and don't know the random outcome, which ensures fairness and resistance to manipulation. The game consists of two distinct phases: @@ -80,13 +80,13 @@ In addition, commit-reveal patterns solve the issue of revertible randoms: :::info -One of the powers of Cadence transactions is that a developer can set post-conditions that must be true, or the transaction will revert. This is very useful for scenarios such as guaranteeing a user receives their purchase in a complex and multi-step transaction, but it also means that they can set conditions to reject the transaction. In an instant-win lottery, this would allow users to test large numbers of tickets for a win without paying the purchase price. +One of the powers of Cadence transactions is that a developer can set post-conditions that must be true, or the transaction will revert. This is very useful for scenarios such as to guarantee a user receives their purchase in a complex and multi-step transaction, but it also means that they can set conditions to reject the transaction. In an instant-win lottery, this would allow users to test large numbers of tickets for a win without purchase price payment. ::: ## Build the Coin Toss contract -In this section, we'll walk through how to construct the `CoinToss.cdc` contract, which contains the core logic for the Coin Toss game. To function properly, the contract relies on supporting contracts and a proper deployment setup. +In this section, we'll walk through how to construct the `CoinToss.cdc` contract, which contains the core logic for the Coin Toss game. To function properly, the contract relies on support contracts and a proper deployment setup. This tutorial will focus specifically on how to write and understand the `CoinToss.cdc` contract, while you can find additional setup details in the [original GitHub repo][github-repo]. @@ -136,7 +136,7 @@ access(all) fun flipCoin(bet: @{FungibleToken.Vault}): @Receipt { ### Step 3: Implement the reveal phase With `revealCoin` -Now we implement the reveal phase with the `revealCoin` function. Here, the caller provides the Receipt they recieve at commitment. The contract then "flips a coin" with `_randomCoin()` providing the Receipt's contained Request. The reveal step is possible only when the protocol random source at the committed block height becomes available. +Now we implement the reveal phase with the `revealCoin` function. Here, the caller provides the Receipt they recieve at commitment. The contract then "flips a coin" and `_randomCoin()` provides the Receipt's contained Request. The reveal step is possible only when the protocol random source at the committed block height becomes available. If result is 1, the user loses, but if it's 0, the user doubles their bet. Note that the caller could condition the revealed transaction, but they've already provided their bet amount, so there's no loss for the contract if they do. @@ -213,14 +213,14 @@ transaction(betAmount: UFix64) { ![remix5-sc](./imgs/remix5.png) -5. Track it: You can take the transaction id to [FlowDiver][flow-diver][.io](https://testnet.flowdiver.io/tx/9c4f5436535d36a82d4ae35467b37fea8971fa0ab2409dd0d5f861f61e463d98) to have a full view of everything that's going on with this `FlipCoin` transaction. +5. Track it: You can take the transaction id to [FlowDiver][flow-diver][.io] to have a full view of everything about this `FlipCoin` transaction. ### Reveal the coin toss result Let's reveal the outcome of your coin toss to see if you've won. This step uses the receipt from your bet, so ensure you use the same account that placed the bet. Here's how to do it: 1. Return to your Dev Environment: Open [run.dnz][run-dnz] again. -2. Enter the Reveal Code: Paste the following Cadence transaction into the editor: +2. Enter the Reveal Code. Paste the following Cadence transaction into the editor: ```cadence import FlowToken from 0x7e60df042a9c0868 @@ -249,7 +249,7 @@ transaction { } ``` -After we run this transaction, we reveal the result of the coin flip and it's 1! It means we haven't won anything this time, but keep trying! +After we run this transaction, we reveal the result of the coin flip and it's 1! It means we haven't won anything this time, but we'll try again! You can find the full transaction used for this example, with its result and events, at [FlowDiver.io/tx/][flow-diver-tx]. @@ -276,6 +276,7 @@ When you harness the built-in randomness capabilities on Flow, you can create en [flow-docs]: https://developers.flow.com [flow-diver]: https://testnet.flowdiver.io/ [github-repo]: https://github.com/onflow/random-coin-toss +[.io]: https://testnet.flowdiver.io/tx/9c4f5436535d36a82d4ae35467b37fea8971fa0ab2409dd0d5f861f61e463d98 [run-dnz]: https://run.dnz.dev/ [coin-toss-contract]: https://contractbrowser.com/A.b6c99d7ff216a684.CoinToss [coin-toss-contract-code]: https://github.com/onflow/random-coin-toss/blob/main/contracts/CoinToss.cdc diff --git a/docs/blockchain-development-tutorials/use-AI-to-build-on-flow/agents/agentkit-flow-guide.md b/docs/blockchain-development-tutorials/use-AI-to-build-on-flow/agents/agentkit-flow-guide.md index e98e92c3d6..ece4396abd 100644 --- a/docs/blockchain-development-tutorials/use-AI-to-build-on-flow/agents/agentkit-flow-guide.md +++ b/docs/blockchain-development-tutorials/use-AI-to-build-on-flow/agents/agentkit-flow-guide.md @@ -5,7 +5,7 @@ sidebar_label: Using AgentKit on Flow sidebar_position: 2 --- -# Getting Started with AgentKit on Flow +# Build Custom AI Agents on Flow with AgentKit AgentKit is an ecosystem-agnostic modular developer toolkit that lets you rapidly build, deploy, and iterate on AI agents using pre-configured environments and ready-to-use templates. @@ -13,7 +13,7 @@ In this guide, you'll set up your own custom agent that runs on **Flow's EVM-com --- -## Quickstart - Starting From Scratch +## Quickstart - start from scratch Open your terminal and run: @@ -36,7 +36,7 @@ Follow the interactive setup: --- -## Project Setup +## Project setup When your scaffold is ready: @@ -45,7 +45,7 @@ cd onchain-agent npm install ``` -Now open the project in your preferred integrated development environment (IDE) (for example, [Cursor](../cursor/index.md). +Now open the project in your preferred integrated development environment (IDE) (for example, [Cursor]. ### Environment Configuration @@ -56,7 +56,7 @@ Now open the project in your preferred integrated development environment (IDE) ### Get Your Anthropic API Key -- Head to [Anthropic Console](https://console.anthropic.com/dashboard). +- Head to [Anthropic Console]. - Create an account and **purchase credits**. - Click **Create Key**, name it, and copy the API key. - Add this to your `.env.local`: @@ -65,10 +65,10 @@ Now open the project in your preferred integrated development environment (IDE) ANTHROPIC_API_KEY=your_api_key_here ``` -### Wallet Setup with MetaMask +### Wallet setup with MetaMask -1. Add [Flow Testnet](https://developers.flow.com/evm/using) to MetaMask. -2. Use the [Faucet](https://faucet.flow.com/fund-account) to fund your wallet. +1. Add [Flow Testnet] to MetaMask. +2. Use the [Faucet] to fund your wallet. 3. Get your private key: - Click the `...` menu in MetaMask > **Account Details**. - Enter your password, copy the private key. @@ -104,11 +104,11 @@ http://localhost:3000 If your agent doesn't respond yet, no worries! You still need to configure your **LLM and client libraries**. -### Choose a Model +### Choose a model -Langchain supports many LLMs ([full list here](https://python.langchain.com/docs/integrations/llms/)). +Langchain supports many LLMs ([full list here]). -For this example, we'll use **Anthropic's `claude-3-5-haiku-20241022`**, a lightweight and affordable model. Alternatively, [DeepSeek](https://deepseek.com/) is highly recommended for budget-friendly usage. +For this example, we'll use **Anthropic's `claude-3-5-haiku-20241022`**, a lightweight and affordable model. Alternatively, [DeepSeek] is highly recommended for budget-friendly usage. ### Update `create-agent.ts` @@ -134,9 +134,9 @@ npm install @langchain/anthropic --- -## Configure Flow and Viem Wallet +## Configure Flow and Viem wallet -### Update the Faucet Provider Logic +### Update the Faucet provider logic Change this: @@ -150,7 +150,7 @@ To: const canUseFaucet = walletProvider.getNetwork().networkId == 'flow-testnet'; ``` -### Add Flow Context Message to Agent +### Add Flow context message to Agent This gives your agent context about the Flow testnet: @@ -196,11 +196,11 @@ agent = createReactAgent({ --- -## You're Done! +## You're done! -You now have a working AI agent connected to Flow testnet using AgentKit! +You now have a working AI agent connected to Flow testnet with AgentKit! -You can send faucet tokens to your wallet and start testing smart contract interactions or onchain workflows. +You can send faucet tokens to your wallet and start to test smart contract interactions or onchain workflows. --- @@ -214,11 +214,11 @@ This starter includes all of the necessary configurations to start building imme --- -## Adding AgentKit to an Existing Project +## Add AgentKit to a current project Already have a project and want to add AgentKit? Follow these steps to integrate it into your codebase: -### Install the Package +### Install the package Run this command in your project's root directory: @@ -228,11 +228,11 @@ npm install onchain-agent@latest This will: -- Download and install the latest version of the `onchain-agent` package -- Add it to the dependencies section of your `package.json` -- Update your `node_modules` folder accordingly +- Download and install the latest version of the `onchain-agent` package. +- Add it to the dependencies section of your `package.json`. +- Update your `node_modules` folder accordingly. -### Configure Environment +### Configure environment 1. Create or update your `.env` file with the necessary API keys: @@ -249,7 +249,7 @@ FLOW_TESTNET_RPC_URL=https://testnet.evm.nodes.onflow.org FLOW_MAINNET_RPC_URL=https://mainnet.evm.nodes.onflow.org ``` -### Integrate AgentKit in Your Code +### Integrate AgentKit in your code Import and configure AgentKit in your application: @@ -284,7 +284,7 @@ const agent = createReactAgent({ // ... ``` -### Add Specialized Tools (Optional) +### Add Specialized tools (optional) To add specialized blockchain tools to your agent: @@ -314,11 +314,25 @@ const agent = createReactAgent({ ## Resources -- [AgentKit Docs](https://docs.cdp.coinbase.com/agent-kit/welcome) -- [Flow EVM Guide](https://developers.flow.com/evm/using) -- [Langchain LLM Integrations](https://python.langchain.com/docs/integrations/llms/) -- [Anthropic Model Comparison](https://docs.anthropic.com/en/docs/about-claude/models/all-models#model-comparison-table) +- [AgentKit Docs] +- [Flow EVM Guide] +- [Langchain LLM Integrations] +- [Anthropic Model Comparison] --- Happy hacking on Flow! + + + +[Cursor]: ../cursor/index.md +[Anthropic Console]: https://console.anthropic.com/dashboard +[Flow Testnet]: https://developers.flow.com/evm/using +[Faucet]: https://faucet.flow.com/fund-account +[full list here]: https://python.langchain.com/docs/integrations/llms/ +[DeepSeek]: https://deepseek.com/ +[Fork the Flow AgentKit Starter]: https://github.com/Aliserag/flow-agentkit-starter +[AgentKit Docs]: https://docs.cdp.coinbase.com/agent-kit/welcome +[Flow EVM Guide]: https://developers.flow.com/evm/using +[Langchain LLM Integrations]: https://python.langchain.com/docs/integrations/llms/ +[Anthropic Model Comparison]: https://docs.anthropic.com/en/docs/about-claude/models/all-models#model-comparison-table \ No newline at end of file diff --git a/docs/blockchain-development-tutorials/use-AI-to-build-on-flow/agents/eliza/build-plugin.md b/docs/blockchain-development-tutorials/use-AI-to-build-on-flow/agents/eliza/build-plugin.md index cae3027067..275da75aa2 100644 --- a/docs/blockchain-development-tutorials/use-AI-to-build-on-flow/agents/eliza/build-plugin.md +++ b/docs/blockchain-development-tutorials/use-AI-to-build-on-flow/agents/eliza/build-plugin.md @@ -18,7 +18,7 @@ keywords: Plugins are a powerful way to extend the functionality of your Eliza AI agents. This guide will walk you through the process of how to create custom plugins that can enhance your agent's capabilities, from simple utilities to complex integrations with external services. You'll learn how to leverage the plugin system to create modular and reusable components for your AI agents. -## Learning Objectives +## Learning objectives After you complete this tutorial, you will be able to: @@ -33,21 +33,21 @@ After you complete this tutorial, you will be able to: Before you get started with Eliza, make sure you have: -- [Node.js 23+] (using [nvm] is recommended) +- [Node.js 23+] (we recommend that you use [nvm]) - [pnpm 9+] - Git for version control -- A code editor ([VS Code], [Cursor] or [VSCodium] recommended) +- A code editor (we recommend [VS Code], [Cursor] or [VSCodium]) - [Flow-cli] for Flow blockchain interaction. -> **Note for Windows Users:** [WSL 2] is required. +> **Note for Windows users:** [WSL 2] is required. ## Quickstart Follow the [Quickstart Guide] to set up your development environment. -## Plugin Development +## Plugin development -### Create a Plugin repository from Template +### Create a plugin repository from Template Visit [Eliza Plugin Template] and click "Use this template" to create a new repository. @@ -59,7 +59,7 @@ Flow's Eliza plugin template uses Dependency Injection(`@elizaos-plugins/plugin- ::: -### Add the Plugin repository to your Eliza project +### Add the plugin repository to your Eliza project Let's say you created a repository named `username/plugin-foo`. @@ -93,7 +93,7 @@ Check the `agent/package.json` to make sure the plugin is added. You'll see some } ``` -### Build the Plugin +### Build the plugin Build the plugin with the following command: @@ -104,9 +104,9 @@ pnpm build --filter ./packages/plugin-foo pnpm build ``` -### Add Plugin to the `character.json` you want to use +### Add the plugin to the `character.json` you want to use -Let's say you want to add the plugin to the `sample` character which is `characters/sample.character.json`. +Let's say you want to add the plugin to the `sample` character, which is `characters/sample.character.json`. ```json { @@ -119,7 +119,7 @@ Let's say you want to add the plugin to the `sample` character which is `charact :::warning -If you use Dependency Injection(`@elizaos-plugins/plugin-di`) in your plugin, remember to add it to the `postProcessors` field. And **`clients` field is deprecated** in the latest version of Eliza, so if you want to add clients, you also need to use `plugins` field. +If you use Dependency Injection(`@elizaos-plugins/plugin-di`) in your plugin, remember to add it to the `postProcessors` field. The **`clients` field is deprecated** in the latest version of Eliza, so if you want to add clients, you also need to use `plugins` field. ::: @@ -136,7 +136,7 @@ If you use Dependency Injection(`@elizaos-plugins/plugin-di`) in your plugin, re } ``` -### Run the Eliza Agent with your Plugin +### Run the Eliza agent with your plugin Run the Eliza agent to test the plugin. @@ -147,7 +147,7 @@ pnpm start --character="characters/sample.character.json" pnpm start:debug --character="characters/sample.character.json" ``` -### Interact with the Agent +### Interact with the agent Now, you're ready to start a conversation with your agent. @@ -157,7 +157,7 @@ Open a new terminal window and run the client's http server. pnpm start:client ``` -## Plugin Registration +## Plugin registration You need to register your plugin in the [Eliza Plugin Registry] to make it available for other users. diff --git a/docs/blockchain-development-tutorials/use-AI-to-build-on-flow/agents/eliza/index.md b/docs/blockchain-development-tutorials/use-AI-to-build-on-flow/agents/eliza/index.md index 4e7bad6e39..a49e5b1b3c 100644 --- a/docs/blockchain-development-tutorials/use-AI-to-build-on-flow/agents/eliza/index.md +++ b/docs/blockchain-development-tutorials/use-AI-to-build-on-flow/agents/eliza/index.md @@ -13,11 +13,9 @@ keywords: # Quickstart Guide to build AI Agent on Flow with Eliza -## Overview +Eliza is a powerful framework you can use to build AI agents that interact with users through natural language. This tutorial will guide you through how to set up and deploy an AI agent on the Flow blockchain with Eliza. You'll learn how to create intelligent agents that can understand and respond to user queries, and leverage Flow's secure and scalable infrastructure. -Eliza is a powerful framework for building AI agents that can interact with users through natural language. This tutorial will guide you through how to set up and deploy an AI agent on the Flow blockchain with Eliza. You'll learn how to create intelligent agents that can understand and respond to user queries, while leveraging Flow's secure and scalable infrastructure. - -## Learning Objectives +## Learning objectives After you complete this tutorial, you will be able to: @@ -32,13 +30,13 @@ After you complete this tutorial, you will be able to: Before you get started started with Eliza, make sure you have: -- [Node.js 23+] (using [nvm] is recommended) +- [Node.js 23+] (we recommend that you use [nvm]) - [pnpm 9+] - Git for version control -- A code editor ([VS Code], [Cursor] or [VSCodium] recommended) +- A code editor (we recommend [VS Code], [Cursor] or [VSCodium]) - [Flow-cli] for Flow blockchain interaction. -> **Note for Windows Users:** [WSL 2] is required. +> **Note for Windows Uuers:** [WSL 2] is required. ## Installation @@ -88,7 +86,7 @@ pnpm install --no-frozen-lockfile :::warning -Only use the `--no-frozen-lockfile` option when you're initially instantiating the repo or bump the version of a package or add a new package to your `package.json` file. This practice helps maintain consistency in your project's dependencies and prevents unintended changes to the lockfile. +Only use the `--no-frozen-lockfile` option when you initially instantiate the repo or bump the version of a package or add a new package to your `package.json` file. This practice helps maintain consistency in your project's dependencies and prevents unintended changes to the lockfile. ::: @@ -106,7 +104,7 @@ Build all packages: pnpm build ``` -## Configure Environment +## Configure environment Copy `.env.example` to `.env` and fill in the appropriate values. @@ -122,10 +120,10 @@ In normal development, it's a best practice to use a `.env` to protect API keys Edit `.env` and add your values. Do **NOT** add this file to version control. -### Choose Your Model +### Choose Your model Eliza supports multiple AI models and you set which model to use inside the character JSON file. -But remember, after you chosed a model, you need to set up the relevant configuration. +But remember, after you choose a model, you need to set up the relevant configuration. Check the full list of supported LLMs in origin Eliza: [Models.ts] @@ -140,7 +138,7 @@ Suggested models: > To choose a model, you need to set in charactor configuration. For example: OPENAI, set `modelProvider: "openai"` in charactor JSON file or `modelProvider: ModelProviderName.OPENAI` in `charactor.ts` -### Setup Agent's Flow Account +### Setup Agent's Flow account Create a new Flow account for the Agent. Learn more: [doc] @@ -161,9 +159,9 @@ FLOW_ENDPOINT_URL= # Default: For testnet, check Flow's [Networks] for more information. -## Create Your First Agent +## Create your first agent -### Create a Character File +### Create a character file View the `deps/eliza/characters/` directory for a number of character files to try out. Additionally, you can edit `charactor.ts` to override Eliza's `defaultCharacter` file, which is the default character file used if no character json files are provided. @@ -196,7 +194,7 @@ You can load multiple characters with a comma-separated list: pnpm start --characters="characters/sample.character.json, characters/scooby.character.json" ``` -### Add / Develop Plugins +### Add and develop plugins Run `npx elizaos plugins list` to get a list of available plugins or visit [Eliza Plugins Registry] @@ -204,15 +202,15 @@ Run `npx elizaos plugins add @elizaos-plugins/plugin-NAME` to install the plugin To create a new plugin **for your own business**, refer to the [plugin development guide]. -#### Additional Requirements +#### Additional requirements -You may need to install Sharp. If you see an error when starting up, install it with the following command: +You may need to install Sharp. If you see an error when you start it up, install it with the following command: ```bash pnpm install --include=optional sharp ``` -### **Interact with the Agent** +### **Interact with the agent** Now you're ready to start a conversation with your agent. @@ -230,7 +228,7 @@ After the client is running, you'll see a message like this: Click the link or open your browser to `http://localhost:5173/`. You'll see the chat interface connect to the system, and you can now interact with your character. -## Common Issues & Solutions +## Common issues and solutions Check the orgin Eliza's [Common Issues & Solutions] diff --git a/docs/blockchain-development-tutorials/use-AI-to-build-on-flow/agents/index.md b/docs/blockchain-development-tutorials/use-AI-to-build-on-flow/agents/index.md index 4662424ed2..9c6c0e9cd7 100644 --- a/docs/blockchain-development-tutorials/use-AI-to-build-on-flow/agents/index.md +++ b/docs/blockchain-development-tutorials/use-AI-to-build-on-flow/agents/index.md @@ -16,15 +16,13 @@ keywords: # AI Agents -## Overview - -AI agents represent the next evolution in blockchain interaction. They combine artificial intelligence with blockchain capabilities to create autonomous systems that can execute complex tasks, interact with smart contracts, and automate workflows. This section explores how to build intelligent agents that leverage Flow's unique features to create powerful, self-directing blockchain applications. +AI agents represent the next evolution in blockchain interaction. They combine artificial intelligence with blockchain capabilities to create autonomous systems that can execute complex tasks, interact with smart contracts, and automate workflows. This section explores how to build intelligent agents that leverage Flow's unique features to create powerful, self-directed blockchain applications. Unlike traditional chatbots or simple AI assistants, blockchain AI agents can autonomously execute transactions, manage digital assets, interact with DeFi protocols, and coordinate complex multi-step operations across the Flow ecosystem. These agents bridge the gap between AI decision-making and blockchain execution, which allows new forms of automated financial services, gaming mechanics, and decentralized applications. ## [Eliza on Flow] -Learn how to build conversational AI agents on Flow using [Eliza](../agents/eliza/index.md), a framework for creating intelligent agents that interact through natural language. Set up agents with customizable personalities, integrate multiple AI models, and connect to Flow's blockchain infrastructure. +Learn how to build conversational AI agents on Flow with [Eliza on Flow], a framework for that you can use to create intelligent agents that interact through natural language. Set up agents with customizable personalities, integrate multiple AI models, and connect to Flow's blockchain infrastructure. ### [Eliza Plugin Development Guide] @@ -32,9 +30,9 @@ Extend your Eliza agents with custom plugins for specialized functionality. Crea ## [Build Custom AI Agents on Flow with AgentKit] -Create autonomous AI agents that interact with Flow's blockchain using AgentKit. Set up agents on Flow's EVM-compatible environment, integrate AI models like Claude and GPT-4, and deploy systems that execute blockchain transactions automatically. +Create autonomous AI agents that interact with Flow's blockchain with AgentKit. Set up agents on Flow's EVM-compatible environment, integrate AI models like Claude and GPT-4, and deploy systems that execute blockchain transactions automatically. -## Key Benefits of AI Agents on Flow +## Key benefits of AI agents on Flow **Autonomous Execution**: Agents can independently execute complex blockchain operations without human intervention, from simple token transfers to sophisticated decentralized finance (DeFi) strategies. @@ -46,9 +44,9 @@ Create autonomous AI agents that interact with Flow's blockchain using AgentKit. **Scalable Automation**: Create agents that can manage multiple wallets, coordinate complex workflows, and scale operations across the Flow ecosystem. -## Use Cases for AI Agents +## Use cases for AI agents -**Conversational Interfaces**: Build Eliza-powered agents that can provide natural language interfaces to Flow applications, helping users navigate complex DeFi protocols or gaming mechanics through conversation. +**Conversational Interfaces**: Build Eliza-powered agents that can provide natural language interfaces to Flow applications, which helps users navigate complex DeFi protocols or gaming mechanics through conversation. **Automated Trading**: Build agents that can analyze market conditions, execute trades, manage portfolios across Flow's DeFi ecosystem, and communicate decisions to users. diff --git a/docs/blockchain-development-tutorials/use-AI-to-build-on-flow/cursor/cadence-rules.md b/docs/blockchain-development-tutorials/use-AI-to-build-on-flow/cursor/cadence-rules.md index a04008b7df..34af126b5d 100644 --- a/docs/blockchain-development-tutorials/use-AI-to-build-on-flow/cursor/cadence-rules.md +++ b/docs/blockchain-development-tutorials/use-AI-to-build-on-flow/cursor/cadence-rules.md @@ -15,9 +15,7 @@ keywords: # Cadence Rules -## Overview - -When building with AI, it's hard to make the agent consistently understand what standards it should use when building or generating responses. To migitate this issue, Cursor Rules sets up global rules, project wide rules or documents specific rules that it inserts in the agent's context before reading the prompt. With Cursor Rules, you can create an assistant that can consistently understand the intended development process, desired formatted responses, and avoid common mistakes. Consider it your tool to make guard rails for agents that can reduce hallucination and incorrect development flows. +When you build with AI, it's hard to make the agent consistently understand what standards it should use when it builds or generates responses. To migitate this issue, Cursor Rules sets up global rules, project wide rules or documents specific rules that it inserts in the agent's context before it reads the prompt. With Cursor Rules, you can create an assistant that can consistently understand the intended development process, desired formatted responses, and avoid common mistakes. Consider it your tool to make guard rails for agents that can reduce hallucination and incorrect development flows. In this guide, you'll learn how to configure and use Cursor Rules that transform your AI assistant into a Flow development expert with persistent knowledge of Cadence syntax patterns, NFT standards, project configuration, and development workflows. @@ -32,7 +30,7 @@ In this guide, you'll learn how to configure and use Cursor Rules that transform > -## Learning Objectives +## Learning objectives After you complete this guide, you'll be able to: @@ -41,9 +39,10 @@ After you complete this guide, you'll be able to: - Use workflow-based rules to guide project setup, deployment, and debugging processes across the Flow development lifecycle. - Create your own Cadence Rules in order to supercharge your development on Flow. -## What Are Cursor Rules? +## What are Cursor rules? + +Cursor rules shape AI behavior with persistent, reusable instructions that guide how Cursor's Agent and Inline Edit assist you. Rules act as continuous context - they embed your preferences, code standards, and workflows directly into the AI's decision-making process. Since AI models start fresh with each interaction, rules automatically inject your preferences and context into every conversation, which bridfges this gap. -Cursor rules shape AI behavior with persistent, reusable instructions that guide how Cursor's Agent and Inline Edit assist you. Rules act as continuous context - embedding your preferences, coding standards, and workflows directly into the AI's decision-making process. Since AI models start fresh with each interaction, rules bridge this gap by automatically injecting your preferences and context into every conversation. When active, rules are included at the beginning of the AI's context and provide consistent guidance for code generation, edit suggestions, and workflow assistance. Cursor offers two rule types: @@ -80,9 +79,9 @@ alwaysApply: false Referenced files like `@nft-template.cdc` are included as additional context when the rule triggers. -## User Rules +## User rules -User rules are global preferences defined in Cursor Settings → Rules that apply across all projects. They’re plain text and perfect for setting preferred communication style or coding conventions: +User rules are global preferences defined in Cursor Settings → Rules that apply across all projects. They’re plain text and perfect for setting preferred communication style or code conventions: ```md Please reply in a concise style. Avoid unnecessary repetition or filler language. @@ -90,15 +89,15 @@ Please reply in a concise style. Avoid unnecessary repetition or filler language ## Project rules -Project rules are stored as individual files in `.cursor/rules` and get version-controlled alongside your code. Each rule can target specific file types using glob patterns, be manually invoked when needed, or automatically activate based on context. You can also create nested rule directories - any folder can have its own `.cursor/rules` directory with rules that apply specifically to that area of your project. +Project rules are stored as individual files in `.cursor/rules` and get version-controlled alongside your code. Each rule can target specific file types with glob patterns, be manually invoked when needed, or automatically activate based on context. You can also create nested rule directories - any folder can have its own `.cursor/rules` directory with rules that apply specifically to that area of your project. -Project rules excel at: +Project rules help: -- Capturing specialized knowledge about your codebase and domain. -- Establishing consistent workflows and development patterns. -- Enforcing coding standards and architectural decisions across your team. +- Capture specialized knowledge about your codebase and domain. +- Establish consistent workflows and development patterns. +- Enforce coding standards and architectural decisions across your team. -### Nested Rules +### Nested rules To organize rules, place them in `.cursor/rules` directories throughout your project. Nested rules automatically attach when files in their directory are referenced. @@ -111,15 +110,15 @@ project/ .cursor/rules/ # Frontend-specific rules ``` -## Creating a rule +## Create rules -Create rules with the Cursor Rule command or going to Cursor Settings > Rules. This creates a new rule file in `.cursor/rules`. From settings you can see all rules and their status. +Create rules with the Cursor Rule command or go to Cursor Settings > Rules. This creates a new rule file in `.cursor/rules`. From settings you can see all rules and their status. -Click the cog icon on the upper right section of the window. Then, click "Rules and Memories" on the left side bar. Finally click "+ Add Rule" in the User Rules or Project Rules section (depending on your objective). +Click the cog icon on the upper right section of the window. Then, click "Rules and Memories" on the left side bar. Finally click "+ Add Rule" in the User Rules or Project Rules section (this depends on your objective). ![Creating a Cursor Rule](./imgs/cursor_rules1.png) -### Generating rules +### Generate rules Generate rules directly in conversations with the `/Generate Cursor Rules` command. This is useful when you’ve made decisions about agent behavior and want to reuse them. @@ -135,13 +134,13 @@ Good rules are focused, actionable, and scoped. - Avoid vague guidance. Write rules like clear internal docs. - Reuse rules when repeating prompts in chat. -## Cadence Rules +## Cadence rules Here are a couple of Cursor Rules made by [claucondor] for Flow development and NFTs. -### Cadence NFT Standards +### Cadence NFT standards -The [cadence-nft-standards.mdc] rule provides comprehensive guidelines for developing NFTs using Cadence on Flow blockchain. It ensures proper implementation of: +The [cadence-nft-standards.mdc] rule provides comprehensive guidelines for NFT development with Cadence on Flow blockchain. It ensures proper implementation of: - **Core Interface Conformance**: `NonFungibleToken`, `NFT`, and `Collection` interfaces. - **MetadataViews Integration**: Marketplace-compatible metadata standards. @@ -159,7 +158,7 @@ The [cadence-nft-standards.mdc] rule provides comprehensive guidelines for devel **Applies to:** `.cdc` files, NFT transactions, collection setup, metadata implementation. -#### Rule Configuration +#### Rule configuration ```mdc --- @@ -171,13 +170,13 @@ alwaysApply: false Recommended Apply config: `Apply Intelligently` -#### Manual Reference +#### Manual reference ``` @cadence-nft-standards help me implement a new NFT contract ``` -#### Key Benefits +#### Key benefits - **Ecosystem Compatibility**: Guaranteed marketplace and wallet integration. - **Security**: Proper resource handling and capability management. @@ -185,18 +184,18 @@ Recommended Apply config: `Apply Intelligently` - **Performance**: Gas-efficient implementations with lazy initialization. - **Standards Compliance**: Follows official Flow NFT patterns. -#### Usage Examples +#### Usage examples - `"Create an NFT contract for collectible cards"` → Guides complete interface implementation. - `"Make my NFT marketplace compatible"` → Provides MetadataViews patterns. - `"Build evolving NFTs with traits"` → Suggests modular architecture patterns. - `"Review my NFT contract"` → Validates against all documented standards. -### Cadence Syntax Patterns +### Cadence syntax patterns -#### What This Rule Does +#### What this rule does -The [cadence-syntax-patterns.mdc] rule provides comprehensive syntax guidance and error prevention for Cadence development. It covers essential language patterns including: +The [cadence-syntax-patterns.mdc] rule provides comprehensive syntax guidance and error prevention for Cadence development. It covers essential language patterns such as: - **Resource Type Syntax**: Proper use of `@` and `&` symbols for resources and references. - **Interface Restrictions**: Correct `{}` syntax for interface constraints. @@ -218,9 +217,9 @@ The [cadence-syntax-patterns.mdc] rule provides comprehensive syntax guidance an **Applies to:** `.cdc` files, transaction scripts, contract development, Flow CLI usage, error debugging. -#### How to Use This Rule +#### How to use this rule -#### Auto Attached Configuration +#### Auto attached configuration ```mdc --- @@ -232,7 +231,7 @@ alwaysApply: false Recommended Apply config: `Apply Intelligently` -#### Manual Reference +#### Manual reference ``` @cadence-syntax-patterns help me fix this authorization error @@ -247,7 +246,7 @@ Recommended Apply config: `Apply Intelligently` - **Type Safety**: Correct resource handling and type conversions. - **Performance**: Optimized patterns for compute unit (gas) efficiency. -#### Usage Examples +#### Usage examples - `"Fix this resource handling error"` → Provides `@` and `&` syntax corrections - `"My transaction authorization is failing"` → Suggests proper `auth` capabilities @@ -256,7 +255,7 @@ Recommended Apply config: `Apply Intelligently` - `"Interface restriction syntax error"` → Corrects to `{}` interface syntax - `"Access control for resource fields"` → Guides `access(self)` vs `access(all)` patterns -#### Key Syntax Patterns Covered +#### Key syntax patterns covered - **Resources**: `@{NonFungibleToken.NFT}` not `@NonFungibleToken.NFT` - **Authorization**: `auth(Storage) &Account` or granular capabilities. @@ -267,11 +266,11 @@ Recommended Apply config: `Apply Intelligently` - **String Operations**: Use `.split()` and `.contains()` (no `.indexOf()`) - **Loops**: `while` loops only (no range-based `for` loops) -### Flow Development Workflow +### Flow development workflow -#### What This Rule Does +#### What this rule does -The [flow-development-workflow.mdc] rule provides comprehensive workflow methodology for Flow blockchain development covering the complete development lifecycle. It includes: +The [flow-development-workflow.mdc] rule provides comprehensive workflow methodology for Flow blockchain development that covers the complete development lifecycle. It includes: - **Documentation-First Approach**: Always reference official Flow documentation and standard examples. - **Development Sequence**: Emulator → Testnet → Mainnet progression with proper validation. @@ -300,7 +299,7 @@ The [flow-development-workflow.mdc] rule provides comprehensive workflow methodo @flow-development-workflow help me deploy to testnet properly ``` -#### Auto Attached Configuration +#### Auto attached configuration ```mdc --- @@ -312,7 +311,7 @@ alwaysApply: false Recommended Apply config: `Apply Intelligently` -#### Key Benefits +#### Key benefits - **Systematic Approach**: Step-by-step methodology prevents common mistakes. - **Official Patterns**: Emphasizes Flow documentation and standard examples. @@ -321,7 +320,7 @@ Recommended Apply config: `Apply Intelligently` - **Optimization Focus**: Gas efficiency and computation limit management. - **Validation Protocols**: Comprehensive testing before production deployment. -#### Usage Examples +#### Usage examples - `"How do I set up a new Flow project?"` → Guides project setup and configuration. - `"My transaction authorization is failing"` → Provides auth capability debugging. @@ -330,7 +329,7 @@ Recommended Apply config: `Apply Intelligently` - `"Computation limit exceeded"` → Recommends optimization strategies. - `"Prepare for mainnet deployment"` → Provides comprehensive validation checklist. -#### Key Workflow Areas Covered +#### Key workflow areas covered - **Project Setup**: `flow.json` configuration, FCL setup, environment management. - **Authorization**: `auth(Storage)`, `auth(BorrowValue, SaveValue)`, granular capabilities. @@ -341,7 +340,7 @@ Recommended Apply config: `Apply Intelligently` - **Deployment**: Verification protocols, update strategies, multi-network consistency. - **Documentation Usage**: When and how to reference official Flow resources. -#### Development Philosophy Emphasized +#### Development philosophy emphasized - **Documentation-Driven**: Reference official sources before creating custom solutions. - **Iterative Approach**: Fix issues one at a time, test frequently at each stage. @@ -349,7 +348,7 @@ Recommended Apply config: `Apply Intelligently` - **Full-Stack Awareness**: Consider entire stack from contracts to frontend UI. - **Error-Driven Learning**: Use errors as opportunities to refine understanding. -### Flow Project Configuration +### Flow project configuration #### What This Rule Does @@ -376,7 +375,7 @@ The [flow-project-config.mdc] rule provides comprehensive guidance for Flow proj **Applies to:** `flow.json`, FCL config files, deployment scripts, network switching, contract imports. -#### Auto Attached Configuration +#### Auto attached configuration ```mdc --- @@ -388,13 +387,13 @@ alwaysApply: false Recommended Apply config: `Apply Intelligently` -#### Manual Reference +#### Manual reference ``` @flow-project-config help me configure my flow.json for testnet deployment ``` -#### Key Benefits +#### Key benefits - **Configuration Accuracy**: Prevents common setup and deployment errors. - **Multi-Network Support**: Seamless switching between emulator, testnet, and mainnet. @@ -403,7 +402,7 @@ Recommended Apply config: `Apply Intelligently` - **Deployment Success**: Proper account setup and contract registration workflows. - **Address Management**: Centralized contract address handling across environments. -#### Usage Examples +#### Usage examples - `"Configure flow.json for new project"` → Provides complete structure and setup guidance. - `"Failed to resolve contract import"` → Suggests address mapping and alias fixes. @@ -412,7 +411,7 @@ Recommended Apply config: `Apply Intelligently` - `"Deploy contract to testnet"` → Provides deployment configuration and verification. - `"Switch from emulator to testnet"` → Guides network transition and address updates. -#### Key Configuration Areas Covered +#### Key configuration areas covered - **Account Setup**: Address accuracy, key file paths, network-specific accounts. - **Contract Registration**: Source paths, aliases, pre-deployment requirements. @@ -423,7 +422,7 @@ Recommended Apply config: `Apply Intelligently` - **Multi-Network Patterns**: Network-specific aliases and deployment strategies. - **CLI Usage**: Correct `--signer`, `--network`, and `--update` flag usage. -#### Common Issues Addressed +#### Common issues addressed - **"failed to get contract"**: Missing or incorrect aliases in `flow.json`. - **"failed to resolve import"**: Address mapping issues in FCL configuration. @@ -432,7 +431,7 @@ Recommended Apply config: `Apply Intelligently` - **Signer/Network Mismatches**: Using emulator accounts on testnet and vice-versa. - **Address Inconsistencies**: Misaligned addresses between `flow.json` and FCL config. -#### Best Practices Emphasized +#### Best practices emphasized - **Pre-deployment Registration**: Always add contracts to `flow.json` before you deploy it. - **Address Consistency**: Ensure addresses match across `flow.json`, FCL config, and imports. @@ -440,9 +439,9 @@ Recommended Apply config: `Apply Intelligently` - **Network Separation**: Maintain distinct configurations for each network environment. - **Key Security**: Proper `.gitignore` setup for private key files. -### User Preferences +### User preferences -#### What This Rule Does +#### What this rule does The [user-preferences.mdc] rule personalizes AI assistance behavior for Flow blockchain development. It defines preferred communication style and development methodology including: @@ -466,7 +465,7 @@ The [user-preferences.mdc] rule personalizes AI assistance behavior for Flow blo **Applies to:** All AI assistance, communication style, problem-solving approach, solution methodology -#### Synergy with Technical Rules +#### Synergy with technical rules This rule works as the **behavioral foundation** for your technical Flow rules: @@ -474,18 +473,18 @@ This rule works as the **behavioral foundation** for your technical Flow rules: - **User Preferences** defines **HOW** to deliver that information. - **Result**: Consistent, personalized assistance across all Flow development scenarios. -#### Always Applied Configuration +#### Always applied configuration ```mdc --- -description: Defines personalized development preferences and communication style for Flow blockchain development including concise response formatting, documentation-driven problem solving, iterative workflow methodology, full-stack awareness, and systematic error resolution. Guides AI behavior to match user's preferred development philosophy with emphasis on official Flow patterns, practical solutions, and proactive error prevention across the entire development stack. +description: Defines personalized development preferences and communication style for Flow blockchain development, whcih includes concise response formatting, documentation-driven problem solving, iterative workflow methodology, full-stack awareness, and systematic error resolution. Guides AI behavior to match user's preferred development philosophy with emphasis on official Flow patterns, practical solutions, and proactive error prevention across the entire development stack. alwaysApply: true --- ``` Recommended Apply config: `Always Apply` -#### Key Benefits +#### Key benefits - **Consistent Communication**: AI responses match your preferred style and level of detail. - **Methodology Alignment**: Solutions follow your preferred development philosophy. @@ -494,16 +493,16 @@ Recommended Apply config: `Always Apply` - **Standards Compliance**: Emphasis on official Flow patterns and best practices. - **Full-Stack Perspective**: Solutions consider entire development stack implications. -#### How This Rule Affects AI Responses +#### How this rule affects AI responses - **Response Style**: `"Configure flow.json for testnet"` → Provides direct steps + brief prevention tips. - **Problem-Solving**: `"Authorization error"` → Root cause analysis + pattern to prevent recurrence. - **Code Solutions**: Always includes reference to official documentation when available. - **Error Debugging**: Systematic, one-issue-at-a-time approach with testing checkpoints. - **Architecture Decisions**: Prefer established Flow patterns over custom implementations. -- **Learning Approach**: Uses errors as learning opportunities with rule/pattern references. +- **Learning Approach**: Uses errors as learning opportunities with rule and pattern references. -#### Behavioral Patterns Defined +#### Behavioral patterns defined - **Conciseness**: Clear, actionable solutions without excessive explanation. - **Practical Focus**: Working code examples prioritized over theoretical explanations. @@ -514,7 +513,7 @@ Recommended Apply config: `Always Apply` - **Prevention-Oriented**: Include brief explanations of why errors occurred. - **Full-Stack Consideration**: Account for contracts, transactions, FCL, and UI implications. -#### Configuration Recommendation +#### Configuration recommendation **Best Setup**: Configure as **"Always"** rule or add to **User Rules** in Cursor Settings for global application across all your Flow development work. diff --git a/docs/blockchain-development-tutorials/use-AI-to-build-on-flow/cursor/flow-data-sources.md b/docs/blockchain-development-tutorials/use-AI-to-build-on-flow/cursor/flow-data-sources.md index 3b4c9a713b..7c94a4a6e3 100644 --- a/docs/blockchain-development-tutorials/use-AI-to-build-on-flow/cursor/flow-data-sources.md +++ b/docs/blockchain-development-tutorials/use-AI-to-build-on-flow/cursor/flow-data-sources.md @@ -18,7 +18,7 @@ keywords: # Flow Data Sources -Flow Data Sources is a comprehensive repository that automatically aggregates and formats Flow ecosystem content into Markdown files optimized for AI ingestion. This resource serves as a centralized knowledge base for AI tools, chatbots, and RAG (Retrieval-Augmented Generation) pipelines, containing the most current documentation, examples, and best practices for Flow blockchain development. +Flow Data Sources is a comprehensive repository that automatically aggregates and formats Flow ecosystem content into Markdown files optimized for AI ingestion. This resource serves as a centralized knowledge base for AI tools, chatbots, and RAG (Retrieval-Augmented Generation) pipelines. It contains the most current documentation, examples, and best practices for Flow blockchain development.
-[Claude Code] (Claude) provides an AI-powered coding assistant specifically designed for iterative, systematic development, which transforms the development experience. Unlike general-purpose AI tools, Claude excels at breaking down tasks into manageable, incremental steps while maintaining context across your entire development lifecycle. +[Claude Code] (Claude) provides an AI-powered coding assistant specifically designed for iterative, systematic development, which transforms the development experience. Unlike general-purpose AI tools, Claude breaks down tasks into manageable, incremental steps while it maintains context across your entire development lifecycle. -What makes Claude exceptionally powerful is it can maintain unlimited context windows, which allows it to understand entire codebases without the compression limitations that plague other AI coding tools. This comprehensive understanding allows Claude to deploy multiple subagent instances that work in parallel on complex tasks, iterate continuously until optimal solutions are achieved, and maintain persistent memory of your project's architecture and coding standards across all development sessions. +What makes Claude exceptionally powerful is it can maintain unlimited context windows, which allows it to understand entire codebases without the compression limitations that plague other AI coding tools. This comprehensive knowledge allows Claude to deploy multiple subagent instances that work in parallel on complex tasks, iterate continuously until optimal solutions are achieved, and maintain persistent memory of your project's architecture and coding standards across all development sessions. ## Learning objectives @@ -41,7 +41,7 @@ After you complete this guide, you'll be able to: - Implement the four-stage development methodology (Idea → Visualization → Planning → Build) for Cadence projects. - Configure persistent project context with `CLAUDE.md` files with Flow-specific instructions and MCP tools. - Apply iterative development practices with git-based checkpoint systems for safe blockchain development. -- Use advanced Claude features including subagents, auto-verification, and specialized debugging workflows. +- Use advanced Claude features such subagents, auto-verification, and specialized debugging workflows. - Integrate Claude with Flow CLI, FCL, and other Flow development tools for comprehensive project management. - Create and manage team-wide development standards through shared `CLAUDE.md` configurations. @@ -60,9 +60,9 @@ Before you proceed with this guide, you should have: ### What is Claude? -Claude is an AI-powered coding assitant that integrated directly into your terminal. This allows you to use it in any integrated development environment (IDE) or simply from your terminal. The power of Claude comes from its ability to explain complex and large codebases, manage Git workflows, and iterate for long periods of time to aClaudeomplish a task. +Claude is an AI-powered code assitant that integrated directly into your terminal. This allows you to use it in any integrated development environment (IDE) or simply from your terminal. The power of Claude comes from its ability to explain complex and large codebases, manage Git workflows, and iterate for long periods of time to accomplish a task. -Most IDEs like Cursor rely on their ability to compress the context window that is fed to agents so that their business model justifies charging $20 while using expensive LLM models. This naturally decreases the ability of the agents to have a comprehensive understanding of the working codebase when managing with large or complex codebases. +Most IDEs like Cursor rely on their ability to compress the context window that is fed to agents so that their business model justifies a $20 charge while they use expensive LLM models. This naturally decreases the ability of the agents to have a comprehensive understanding of the working codebase when they manage with large or complex codebases. This is why Claude can be so powerful, because it can include entire codebases in its context, deploy other instances of Claude to work on multiple actions in parallel, and iterate on its results in order to achieve better results. @@ -97,7 +97,7 @@ cd your-awesome-project claude ``` -This automatically installs the extension. You can run the `/ide` command in the Claude terminal to make sure your IDE is connected to Claude. With the extension installed, you can click on the orange Anthropic logo on the upper right hand of the screen in order to launch Claude in a separate window. +This automatically installs the extension. Run the `/ide` command in the Claude terminal to make sure your IDE is connected to Claude. With the extension installed, click on the orange Anthropic logo on the upper right hand of the screen in order to launch Claude in a separate window. ![Claude Code Extension](./imgs/CC_logo.png) @@ -106,7 +106,7 @@ This automatically installs the extension. You can run the `/ide` command in the `CLAUDE.md` files are configuration files that contain project-specific instructions and context for Claude. They allow you to define development standards, frequently used commands, and project architecture that the AI remembers across all coding sessions. They are similar to Cursor Rules, but they differ in that `CLAUDE.md` only specifies the configuration of Claude. -If you know what type of information to place in your `CLAUDE.md` file, create your primary CLAUDE.md file in the project root. Use the `/init` command in Claude to generate the initial structure, then customize for Flow development: +If you know what type of information to place in your `CLAUDE.md` file, create your primary `CLAUDE.md` file in the project root. Use the `/init` command in Claude to generate the initial structure, then customize for Flow development: Create your Flow project with the standard directory structure: @@ -133,7 +133,7 @@ flow-project/ Place `CLAUDE.md` in the root file sets the instructions you want Claude to do frequently, such as: - Bash commands you want to run frequently. -- Files it should really know about when making changes or big architectural decisions. +- Files it should really know about when it makes changes or big architectural decisions. - MCP servers. This file is great to share across your team so you set it once and everyone has the same extended functionality. @@ -173,17 +173,17 @@ This is a Flow blockchain application with Cadence smart contracts and FCL front ## MCP servers -- Use flow-mcp for reading blockchain data, managing aClaudeounts, checking balances, and interacting with native contracts. -- Use flow-defi-mcp fro checking token prices, swapping tokens on decentralized exchanges, and interacting with ERC20 tokens. +- Use flow-mcp to read blockchain data, manage accounts, check balances, and interact with native contracts. +- Use flow-defi-mcp to check token prices, swap tokens on decentralized exchanges, and interact with ERC20 tokens. ## Architecture notes -[Document your specific project architecture, contract relationships, and deployment strategies] +Document your specific project architecture, contract relationships, and deployment strategies ``` #### 3. Nested CLAUDE.md files -You can maintain a more granular control of the capabilities of Claude when working with different areas of your repo by creating specialized instructions for different project areas. To do this, place a nested `CLAUDE.md` file in subdirectories in your repo(cadence, frontend, backend, and so on). Claude will automatically read these files when working on these subdirectories. Here is an example: +To maintain a more granular control of the capabilities of Claude when you work with different areas of your repo, you can create specialized instructions for different project areas. To do this, place a nested `CLAUDE.md` file in subdirectories in your repo(cadence, frontend, backend, and so on). Claude will automatically read these files when working on these subdirectories. Here is an example: **cadence/.claude/CLAUDE.md:** @@ -240,11 +240,11 @@ You can also create a `CLAUDE.local.md` file that is used just for you and not s ## Workflow strategies -Claude excels when following a structured development approach. We recommend you implement this four-stage methodology: +Claude excels when it follows a structured development approach. We recommend you implement this four-stage methodology: ### Stage 1: Idea development -**Objective**: Bounce ideas with Claude to have a better understanding of what you can build and why it would work. +**Objective**: Bounce ideas with Claude to better understand of what you can build and why it would work. **Process**: @@ -268,9 +268,9 @@ Claude Response: [Analyzes requirements, suggests NFT architecture, identifies g - Flow-specific implementation considerations. - Resource and timeline estimates. -### Stage 2: visualization +### Stage 2: Visualization -**Objective**: Create visual representations and demos to validate project concepts before development. You can use Claude during this process, but it is best to combine LLM models like Gemini 2.5 in order to create the visual representations. +**Objective**: Create visual representations and demos to validate project concepts before development. You can use Claude with this process, but it is best to combine LLM models like Gemini 2.5 in order to create the visual representations. **Tools and techniques**: @@ -294,12 +294,12 @@ User: "Create a diagram showing how card evolution works in my game" ### Stage 3: Planning with Claude code -**Objective**: Break down the project into manageable, incremental development tasks using Claude's planning capabilities. +**Objective**: Break down the project into manageable, incremental development tasks with Claude's planning capabilities. **Planning process**: -1. **Enable Planning Mode**: Explicitly tell Claude you're in planning phase or cycle through the different modes (with `Shift` + `Tab`) until you reach Plan Mode -2. **Confirm Knowledge Comprehension**: Ask Claude to read important files first and then confirm the knowledge with you. Immediately ask it questions about the codebase to verify its knowledge +1. **Turn On Planning Mode**: Explicitly tell Claude you're in planning phase or cycle through the different modes (with `Shift` + `Tab`) until you reach Plan Mode. +2. **Confirm Knowledge Comprehension**: Ask Claude to read important files first and then confirm the knowledge with you. Immediately ask it questions about the codebase to verify its knowledge. 3. **Plan Generation**: Tell Claude to generate an action plan that is incremental and has specific goals and checkpoints (this file can be called `T0-DO.md` and placed in a `/tasks` folder that contains relevant information about the completion of specific tasks or steps). 4. **Task Breakdown**: Request comprehensive task decomposition for incremental changes. 5. **Dependency Mapping**: Identify task dependencies and critical path. @@ -327,24 +327,24 @@ Task 2: Add game mechanics [Continues with detailed breakdown] ``` -**Planning outputs**: +**Plan outputs**: - Generate a detailed to-do list that is thoroughly divided between goals, objectives, checkpoints and tasks that need to be achieved in an incremental manner. - Dependency graph showing task relationships. -- Testing strategy for each development phase. +- Test strategies for each development phase. - Deployment sequence and validation protocols. -A downside of using Claude is that it doesn't have a checkpoint control like the agent chat does in Cursor. So making frequent git commits and working on separate branches can help you mitigate this. Never attempt to give Claude a big task as it most likely doesn't have enough knowledge about the task at hand to complete it suClaudeessfully. +A downside of Claude is that it doesn't have a checkpoint control like the agent chat does in Cursor. If you make frequent git commits and work on separate branches, it can help mitigate this. Never attempt to give Claude a big task as it most likely doesn't have enough knowledge about the task at hand to complete it successfully. -### Stage 4: build execution +### Stage 4: Build execution -**Objective**: Implement planned tasks systematically using Claude's development capabilities. +**Objective**: Implement planned tasks systematically with Claude's development capabilities. **Build process**: 1. **Task Assignment**: Work on one incremental task at a time. 2. **Implementation**: Use Claude to generate code, debug issues, and optimize solutions. -3. **Reporting**: After completing a task, Claude generates a report of what it did and why it did it in a `.md` file in the `/tasks` folder so that you can have a better understanding of the changes made. +3. **Reporting**: After it completes a task, Claude generates a report of what it did and why it did it in a `.md` file in the `/tasks` folder so that you can have better understand the changes made. 3. **Validation**: Test each component thoroughly before you proceed. 4. **Documentation**: Generate inline documentation and update project docs. 5. **Checkpoint**: Commit working code with descriptive messages. @@ -373,17 +373,17 @@ For complex Flow projects, leverage Claude's subagent capabilities to handle par **When to use subagents**: -- Developing multiple contracts simultaneously. +- To develop multiple contracts simultaneously. - Frontend and backend development in parallel. -- Testing different implementation approaches. +- To test different implementation approaches. - Documentation generation while coding. -- Dealing with a big task so that Claude can deploy subagents to break down the task into smaller components that are running in parallel. +- To deal with a big task so that Claude can deploy subagents to break down the task into smaller components that are running in parallel. **Example subagent usage**: ``` User: "Create subagents to develop the NFT contract and the marketplace contract in parallel" -[Claude spawns separate conversation threads for each contract, maintaining coordination between them] +[Claude spawns separate conversation threads for each contract, which maintains coordination between them.] ``` ### Auto-verification and iteration @@ -394,28 +394,28 @@ Configure Claude to automatically verify its work and iterate for improvements: - **Compilation Checks**: Automatically test Cadence syntax after code generation. - **Test Execution**: Run unit tests and integration tests after implementation. -- **Deployment Validation**: Verify contract deployment on emulator before suggesting testnet deployment. +- **Deployment Validation**: Verify contract deployment on emulator before you suggest testnet deployment. ### Memory and context management -**Using the # memory mode**: +**Use the # memory mode**: Press `#` to enter memory mode and specify important information for Claude to remember: ``` # Remember that this project uses a modular NFT architecture with separate traits contracts. -# Remember that we need to use a DS Proxy system for upgrading contracts. +# Remember that we need to use a DS Proxy system for contract upgrades. ``` **Context optimization**: -- Use `Ctrl+R` for verbose output when debugging complex issues. +- Use `Ctrl+R` for verbose output when you debug complex issues. - Compact conversations at natural breakpoints (around 20% context usage). -- Constantly refactor `CLAUDE.md` to take into aClaudeount changes made throughout the development process. +- Constantly refactor `CLAUDE.md` to take into accounts changes made throughout the development process. - Maintain focused conversations for specific development tasks. ## Development workflows and best practices -Give Claude some sort of tool it can use for feedback (MCP or tool) to check its work and it will iterate by itself to get better results. Claude has the ability to iterate for hours if needed, but it needs to be able to analyze its work. These alternative workflows can be very useful as well, depending on your ability to close the feedback loop so that Claude can analyze and comprehend the results of its code generation: +Give Claude some sort of tool it can use for feedback (MCP or tool) to check its work and it will iterate by itself to get better results. Claude can iterate for hours if needed, but it needs to be able to analyze its work. These alternative workflows can be very useful as well, but they depend on your ability to close the feedback loop so that Claude can analyze and comprehend the results of its code generation: ### Test-driven development with Claude @@ -451,7 +451,7 @@ Claude: "I see the card layout needs improvement. Let me adjust the CSS..." **Best practices**: -- Commit after each completed task +- Commit after each completed task. - Use descriptive commit messages that Claude generates. - Create branches for experimental features. - Tag stable releases for easy rollback. @@ -477,7 +477,7 @@ Checkpoint: Basic NFT functionality complete" 1. **Error Analysis**: Provide Claude with complete error messages and context. 2. **Root Cause Investigation**: Let Claude analyze potential causes. 3. **Solution Implementation**: Apply suggested fixes incrementally. -4. **Verification**: Test fixes thoroughly before proceeding. +4. **Verification**: Test fixes thoroughly before you proceed. 5. **Documentation**: Update project documentation with lessons learned. **Example debugging session**: @@ -501,7 +501,7 @@ Claude: "Let me analyze the auth capability requirements. I see the issue is wit 5. **Mainnet Preparation**: Final validation and deployment to mainnet. -### MCP server sharing +### MCP server share You can set up [MCPs] for Claude to use as tools. These can also be set up in the `CLAUDE.md` file so that every team member consistently uses the same MCPs. Share the `/Claude/mcp.json` files so that the team can use the same MCP servers. @@ -530,7 +530,7 @@ claude mcp add flow-defi-mcp - Include `CLAUDE.md` files in version control. - Document MCP server configurations in README. -- Share `CLAUDE.local.md` patterns (without committing personal configs). +- Share `CLAUDE.local.md` patterns (and don't commit personal configs). - Maintain team coding standards through shared AI instructions. ## Key bindings and shortcuts @@ -540,10 +540,10 @@ claude mcp add flow-defi-mcp | Shortcut | Function | Flow Development Usage | |-------------|-------------------|------------------------| | `#` | Memory mode | Store project architecture decisions | -| `Shift+Tab` | Auto-aClaudeept edits | Quickly aClaudeept generated Cadence code | +| `Shift+Tab` | Auto-accept edits | Quickly accept generated Cadence code | | `!` | Bash mode | Execute Flow CLI commands directly | | `@` | Add file/folder | Reference contracts, transactions, configs | -| `Esc` | Cancel operation | Stop incorrect generation/execution | +| `Esc` | Cancel operation | Stop incorrect generation and execution | | `Ctrl+R` | Verbose output | Detailed debugging for complex issues | ### Flow-specific usage patterns @@ -569,7 +569,7 @@ claude mcp add flow-defi-mcp **Context window management**: -- Compact conversations at natural breakpoints or manually at around 20% of context usage remaining. +- Compact conversations at natural breakpoints or manually when around 20% of context usage remains. - Use focused sub-conversations for specific tasks. - Reference key files rather than copying entire contents. @@ -578,7 +578,7 @@ claude mcp add flow-defi-mcp - Use the $200/month plan for complex Flow projects. - Turn on auto-compact to prevent context overflow. - Break large tasks into smaller, focused conversations. -- Hit `Esc` often if you see the agent is going on the wrong path and ask it to undo its recent action. +- Hit `Esc` often if you see the agent on the wrong path and ask it to undo its recent action. **Integration problems**: diff --git a/docs/blockchain-development-tutorials/use-AI-to-build-on-flow/llms/gemini.md b/docs/blockchain-development-tutorials/use-AI-to-build-on-flow/llms/gemini.md index c5494d822f..629e78d8e0 100644 --- a/docs/blockchain-development-tutorials/use-AI-to-build-on-flow/llms/gemini.md +++ b/docs/blockchain-development-tutorials/use-AI-to-build-on-flow/llms/gemini.md @@ -20,7 +20,7 @@ keywords: [Gemini AI] is Google's AI assistant that can help with tasks such as writing, coding, and answering questions. It adapts to context and user input to provide relevant, conversational responses. You can integrate Gemini AI into developer workflows to assist with documentation, debugging, and productivity. -This guide walks you through creating a **Custom GEM** with Gemini AI that can reference the [Flow Data Sources] file to answer questions. +This guide walks you through how to create a **Custom GEM** with Gemini AI that can reference the [Flow Data Sources] file to answer questions. :::warning @@ -43,7 +43,7 @@ You'll need a [Gemini Advanced subscription] to use the **Custom GEM** feature. ## Step 3: Configure your Gem -Gemini AI will now guide you through setting up your custom Gem. Configure the name, description and instructions for your GEM to follow. +Gemini AI will now guide you through how to set up up your custom Gem. Configure the name, description and instructions for your Gem to follow. ### Suggested configuration @@ -68,11 +68,11 @@ When users ask about Flow, Cadence, or related topics, prioritize information fr ``` -You can further customize your personalized agent by providing more files and determining the actions it can do. +To further customize your personalized agent, you can provide more files and determine the actions it can do. --- -## Step 4: Upload Knowledge Base +## Step 4: Upload knowledge base 1. In the **Knowledge** section, upload the [Flow Data Sources All Merged] file. 2. Configure the Gem to reference this file as its primary knowledge source. diff --git a/docs/blockchain-development-tutorials/use-AI-to-build-on-flow/llms/index.md b/docs/blockchain-development-tutorials/use-AI-to-build-on-flow/llms/index.md index 4f20c6560e..8c02fdc5da 100644 --- a/docs/blockchain-development-tutorials/use-AI-to-build-on-flow/llms/index.md +++ b/docs/blockchain-development-tutorials/use-AI-to-build-on-flow/llms/index.md @@ -17,11 +17,11 @@ keywords: # Large Language Models (LLMs) -Large Language Models (LLMs) have revolutionized software development by providing intelligent assistance, code generation, and comprehensive knowledge access. You will learn how to enhance your Flow development experience by using these LLMs. Each tutorial demonstrates how to configure specialized AI assistants that understand Flow's unique features, Cadence smart contract development, and the broader Flow ecosystem. +Large Language Models (LLMs) have revolutionized software development by providing intelligent assistance, code generation, and comprehensive knowledge access. You will learn how to enhance your Flow development experience with these LLMs. Each tutorial demonstrates how to configure specialized AI assistants that understand Flow's unique features, Cadence smart contract development, and the broader Flow ecosystem. ## [Use Flow Knowledge Base in ChatGPT] -Learn how to create a Custom GPT using ChatGPT that can reference Flow's comprehensive documentation to answer development questions. This guide walks you through setting up FlowGPT with OpenAI's platform, configuring it with Flow Data Sources, and optimizing it for Cadence smart contract development. The tutorial covers the complete GPT creation process, from initial setup through testing and deployment, allowing you to have an AI assistant that understands Flow's architecture, tools, and best practices. +Learn how to create a Custom GPT with ChatGPT that can reference Flow's comprehensive documentation to answer development questions. This guide walks you through how to set up FlowGPT with OpenAI's platform, configure it with Flow Data Sources, and optimize it for Cadence smart contract development. The tutorial covers the complete GPT creation process, from initial setup through testing and deployment, which allows you to have an AI assistant that understands Flow's architecture, tools, and best practices. ## [Use Flow Knowledge Base in Gemini AI] @@ -29,13 +29,13 @@ Discover how to build a Custom GEM using Google's Gemini AI platform that specia ## [Claude Code for Flow Development] -Master the comprehensive development approach using Claude Code (Claude) for Flow blockchain applications. This extensive guide covers the four-stage development methodology (Idea → Visualization → Planning → Build), advanced features like subagents and auto-verification, and systematic deployment strategies. Learn how to configure persistent project context through `CLAUDE.md` files, implement checkpoint-based development workflows, and leverage Claude's unlimited context windows for complex Cadence smart contract projects and cross-VM applications. +Master the comprehensive development approach with Claude Code (Claude) for Flow blockchain applications. This extensive guide covers the four-stage development methodology (Idea → Visualization → Planning → Build), advanced features like subagents and auto-verification, and systematic deployment strategies. Learn how to configure persistent project context through `CLAUDE.md` files, implement checkpoint-based development workflows, and leverage Claude's unlimited context windows for complex Cadence smart contract projects and cross-VM applications. --- ## Conclusion -These tutorials provide a comprehensive foundation for integrating AI assistance into your Flow development workflow. By leveraging ChatGPT's Custom GPTs, Gemini AI's Custom GEMs, and CC's advanced development capabilities, you can significantly enhance your productivity while building on Flow. Each platform offers unique strengths that complement different aspects of blockchain development, from quick documentation queries to comprehensive project management and systematic code generation. +These tutorials provide a comprehensive foundation for how to integrate AI assistance into your Flow development workflow. When you leverage ChatGPT's Custom GPTs, Gemini AI's Custom GEMs, and CC's advanced development capabilities, you can significantly enhance your productivity and build on Flow. Each platform offers unique strengths that complement different aspects of blockchain development, from quick documentation queries to comprehensive project management and systematic code generation. diff --git a/docs/blockchain-development-tutorials/use-AI-to-build-on-flow/mcp/contribute-to-mcp.md b/docs/blockchain-development-tutorials/use-AI-to-build-on-flow/mcp/contribute-to-mcp.md index 3aff24b55c..ee3f0a72eb 100644 --- a/docs/blockchain-development-tutorials/use-AI-to-build-on-flow/mcp/contribute-to-mcp.md +++ b/docs/blockchain-development-tutorials/use-AI-to-build-on-flow/mcp/contribute-to-mcp.md @@ -14,7 +14,7 @@ keywords: # Contribute to Flow MCP -This tutorial will guide you through the process of contributing to the Flow MCP server. The [Model Context Protocol (MCP)] is an open standard developed by Anthropic that allows AI applications to interact seamlessly with external tools, systems, and data sources. +This tutorial will guide you through how to contribute to the Flow MCP server. The [Model Context Protocol (MCP)] is an open standard developed by Anthropic that allows AI applications to interact seamlessly with external tools, systems, and data sources. ## Learning objectives @@ -77,7 +77,7 @@ After you complete this tutorial, you should be able to: And we recommended that you add a test for your new tool in the `src/tools/your-tool-name/your-tool.test.ts` file. -3. Add a prompt export in the `src/prompts` directory which is used to confirm that MCP clients can understand the new tool. You can refer to the existing tools for examples. +3. Add a prompt export in the `src/prompts` directory which is used to confirm that MCP clients can understand the new tool. You can refer to the current tools for examples. 4. Add your new tool to the `src/tools/index.ts` file. diff --git a/docs/blockchain-development-tutorials/use-AI-to-build-on-flow/mcp/index.md b/docs/blockchain-development-tutorials/use-AI-to-build-on-flow/mcp/index.md index 0e17252aa6..4f3fa344bd 100644 --- a/docs/blockchain-development-tutorials/use-AI-to-build-on-flow/mcp/index.md +++ b/docs/blockchain-development-tutorials/use-AI-to-build-on-flow/mcp/index.md @@ -16,19 +16,19 @@ keywords: The Model Context Protocol (MCP) is an open standard that allows AI applications to interact seamlessly with external tools, systems, and data sources. Flow MCP extends this protocol to provide AI tools with direct access to Flow blockchain data, smart contracts, and onchain operations. This integration allows developers to enhance their AI-powered development workflows with real-time blockchain information and automated Flow interactions. -Flow MCP transforms how developers work with the Flow blockchain by bringing blockchain capabilities directly into AI-powered code editors and development tools, which eliminates the need to switch between different interfaces and allows more efficient, context-aware development experiences. +Flow MCP transforms how developers work with the Flow blockchain. It brings blockchain capabilities directly into AI-powered code editors and development tools, which eliminates the need to switch between different interfaces and allows more efficient, context-aware development experiences. ## [Use Flow MCP in Cursor] -Learn how to integrate the Flow MCP server with Cursor to turn on AI-driven blockchain queries directly within your code editor. This tutorial guides you through how to set up Flow MCP in Cursor, which allows the AI to fetch onchain data such as account balances, contract information, and blockchain state without leaving your development environment. By the end of this tutorial, you'll be able to ask Cursor's AI to perform Flow blockchain operations, speed up development workflows, and access live blockchain data for enhanced debugging and prototyping. +Learn how to integrate the Flow MCP server with Cursor to turn on AI-driven blockchain queries directly within your code editor. This tutorial guides you through how to set up Flow MCP in Cursor, which allows the AI to fetch onchain data such as account balances, contract information, and blockchain state without the need to leave your development environment. By the end of this tutorial, you'll be able to ask Cursor's AI to perform Flow blockchain operations, speed up development workflows, and access live blockchain data for enhanced debugging and prototyping. ## [Contribute to Flow MCP] -Discover how to extend the Flow MCP server by creating custom Action Tools that add new blockchain interaction capabilities. This comprehensive guide walks you through the development process, from how to set up the development environment to how to submit pull requests for new features. Learn to create new tools with proper schemas, handlers, and tests, while following Flow MCP's contribution guidelines. This tutorial empowers developers to expand the Flow MCP ecosystem by adding specialized blockchain tools that benefit the entire Flow developer community. +Discover how to create custom Action Tools that add new blockchain interaction capabilities and extend the Flow MCP server. This comprehensive guide walks you through the development process, from how to set up the development environment to how to submit pull requests for new features. Learn to create new tools with proper schemas, handlers, and tests, while you follow Flow MCP's contribution guidelines. This tutorial empowers developers to expand the Flow MCP ecosystem with specialized blockchain tools that benefit the entire Flow developer community. ## Conclusion -Flow MCP bridges the gap between AI development tools and blockchain functionality, which allows developers to access Flow's comprehensive blockchain features directly through AI-powered interfaces. Whether you're using MCP tools in Cursor or contributing new capabilities to the Flow MCP server, these tutorials provide the foundation for integrating blockchain operations into your AI-enhanced development workflow. +Flow MCP bridges the gap between AI development tools and blockchain functionality, which allows developers to access Flow's comprehensive blockchain features directly through AI-powered interfaces. Whether you use MCP tools in Cursor or want to contribute new capabilities to the Flow MCP server, these tutorials provide the foundation for you to integrate blockchain operations into your AI-enhanced development workflow. diff --git a/docs/blockchain-development-tutorials/use-AI-to-build-on-flow/mcp/use-mcp-in-cursor.md b/docs/blockchain-development-tutorials/use-AI-to-build-on-flow/mcp/use-mcp-in-cursor.md index 39babcef7f..083e665731 100644 --- a/docs/blockchain-development-tutorials/use-AI-to-build-on-flow/mcp/use-mcp-in-cursor.md +++ b/docs/blockchain-development-tutorials/use-AI-to-build-on-flow/mcp/use-mcp-in-cursor.md @@ -26,14 +26,14 @@ keywords: > -Adding Flow MCP to Cursor gives you powerful AI-driven tools directly inside your code editor. It allows Cursor's AI to understand, query, and interact with Flow blockchain data and smart contracts through a standard protocol called the Model Context Protocol (MCP). +When you add Flow MCP to Cursor, it gives you powerful AI-driven tools directly inside your code editor. It allows Cursor's AI to understand, query, and interact with Flow blockchain data and smart contracts through a standard protocol called the Model Context Protocol (MCP). Specifically, it lets you: -- Ask the AI in Cursor to fetch onchain data such as account balances, account information, or contract source code without leaving your editor. -- Speed up development by letting AI perform blockchain queries that would normally require manual steps. -- Improve context for AI assistance by allowing Cursor to pull real blockchain data when needed. -- Automate routine Flow tasks using tools exposed by the MCP server. +- Ask the AI in Cursor to fetch onchain data such as account balances, account information, or contract source code without the need to leave your editor. +- Speed up development when you have AI perform blockchain queries that would normally require manual steps. +- Improve context for AI assistance if you let Cursor to pull real blockchain data when needed. +- Automate routine Flow tasks with tools exposed by the MCP server. - Prototype and debug faster with direct access to live blockchain information. This tutorial will guide you through setting up and using Flow MCP in [Cursor] to enhance your Flow blockchain development experience with AI assistance. @@ -42,7 +42,7 @@ This tutorial will guide you through setting up and using Flow MCP in [Cursor] t After you complete this tutorial, you should be able to: -- Configure Cursor to connect with the Flow MCP server using the MCP protocol. +- Configure Cursor to connect with the Flow MCP server with the MCP protocol. - Install and launch the Flow MCP server locally through Cursor. - Identify when Flow MCP tools successfully load and are ready inside Cursor. - Use Flow MCP tools to retrieve blockchain data such as account balances, account details, and contract source code. @@ -61,7 +61,7 @@ After you complete this tutorial, you should be able to: 2. Configure the MCP configuration file in Cursor: - The MCP configuration file is located at the following location based on your operating system: + The MCP configuration file resides at this location based on your operating system: - macOS: `~/Library/Application Support/Claude/mcp.json` - Windows: `%APPDATA%/Claude/mcp.json` @@ -100,14 +100,14 @@ After you complete this tutorial, you should be able to: ![Sample Image 3](./imgs/sample-3.png) -## Troubleshooting +## Troubleshoot If you encounter any issues: 1. Ensure the MCP server is properly installed. 2. Verify the configuration file is in the correct location. 3. Check that the paths in the configuration are correct. -4. Try restarting Cursor. +4. Try to restart Cursor. 5. Check the console for any error messages. ## Additional resources