Skip to main content

How To Use NEAR Intents With OpenClaw

 How To Use NEAR Intents With OpenClaw

February 3, 2026


OpenClaw—previously known as Clawdbot and Moltbot—is an open-source personal agent framework that has become one of the fastest-growing repositories in GitHub history. It's essentially Claude with a Unix philosophy—runs locally, has filesystem access, can execute commands, and talks to your messaging apps. The interesting part? When you wire it up to NEAR Intents, you get an AI agent that can autonomously manage cross-chain assets.

Here's a deep dive tutorial on how to set it up and why you might actually want to.

Note: Some of the screenshots in this tutorial include old Moltbot nomenclature. “OpenClaw” is Moltbot’s newest official name. 

What OpenClaw Actually Is

OpenClaw is an open-source AI assistant that you run on your own hardware. Unlike chatbots that live in someone else's cloud, OpenClaw runs wherever you want: your laptop, a VPS, a home server. (You can now run OpenClaw on NEAR AI Cloud for hardware-enforced security plus cryptographic privacy guarantees).

The architecture is modular. At its core, OpenClaw is a gateway that:

  • Executes shell commands
  • Reads and writes files
  • Integrates with Discord, Telegram, Slack, iMessage, etc.
  • Supports pluggable "skills" (basically tool definitions for the LLM)

OpenClaw’s power comes from extensibility. You can teach it new capabilities by adding tools. And when you add NEAR Intents as a skill, you get an AI that can execute cross-chain swaps through natural language.

No more "bridge to chain X, swap on DEX Y, bridge back." Just "swap my USDC for SOL" and it figures out the routing. This means you can build some pretty powerful trading applications with OpenClaw. 

Security Considerations With OpenClaw

Important: Before you connect chat apps, understand OpenClaw’s permission model. Use mention-only mode for group chats. Default config is basically "anyone can tell your computer to do anything." That's not great.

Security researcher Daniel Miessler audited OpenClaw and found 10 critical vulnerabilities in default installs. We’re listing them below because if you deploy this without fixing them, you're taking serious risks. 

