6.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.
Skill Snapshot
| 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. OpenClaw Skills integration. |
| owner | josephrp |
| repository | josephrp/autonomous-agent |
| language | Markdown |
| license | MIT |
| topics | |
| security | L1 |
| install | openclaw add @josephrp/autonomous-agent |
| last updated | Feb 7, 2026 |
Maintainer

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 wallet –
create_aptos_wallet(optionallynetwork: "testnet"or"mainnet"). Agent can have multiple Aptos wallets. - Create EVM wallet –
create_evm_wallet(optionallynetwork: "testnet"or"mainnet"). Agent can have multiple EVM wallets. - List wallet addresses –
get_wallet_addressesreturns all Aptos and EVM addresses (with network tags) for whitelisting and funding.
Fund wallets
- Fund Aptos wallet –
credit_aptos_wallet: on devnet uses programmatic faucet; on testnet returns instructions and Aptos faucet URL. Needed forrun_predictionandrun_backtest(~6¢ USDC). - Fund EVM wallet –
fund_evm_wallet: returns address and instructions (Base Sepolia faucet, etc.). Needed foropen_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.
Check balances
- Aptos balance –
balance_aptos(USDC for the agent wallet). - EVM balance –
balance_evm(native token on a chain: base, baseSepolia, ethereum, etc.).
Paid MCP tools (x402)
- Stock prediction –
run_prediction(symbol, horizon in days). Cost ~6¢ (Aptos). - Backtest –
run_backtest(trading strategy). Cost ~6¢ (Aptos). - Open bank account –
open_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)
| Task | Command |
|---|---|
| Generate Aptos wallet | node src/setup-aptos.js |
| Generate EVM wallet | node src/setup.js |
| Show addresses for whitelist | node src/show-agent-addresses.js |
| Credit Aptos (devnet) | npm run credit:aptos (set APTOS_FAUCET_NETWORK=devnet) |
| EVM balance | node src/balance.js <chain> |
| Transfer ETH/tokens | node src/transfer.js <chain> <to> <amount> [tokenAddress] |
| Swap tokens (Odos) | node src/swap.js <chain> <fromToken> <toToken> <amount> |
| Run agent | node 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
- Install: From repo root:
npm install. Copy.env.exampleto.env. - Configure: Set
MCP_SERVER_URL,X402_FACILITATOR_URL,HUGGINGFACE_API_KEY(orHF_TOKEN),LLM_MODEL, and wallet paths (APTOS_WALLET_PATH,EVM_WALLET_PATHorEVM_PRIVATE_KEY). - 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
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.
Quick Start
# 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:
| Variable | Description |
|---|---|
MCP_SERVER_URL | x402 MCP server base URL (e.g. https://borrower.replit.app or http://localhost:4023) |
X402_FACILITATOR_URL | Facilitator base URL for Aptos (verify/settle). Use public (e.g. https://x402-navy.vercel.app/facilitator) for open_bank_account. |
X402_EVM_FACILITATOR_URL | Optional. EVM facilitator; defaults to X402_FACILITATOR_URL. Set to public when using local Aptos facilitator. |
LLM_BASE_URL | OpenAI-compatible base URL (default https://router.huggingface.co/v1) |
HUGGINGFACE_API_KEY or HF_TOKEN | Hugging Face API key |
LLM_MODEL | Model ID (e.g. meta-llama/Llama-3.2-3B-Instruct) |
APTOS_WALLET_PATH | Aptos wallet JSON path. Multi-wallet: ~/.aptos-agent-wallets.json. |
EVM_WALLET_PATH | EVM wallet path. Multi-wallet: ~/.evm-wallets.json. Or set EVM_PRIVATE_KEY. |
BASE_SEPOLIA_RPC | Optional; Base Sepolia RPC for open_bank_account |
Commands
| Command | Description |
|---|---|
node src/setup.js | Generate EVM wallet (single; for multi use agent tool create_evm_wallet) |
node src/setup-aptos.js | Generate Aptos wallet (single; for multi use create_aptos_wallet) |
node src/show-agent-addresses.js | Print all Aptos and EVM addresses for whitelisting at flow.html |
npm run credit:aptos | Credit 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 agent | Same 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
| Tool | Description | Cost |
|---|---|---|
run_prediction | Stock prediction (symbol, horizon, strategy) | ~6¢ (Aptos) |
run_backtest | Backtest trading strategy | ~6¢ (Aptos) |
open_bank_account | CornerStone bank link / open bank account | ~$3.65 (Ethereum/Base) |
Supported Networks
| Network | Use | Cost |
|---|---|---|
| Aptos testnet | run_prediction, run_backtest | ~6¢ USDC |
| Base Sepolia | open_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
- Capability: Core (
src/) — MCP client, x402 flow, local tools. No OpenAI/Claw/Anthropic logic in code. - Adapters: How each platform uses the capability:
- MoltBook / OpenClaw / Moltbot:
skills/autonomous-agent/SKILL.md(AgentSkills-compatible; see below) or adapters/openclaw/SKILL.md - OpenAI: adapters/openai/openapi.yaml — Custom GPTs / Assistants
- Claude / Anthropic: adapters/anthropic/tools.json — Claude tools
- Local / OSS: adapters/local/README.md — LM Studio, AutoGen, CrewAI
- MoltBook / OpenClaw / Moltbot:
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.openclawgating). OpenClaw/MoltBook loads skills fromskills/subfolders. - Load options:
- extraDirs: Add this repo path to
~/.openclaw/openclaw.jsonunderskills.load.extraDirs. OpenClaw will scanskills/and loadautonomous-agent. - Workspace: Clone the repo and use it as your OpenClaw workspace; workspace skills are loaded from
<workspace>/skills. - Managed skills: Copy
skills/autonomous-agentto~/.openclaw/skills/for all agents on the machine. - ClawHub: When published, install with
clawhub install autonomous-agent(installs into./skillsby default).
- extraDirs: Add this repo path to
- Config: In
skills.entries["autonomous-agent"]you can setenabled,env, orapiKey(maps toprimaryEnv). EnsureMCP_SERVER_URL, x402 facilitator URLs, and LLM/env are set for the agent run. - Run: From the repository root (parent of
skills/), runnode 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.
-
Install the ClawHub CLI
npm i -g clawhubor
pnpm add -g clawhub. -
Log in (GitHub account required; must be at least one week old to publish)
clawhub loginThis opens a browser to authenticate. For CI or headless:
clawhub login --token <token>. -
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--slugmust match the folder name (autonomous-agent) so installs work asclawhub install autonomous-agent.- Omit
--version/--changelogto be prompted. For later releases, bump version (e.g.--version 1.0.1) and add a--changelogline.
-
Update an existing skill (after you change
SKILL.mdor metadata): runpublishagain 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 latestAlternatively,
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
- 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.
- MCP server — x402-enabled (e.g. https://borrower.replit.app or run locally).
- Agent —
node src/run-agent.jsor PM2 (pm2 start ecosystem.config.cjs --only agent-autonomousfrom repo root).
References
- Source: FinTechTonic/autonomous-agent
- Canteen App – Aptos x402 — wallet hydration and crediting
- LangChain.js MCP
- Hugging Face Inference – OpenAI-compatible
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.
