skills$openclaw/autonomous-agent
josephrp6.7k

by josephrp

autonomous-agent – OpenClaw Skill

autonomous-agent is an OpenClaw Skills integration for ai ml workflows. CreditNexus x402 agent. Use when the user wants to create and use wallets (Aptos/EVM), fund wallets, check balances, run stock predictions, backtests, open bank accounts, or transfer/swap tokens. Payment-protected MCP tools with x402 flow (Aptos + Base). Agent handles 402 → pay → retry autonomously.

6.7k stars564 forksSecurity L1
Updated Feb 7, 2026Created Feb 7, 2026ai ml

Skill Snapshot

nameautonomous-agent
descriptionCreditNexus x402 agent. Use when the user wants to create and use wallets (Aptos/EVM), fund wallets, check balances, run stock predictions, backtests, open bank accounts, or transfer/swap tokens. Payment-protected MCP tools with x402 flow (Aptos + Base). Agent handles 402 → pay → retry autonomously. OpenClaw Skills integration.
ownerjosephrp
repositoryjosephrp/autonomous-agent
languageMarkdown
licenseMIT
topics
securityL1
installopenclaw add @josephrp/autonomous-agent
last updatedFeb 7, 2026

Maintainer

josephrp

josephrp

Maintains autonomous-agent in the OpenClaw Skills directory.

View GitHub profile
File Explorer
58 files
.
adapters
anthropic
tools.json
3.2 KB
local
README.md
717 B
openai
openapi.yaml
3.7 KB
openclaw
SKILL.md
2.6 KB
skills
README.md
702 B
src
agent
tools
localTools.js
10.8 KB
mcpTools.js
2.7 KB
agent.js
3.4 KB
index.js
196 B
llm.js
750 B
lib
aptos
balance.js
1.2 KB
config.js
1.7 KB
index.js
303 B
signPayment.js
3.9 KB
wallet.js
5.3 KB
evm
index.js
58 B
signPayment.js
2.8 KB
mcp
client.js
9.0 KB
index.js
48 B
x402
client.js
7.7 KB
index.js
194 B
types.js
1.7 KB
chains.js
3.5 KB
gas.js
5.5 KB
rpc.js
4.3 KB
wallet.js
8.1 KB
balance.js
7.4 KB
check-update.js
5.1 KB
contract.js
11.7 KB
credit-aptos-agent.js
3.6 KB
generate-facilitator-keys.js
4.6 KB
register-aptos-agent.js
3.9 KB
run-agent.js
2.1 KB
setup-aptos.js
2.0 KB
setup.js
2.8 KB
show-agent-addresses.js
1.5 KB
swap.js
13.4 KB
transfer.js
9.8 KB
_meta.json
471 B
LICENSE.md
18.5 KB
package-lock.json
94.3 KB
package.json
2.1 KB
README.md
11.1 KB
SKILL.md
4.3 KB
SKILL.md

name: autonomous-agent description: CreditNexus x402 agent. Use when the user wants to create and use wallets (Aptos/EVM), fund wallets, check balances, run stock predictions, backtests, open bank accounts, or transfer/swap tokens. Payment-protected MCP tools with x402 flow (Aptos + Base). Agent handles 402 → pay → retry autonomously. metadata: {"clawdbot":{"emoji":"📈","homepage":"https://github.com/FinTechTonic/autonomous-agent","requires":{"bins":["node","npm"]}}}

Autonomous Agent (x402) – Skill

Autonomous agent that creates, funds, and uses Aptos and EVM wallets, then calls x402-paid MCP tools (stock prediction, backtest, open bank account). Handles payment flow (402 → pay → retry) with Aptos and Base. Use this skill when the user wants wallet setup, funding, balances, predictions, backtests, banking, or token operations.


Tasks you can do

Wallets – create and manage

  • Create Aptos walletcreate_aptos_wallet (optionally network: "testnet" or "mainnet"). Agent can have multiple Aptos wallets.
  • Create EVM walletcreate_evm_wallet (optionally network: "testnet" or "mainnet"). Agent can have multiple EVM wallets.
  • List wallet addressesget_wallet_addresses returns all Aptos and EVM addresses (with network tags) for whitelisting and funding.

Fund wallets

  • Fund Aptos walletcredit_aptos_wallet: on devnet uses programmatic faucet; on testnet returns instructions and Aptos faucet URL. Needed for run_prediction and run_backtest (~6¢ USDC).
  • Fund EVM walletfund_evm_wallet: returns address and instructions (Base Sepolia faucet, etc.). Needed for open_bank_account (~$3.65 on Base).