Security hardening checklist: 

  1. Gateway exposed on 0.0.0.0:18789 → Set gateway.auth.token
  2. DM policy allows all users → Use allowlist, not default-allow
  3. Sandbox disabled → Enable sandbox=all + [docker.network](<http://docker.network>)=none
  4. Plaintext creds in oauth.json → Use env vars + chmod 600
  5. Prompt injection via web scraping → Wrap untrusted content in safety tags
  6. Dangerous commands allowed → Block rm -rf, curl | bash, git push --force
  7. No network isolation → Docker network isolation is mandatory
  8. Elevated tool access → Minimize MCP tool permissions
  9. No audit logs → Enable session logging
  10. Weak pairing codes → Use cryptographic random + rate limiting

Full visual breakdown: Daniel Miessler's security analysis

Real talk: OpenClaw gives the LLM full access to your machine. That's the feature, not a bug. But you need to treat it like you're handing your laptop to a stranger. Secure it accordingly.

https://x.com/DanielMiessler/status/

NEAR Intents: The "What" Not the "How"

Alright, so why wire OpenClaw to NEAR Intents specifically?

Traditional blockchain UX makes you specify every step when swapping assets between chains: "Approve token X, call contract Y with parameters Z, wait for confirmation, bridge to chain A, swap on DEX B..." It's exhausting.

NEAR Intents flips this and simplifies the process for the user. You specify the outcome ("I want SOL"), and a network of solvers competes to execute it for you. You don't care about the path—you care about the result. The solvers care about your business, so you end up getting the most competitive deal, with the least friction.

How NEAR Intents Works Under the Hood



NEAR Intents has four key components:

  1. Distribution Channels – Where users express intents (could be a dApp, a CLI, or in our case, an AI agent)
  2. Market Makers – Entities providing liquidity to fulfill swaps
  3. Message Bus (Solver Relay) – Off-chain layer where solvers compete on quotes
  4. Verifier Contract – Onchain NEAR contract that settles trades atomically

When you say "swap 100 USDC on Arbitrum for SOL," the flow is:

  1. Your intent gets broadcast to the solver network
  2. Solvers compete to give you the best quote
  3. You pick one (or the system auto-picks)
  4. The Verifier Contract executes atomically—either the whole trade succeeds or nothing happens

No partial execution. No stuck bridges. No "oops, you got frontrun and now you have wrapped tokens on the wrong chain."

NEAR Intents 1Click API

For developers (and AI agents), the 1Click API is your interface to NEAR Intents.

It abstracts all the solver negotiation and gives you a clean REST API:

  • GET /tokens – List 125+ supported assets
  • POST /quote – Get competing quotes
  • POST /deposit – Submit your swap
  • GET /status – Track execution

This is what OpenClaw talks to when you tell it to swap assets.

Wiring Up OpenClaw + NEAR Intents

Install near-intents-cli

Getting OpenClaw connected to NEAR Intents is simpler than you might think. We will guide you through deploying OpenClaw on Railway and setting up NEAR Intents so you can start trading and managing crypto right from your Telegram bot (or Slack/Discord).

Prerequisites

Before you start, make sure you have:

  • A Telegram account
  • An AI provider API key (NEAR AI Private Cloud, OpenAI, Anthropic, Google, etc.)
  • A deployment platform account (we’ll use Railway in this guide, but you have other options)

Part 1: Deploy OpenClaw

OpenClaw can be deployed in several ways depending on your preferences and technical comfort level. You can find all installation options at https://docs.openclaw.ai/install, including:

  • Railway (cloud deployment, easiest setup)
  • Render (alternative cloud platform)
  • Docker (self-hosted, more control)
  • Northflank (cloud deployment)
  • Direct installation (run it on your own server)

For this guide, we’ll use Railway because it offers the quickest path from zero to a working bot. The one-click template handles most of the heavy lifting, and you can get started without touching any code or configuration files. If you prefer a different deployment method, the setup process after deployment will be similar—you’ll still access the admin panel and configure OpenClaw the same way.

Step 1: Deploy the Railway Template

Head over to https://docs.openclaw.ai/railway and click the “Deploy on Railway” button. This will take you to the OpenClaw Railway template page. You’ll need a Railway account—the free tier works perfectly fine for getting started.

Once you’re on the template page, click “Deploy Now” to start the deployment process.

Step 2: Set Your Password

This step is important. Railway will ask you to set up environment variables. You’ll see a field for SETUP_PASSWORD. Pick something secure and remember it—you’ll need this to access the OpenClaw admin panel.


After setting your password, click “Deploy” and wait for Railway to build and deploy your instance. This usually takes a few minutes.

Step 3: Access the Admin Panel

Once deployment is done, Railway will give you a public URL. Open that URL in your browser. You’ll see a login screen asking for credentials.


Use these credentials:

  • Username: admin
  • Password: The password you set in Step 2

If you forgot your password, no worries. Go back to your Railway dashboard, navigate to your project’s environment variables, and you’ll find it under SETUP_PASSWORD.

Step 4: Configure OpenClaw

After logging in, you’ll see the OpenClaw setup wizard. This is where you configure the AI provider that will power your bot.


Choose your AI provider from the dropdown menu. 

Enter your API key for the chosen provider. Most providers offer free credits or trials if you’re just getting started.

Step 5: Create Your Telegram Bot

Now you need to create an actual Telegram bot. Open Telegram and search for @BotFather. This is Telegram’s official bot for creating other bots.

Send /newbot to BotFather and follow the prompts:

  1. Choose a name for your bot
  2. Choose a username (must end in “bot”)
  3. BotFather will give you an API token

Copy that token—you’ll need it in the next step.

Step 6: Finalize Setup

Back in the OpenClaw admin panel, paste your Telegram bot token into the appropriate field. You can also add other optional channels like Discord or Slack if you want, but Telegram is the main one for NEAR Intents.

Click “Run setup” and wait. The setup process will take a minute or two.

Step 7: Pair Your Bot

Once setup completes, open your Telegram bot and send /start. The bot will respond with a pairing code.

Copy that pairing code, go back to your browser where the OpenClaw admin panel is open, and click “Approve pairing”. Enter the pairing code when prompted.

If everything went well, you’ll see a success message. Your bot is now connected and ready to use.

Part 2: Installing NEAR Intents

Now that OpenClaw is running, let’s add NEAR Intents’ functionality. This is what allows your bot to interact with the NEAR Protocol and perform cross-chain swaps.

The NEAR Intents CLI is distributed as an npm package. You can find it at npmjs.com/package/near-intents-cli.

In your Telegram bot, send this command:

install near-intents-cli

OpenClaw will install the package and let you know when it’s ready.

Step 2: Set Up Your Wallet

After installation, you need to configure a wallet. You have two options here:

  1. Generate a new wallet (recommended): Let OpenClaw create a fresh wallet specifically for the bot
  2. Use your own private key: Import an existing wallet

Important: For security reasons, it’s strongly recommended to let OpenClaw generate its own wallet address rather than sharing your personal wallet’s private key with the bot. If you do choose to use your own key, make sure you understand the security implications.

To generate a new wallet, simply tell the bot:

generate wallet for me

The bot will create a new wallet and give you the address. Make note of this address - you’ll need to fund it before you can start trading.

Step 3: Fund Your Wallet

Before you can trade, you need to deposit some crypto. NEAR Intents works across multiple chains, so you can deposit on networks like Arbitrum, Ethereum, or others.

For this example, let’s deposit ETH on Arbitrum. Tell your bot:

I want to deposit ETH of arbitrum

The bot will give you a deposit address on Arbitrum. Send some ETH to that address from your regular wallet. Once the transaction confirms, you can check your balance:

Check my balances

The bot will show you a table of your balances across different chains.

Step 4: Make Your First Trade

Now for the fun part—let’s swap some tokens. With NEAR Intents, you can swap across chains without dealing with bridges manually. The protocol handles all the cross-chain complexity behind the scenes.

Want to trade ETH for NEAR? Just tell the bot:

Trade 0.002 ETH to Near

The bot will execute the swap and show you the details:

  • How much you sent
  • How much you received
  • The exchange rate
  • Transaction hash

Check your balances again to see your new NEAR tokens:

Check balances

Step 5: Withdraw to Any Network

When you’re ready to move your tokens out, you can withdraw to any supported network. Just specify the amount, token, and destination address:

withdraw 4 Near to 999341b24b53c68fa85c0668b54

35319d9638e175d385c0f66a4e420f59ef37e


The bot will submit the withdrawal and give you a transaction hash so you can track it on the blockchain explorer.

What You Can Do With OpenClaw + NEAR Intents

Once you have everything set up, your OpenClaw can handle a variety of tasks:

  • Deposit tokens on multiple chains (Ethereum, Arbitrum, NEAR, etc.)
  • Swap tokens across chains without manual bridging
  • Check balances across all supported networks
  • Withdraw to any address on supported networks
  • Track transactions with automatic transaction hash links

The natural language interface means you don’t need to remember exact command syntax. Just tell the bot what you want to do, and it figures out the rest.

Troubleshooting

Bot not responding? Make sure you completed the pairing process. Go back to the admin panel and check if the pairing was successful.

Installation failed? Check that your OpenClawinstance has internet access and npm is properly configured. Most cloud deployments (Railway, Render, etc.) should have this by default.

Transactions not going through? Make sure your wallet has enough funds to cover both the transaction amount and gas fees. Also verify that you’re using the correct network when depositing.

Can’t find the deposit address? Ask the bot again with a specific request like “I want to deposit ETH on Arbitrum” or “show me my deposit addresses.”

Installation Thoughts

The setup is flexible—whether you choose Railway for quick deployment, Docker for self-hosting, or any other method from the installation docs, the result is the same. OpenClaw’s natural language processing combined with NEAR Intents’ cross-chain functionality gives you a setup that’s both powerful and accessible. Whether you’re testing small trades or managing larger positions, having everything in one conversational interface makes the whole process smoother.

The Privacy Problem With OpenClaw (and NEAR AI Solution)

Here's the catch with OpenClaw: it keeps memory local, which is great for privacy. But the moment you connect it to a remote LLM like Claude or GPT-4, all your prompts and context get shipped to third-party servers. For personal use? Maybe fine. For enterprise? Absolutely not. 

NEAR AI Cloud: Private, Verifiable Inference

With NEAR AI Cloud, you can now run OpenClaw inside Trusted Execution Environments for:

  • Hardware-level memory encryption
  • Cryptographic attestation of what code is running
  • Provider-blind execution—NEAR AI cannot inspect your workload

This means long-term memory, credentials, and tool access can persist without ever leaving encrypted memory—even while running in the cloud. You get cloud convenience with security guarantees that ad hoc local hardware in your closet or standard VPS deployments cannot match. 

Why This Matters: Autonomous AI Financial Agents, Private By Default

OpenClaw + NEAR Intents gives you an autonomous AI financial agent. You describe what you want in plain English, and it executes cross-chain operations for you. Right now NEAR Intents supports 125+ assets across multiple chains with over $11B in total volume. As that grows, the AI-driven automation possibilities expand proportionally. We're moving from "blockchains as databases you manually operate" to "blockchains as intent execution layers where agents do the work."

With NEAR AI Cloud, you give your autonomous AI financial agent cryptographic privacy guarantees so you can empower agents to manage cross-chain assets with confidence and control.

These are the primitives for a unified commerce layer across assets and agents, and the foundation for a user-owned AI economy.

Resources

Join the community: