autonomous-agent
CreditNexus x402 agent. Use when the user wants stock predictions, backtests, bank linking, or agent/borrower scores. Payment-protected MCP tools (run_prediction, run_backtest, link_bank_account, get_agent_reputation_score, get_borrower_score, and by-email variants) with x402 flow (Aptos + Base). Agent handles 402 → pay → retry autonomously. Supports wallet attestation (signing) for onboarding.
What this skill does
# CreditNexus x402 Agent Skill Autonomous agent that **creates, funds, and uses** Aptos and EVM wallets, then calls x402-paid MCP tools (stock prediction, backtest, link_bank_account, agent/borrower scores). Handles payment flow (402 → pay → retry with `payment_payload`) with Aptos and Base. Supports **wallet attestation** (signing) for onboarding. Use when the user wants wallet setup, funding, balances, predictions, backtests, bank linking, scores, or token operations. ## Installation Clone and install from the repository root: ```bash git clone https://github.com/FinTechTonic/autonomous-agent.git && cd autonomous-agent npm install ``` Set `MCP_SERVER_URL` to your x402 MCP server (e.g. `https://borrower.replit.app` or `https://arnstein.ch`). Copy `.env.example` to `.env` and configure LLM and wallet paths. --- ## Tasks you can do ### Wallets – create and manage - **Create Aptos wallet** – `create_aptos_wallet` (optionally `network: "testnet"` or `"mainnet"`). Agent can have multiple Aptos wallets. - **Create EVM wallet** – `create_evm_wallet` (optionally `network: "testnet"` or `"mainnet"`). Agent can have multiple EVM wallets. - **List wallet addresses** – `get_wallet_addresses` returns 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 for `run_prediction` and `run_backtest` (~6¢ USDC). - **Fund EVM wallet** – `fund_evm_wallet`: returns address and instructions (Base Sepolia faucet, etc.). Needed for `link_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). - **Link bank account** – `link_bank_account` (CornerStone/Plaid bank link token). Cost ~5¢ configurable (EVM/Base). - **Scores** – `get_agent_reputation_score`, `get_borrower_score` (by wallet); `get_agent_reputation_score_by_email`, `get_borrower_score_by_email` (when SCORE_BY_EMAIL_ENABLED). x402 or lender credits. The agent handles 402 Payment Required automatically: verify → settle → retry with payment signature. ### CLI (from repo root) | Task | Command | |------|--------| | Generate Aptos wallet | `npm run setup:aptos` | | Generate EVM wallet | `npm run setup` | | Show addresses for whitelist | `npm run addresses` | | Credit Aptos (devnet) | `npm run credit:aptos` (set `APTOS_FAUCET_NETWORK=devnet`) | | EVM balance | `npm run balance -- <chain>` | | Transfer ETH/tokens | `npm run transfer -- <chain> <to> <amount> [tokenAddress]` | | Swap tokens (Odos) | `npm run swap -- <chain> <fromToken> <toToken> <amount>` | | Run agent | `npx cornerstone-agent "Run a 30-day prediction for AAPL"` or `npx cornerstone-agent` (interactive); from repo `npm run agent -- "..."` | | Attest Aptos wallet | `npm run attest:aptos` or `npx cornerstone-agent-attest-aptos` (output → POST /attest/aptos) | | Attest EVM wallet | `npm run attest:evm` or `npx cornerstone-agent-attest-evm` (output → POST /attest/evm) | --- ## 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). - **Link a bank account** (paid via Base; `link_bank_account`). - **Get agent/borrower scores** (by wallet or by email when enabled). - **Sign wallet attestations** for onboarding (attest:aptos, attest:evm). - **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): ```bash npx cornerstone-agent "Create an Aptos wallet, then run a 30-day prediction for AAPL" # Or interactive npx cornerstone-agent # Or from repo: npm run agent -- "..." or node src/run-agent.js "..." ``` **Source:** [FinTechTonic/autonomous-agent](https://github.com/FinTechTonic/autonomous-agent)
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.