User must whitelist every agent address at the onboarding flow (e.g. http://localhost:4024/flow.html or your MCP server’s flow) before paid tools succeed.

  • Aptos balancebalance_aptos (USDC for the agent wallet).
  • EVM balancebalance_evm (native token on a chain: base, baseSepolia, ethereum, etc.).

Paid MCP tools (x402)

  • Stock predictionrun_prediction (symbol, horizon in days). Cost ~6¢ (Aptos).
  • Backtestrun_backtest (trading strategy). Cost ~6¢ (Aptos).
  • Open bank accountopen_bank_account (CornerStone bank link). Cost ~$3.65 (EVM/Base).

The agent handles 402 Payment Required automatically: verify → settle → retry with payment signature.

CLI (from repo root)

TaskCommand
Generate Aptos walletnode src/setup-aptos.js
Generate EVM walletnode src/setup.js
Show addresses for whitelistnode src/show-agent-addresses.js
Credit Aptos (devnet)npm run credit:aptos (set APTOS_FAUCET_NETWORK=devnet)
EVM balancenode src/balance.js <chain>
Transfer ETH/tokensnode src/transfer.js <chain> <to> <amount> [tokenAddress]
Swap tokens (Odos)node src/swap.js <chain> <fromToken> <toToken> <amount>
Run agentnode src/run-agent.js "Run a 30-day prediction for AAPL" or node src/run-agent.js (interactive)

When to use this skill

Use when the user wants to:

  • Create or use Aptos or EVM wallets (testnet or mainnet).
  • Fund agent wallets (faucet instructions or programmatic credit).
  • Check Aptos or EVM balances.
  • Run stock predictions or backtests (paid via Aptos).
  • Open a bank account (paid via Base).
  • Transfer or swap tokens from the agent wallet (via CLI or context).

Setup

  1. Install: From repo root: npm install. Copy .env.example to .env.
  2. Configure: Set MCP_SERVER_URL, X402_FACILITATOR_URL, HUGGINGFACE_API_KEY (or HF_TOKEN), LLM_MODEL, and wallet paths (APTOS_WALLET_PATH, EVM_WALLET_PATH or EVM_PRIVATE_KEY).
  3. Wallets: Create via agent tools (create_aptos_wallet, create_evm_wallet) or CLI (node src/setup-aptos.js, node src/setup.js). Fund and whitelist all addresses at the MCP server’s flow (e.g. /flow.html).

Run the agent

From the repository root (where package.json and src/ live):

node src/run-agent.js "Create an Aptos wallet, then run a 30-day prediction for AAPL"
# Or interactive
node src/run-agent.js

Source: FinTechTonic/autonomous-agent

README.md

Autonomous Agent – x402 MCP + LangChain.js

Autonomous AI agent for x402-paid MCP tools: predict tickers, backtest strategies, open bank accounts. Pays with Aptos or EVM via the x402 facilitator—no OpenAI key; uses Hugging Face for the LLM. Built for Cursor, OpenClaw/Moltbot, and headless runs.

Why?

Most agent demos need a full backend and separate API keys. This agent talks to an x402 MCP server, pays with its own Aptos and EVM wallets (verify → settle), and uses an OpenAI-compatible LLM (e.g. Hugging Face). You get run_prediction, run_backtest, and open_bank_account with minimal setup—whitelist your agent, fund wallets, run.

Install

From npm (recommended)

npm install cornerstone-autonomous-agent

Copy the package’s .env.example into your project and set MCP_SERVER_URL, X402_FACILITATOR_URL, HUGGINGFACE_API_KEY, LLM_MODEL, and wallet paths. See Config.

From source

git clone https://github.com/FinTechTonic/autonomous-agent.git && cd autonomous-agent
npm install

OpenClaw / MoltBook / Moltbot: Load the skill from skills/autonomous-agent/ or adapters/openclaw/SKILL.md. See MoltBook / OpenClaw below. Then point MCP_SERVER_URL at your MCP server.

# Generate Aptos wallet (for prediction/backtest)
node src/setup-aptos.js

# Generate EVM wallet (for open_bank_account)
node src/setup.js

# Whitelist your agent at the onboarding flow (e.g. https://borrower.replit.app/flow.html)
node src/show-agent-addresses.js

# Run the agent (demo: balance + AAPL prediction)
npx cornerstone-agent "Run a 30-day prediction for AAPL"
# or from source:
node src/run-agent.js "Run a 30-day prediction for AAPL"

Config

Copy .env.example to .env and set:

VariableDescription
MCP_SERVER_URLx402 MCP server base URL (e.g. https://borrower.replit.app or http://localhost:4023)
X402_FACILITATOR_URLFacilitator base URL for Aptos (verify/settle). Use public (e.g. https://x402-navy.vercel.app/facilitator) for open_bank_account.
X402_EVM_FACILITATOR_URLOptional. EVM facilitator; defaults to X402_FACILITATOR_URL. Set to public when using local Aptos facilitator.
LLM_BASE_URLOpenAI-compatible base URL (default https://router.huggingface.co/v1)
HUGGINGFACE_API_KEY or HF_TOKENHugging Face API key
LLM_MODELModel ID (e.g. meta-llama/Llama-3.2-3B-Instruct)
APTOS_WALLET_PATHAptos wallet JSON path. Multi-wallet: ~/.aptos-agent-wallets.json.
EVM_WALLET_PATHEVM wallet path. Multi-wallet: ~/.evm-wallets.json. Or set EVM_PRIVATE_KEY.
BASE_SEPOLIA_RPCOptional; Base Sepolia RPC for open_bank_account

Commands

CommandDescription
node src/setup.jsGenerate EVM wallet (single; for multi use agent tool create_evm_wallet)
node src/setup-aptos.jsGenerate Aptos wallet (single; for multi use create_aptos_wallet)
node src/show-agent-addresses.jsPrint all Aptos and EVM addresses for whitelisting at flow.html
npm run credit:aptosCredit Aptos agent (devnet: programmatic; testnet: instructions)
node src/balance.js <chain>EVM balance
node src/run-agent.js [message]Run agent (or npx cornerstone-agent [message] when installed from npm)
npm run agentSame as run-agent.js

Crediting Aptos: Testnet has no programmatic faucet—use Aptos testnet faucet. Devnet: APTOS_FAUCET_NETWORK=devnet npm run credit:aptos. See Canteen – Aptos x402.

MCP Tools

ToolDescriptionCost
run_predictionStock prediction (symbol, horizon, strategy)~6¢ (Aptos)
run_backtestBacktest trading strategy~6¢ (Aptos)
open_bank_accountCornerStone bank link / open bank account~$3.65 (Ethereum/Base)

Supported Networks

NetworkUseCost
Aptos testnetrun_prediction, run_backtest~6¢ USDC
Base Sepoliaopen_bank_account (testnet)~$3.65
Base (mainnet)open_bank_account (production)~$3.65

x402 Flow

Agent calls MCP tool
  → Server returns 402 + payment requirements
  → Agent builds payment (Aptos or EVM), calls facilitator /verify then /settle
  → Agent retries request with PAYMENT-SIGNATURE header
  → Server returns result + request_payload, response_payload, payment_receipt

Architecture

autonomous/
├── src/
│   ├── agent/           # ReAct agent, LLM, tool wiring
│   ├── lib/
│   │   ├── mcp/          # MCP client + 402 handle/retry
│   │   ├── aptos/        # Aptos wallet, balance, signPayment
│   │   ├── evm/          # EVM wallet, signPayment (Base)
│   │   └── x402/         # Payment types, verify/settle flow
│   ├── run-agent.js      # Entrypoint
│   ├── setup.js          # EVM wallet generation
│   ├── setup-aptos.js    # Aptos wallet generation
│   └── show-agent-addresses.js
├── skills/               # MoltBook/OpenClaw (AgentSkills layout)
│   └── autonomous-agent/
│       └── SKILL.md
├── adapters/             # OpenClaw, OpenAI, Anthropic, local
├── .env.example
└── package.json

Core pieces: lib/mcp — MCP client and 402 retry; lib/aptos / lib/evm — wallets and payment signing; lib/x402 — verify/settle; agent/ — LangChain.js ReAct agent and tools.

Tech Stack

  • Runtime: Node.js 18+
  • Agent: LangChain.js (ReAct), OpenAI-compatible LLM (e.g. Hugging Face)
  • MCP: Model Context Protocol + x402 payment flow
  • Chains: Aptos (viem-style + @aptos-labs/ts-sdk), EVM (viem) for Base Sepolia/Base
  • Payments: x402 facilitator (verify/settle), local wallet storage

Security

  • Wallets: Stored locally (e.g. ~/.aptos-agent-wallets.json, ~/.evm-wallets.json); private keys not logged or sent except as signed payloads to the facilitator.
  • Payments: Only verify/settle go to the facilitator; no custody of funds by the MCP server.
  • Whitelist: Agent addresses must be allowlisted at the onboarding flow before paid tools succeed.

Capability + adapters

MoltBook / OpenClaw

This repo is optimized for easy skill loading in MoltBook and OpenClaw (Claude, Anthropic, OpenAI, and other providers work via the same agent; the skill tells the assistant how to run it).

  • Skill layout: The skill lives in skills/autonomous-agent/SKILL.md (AgentSkills-compatible, single-line frontmatter, metadata.openclaw gating). OpenClaw/MoltBook loads skills from skills/ subfolders.
  • Load options:
    1. extraDirs: Add this repo path to ~/.openclaw/openclaw.json under skills.load.extraDirs. OpenClaw will scan skills/ and load autonomous-agent.
    2. Workspace: Clone the repo and use it as your OpenClaw workspace; workspace skills are loaded from <workspace>/skills.
    3. Managed skills: Copy skills/autonomous-agent to ~/.openclaw/skills/ for all agents on the machine.
    4. ClawHub: When published, install with clawhub install autonomous-agent (installs into ./skills by default).
  • Config: In skills.entries["autonomous-agent"] you can set enabled, env, or apiKey (maps to primaryEnv). Ensure MCP_SERVER_URL, x402 facilitator URLs, and LLM/env are set for the agent run.
  • Run: From the repository root (parent of skills/), run node src/run-agent.js "your message".

Example ~/.openclaw/openclaw.json to load this repo’s skills:

{
  "skills": {
    "load": {
      "extraDirs": ["/path/to/autonomous-agent"]
    },
    "entries": {
      "autonomous-agent": {
        "enabled": true,
        "env": { "MCP_SERVER_URL": "https://borrower.replit.app" }
      }
    }
  }
}

Publishing this skill on MoltBook / OpenClaw (ClawHub)

ClawHub is the public skill registry for MoltBook and OpenClaw. Publishing lets others install your skill with clawhub install autonomous-agent.

  1. Install the ClawHub CLI

    npm i -g clawhub
    

    or pnpm add -g clawhub.

  2. Log in (GitHub account required; must be at least one week old to publish)

    clawhub login
    

    This opens a browser to authenticate. For CI or headless: clawhub login --token <token>.

  3. Publish the skill from the repo root:

    clawhub publish ./skills/autonomous-agent --slug autonomous-agent --name "Autonomous Agent (x402)" --version 1.0.0 --changelog "Initial release" --tags latest
    
    • --slug must match the folder name (autonomous-agent) so installs work as clawhub install autonomous-agent.
    • Omit --version / --changelog to be prompted. For later releases, bump version (e.g. --version 1.0.1) and add a --changelog line.
  4. Update an existing skill (after you change SKILL.md or metadata): run publish again with a new version:

    clawhub publish ./skills/autonomous-agent --slug autonomous-agent --name "Autonomous Agent (x402)" --version 1.0.1 --changelog "Description of changes" --tags latest
    

    Alternatively, clawhub sync --root . --all --bump patch --changelog "Description" scans the repo and publishes changed skills with a bumped version.

After publishing, the skill appears on clawhub.ai and users can run clawhub install autonomous-agent (into ./skills by default).

Deployment order

  1. x402 facilitator — Use public (e.g. https://x402-navy.vercel.app/facilitator) for full demo; or run local and set X402_EVM_FACILITATOR_URL to public for open_bank_account.
  2. MCP server — x402-enabled (e.g. https://borrower.replit.app or run locally).
  3. Agentnode src/run-agent.js or PM2 (pm2 start ecosystem.config.cjs --only agent-autonomous from repo root).

References

License

GPL-2.0-only. Use of this software is also subject to the Responsible AI License (RAIL). See LICENSE.md (GPL-2) and RAIL.

Permissions & Security

Security level L1: Low-risk skills with minimal permissions. Review inputs and outputs before running in production.

Requirements

  • OpenClaw CLI installed and configured.
  • Language: Markdown
  • License: MIT
  • Topics:

FAQ

How do I install autonomous-agent?

Run openclaw add @josephrp/autonomous-agent in your terminal. This installs autonomous-agent into your OpenClaw Skills catalog.

Does this skill run locally or in the cloud?

OpenClaw Skills execute locally by default. Review the SKILL.md and permissions before running any skill.

Where can I verify the source code?

The source repository is available at https://github.com/openclaw/skills/tree/main/skills/josephrp/autonomous-agent. Review commits and README documentation before installing.