Where users can Ideate, Build, Own, and Monetize Web3 AI agents via secure, on-chain execution sandboxes.

Hello everyone, I'm Sayan Roy, and today I'm excited to introduce AgentForge.
As AI agents become more capable, developers and traders face a growing infrastructure problem. Running autonomous agents requires cloud servers, storage, monitoring systems, execution environments, security controls, and payment infrastructure. These services are often expensive, fragmented, and difficult to manage.
Agent developers spend more time maintaining infrastructure than building agent logic, while traders lack a secure and programmable environment to deploy, test, and automate strategies. Existing solutions are typically centralized, costly to scale, difficult to audit, and provide limited agent autonomy, identity, and payment coordination. As a result, deploying and operating intelligent agents remains inaccessible for many builders and traders.
AgentForge solves this by providing a Stellar-native execution layer where agents can own identities, execute workflows inside isolated PRoot sandboxes, interact with DeFi protocols, receive programmable payments, and operate through a unified command-line experience.
Instead of renting expensive cloud infrastructure or manually managing execution environments, developers can deploy agents directly into AgentForge's programmable execution layer.
AgentForge combines:
- Agent Identity & decentralized ownership
- Workflow Orchestration via DAG graphs
- Sandboxed Execution using low-overhead local PRoot environments
- Programmable Payments & automated agent micropayments
- Agent Smart Wallets for direct asset control and withdrawals
- Auditability via direct on-chain transaction verifications
- Stellar-native Automation for decentralized, serverless execution economics
We chose Stellar because it provides exactly what autonomous agents need:
- Fast transaction finality (3-5 second ledgers)
- Extremely low fees (100 stroops standard fee)
- Soroban smart contracts (verifiable Rust logic on-chain)
- Native asset support (XLM, USDC, and custom tokens like AF$)
- Developer-friendly infrastructure (Horizon & Soroban RPC)
- Scalable execution economics
Stellar allows agents to operate efficiently while keeping execution and payment costs low enough for real-world adoption.
AgentForge is fully deployed and active on Stellar Mainnet. The system consists of 6 interlocking smart contracts that manage identity, validation, payment routing, and agent wallets:
- AF$ Token Contract
- Contract ID:
CDCW72YVMAE34IQSED3AQ7UHLKOWXLOMN2UQ2J5H4CKY357G2CHMOARL - Utility token for micropayment settling (1 XLM = 100 AF$).
- Contract ID:
- Agent Registry Contract
- Contract ID:
CAOOSHR64NP2HIFMQE4LYLWAXPJM5VEUH6W7DYGQURHPM2W2GZDZPAW6 - Canonical index storing agent pricing and ownership.
- Contract ID:
- Agent Validator Contract
- Contract ID:
CDR4EEFL7OTXIJHD5ZR24J2VCO7THYIE3LGGRXJJY7W4WPCQ2QRO5ZY7 - Validates deploy intent and enforces validation fees (5 XLM).
- Contract ID:
- Payment Router Contract
- Contract ID:
CCPXCIERUHUJNBJITLR3MWKXTRTJ5E4ET2TEYGSXV72FRJS3RVAHNX3Q - Routes payments between owners and client runs.
- Contract ID:
- Execution Manager Contract
- Contract ID:
CB6RDLOQFBJDFDQLX6QXS27F7QRZ3BIUADK5NJ33KUI24PMA7AIYZRVD - Coordinates sandboxed workflow steps and task fees.
- Contract ID:
- Agent Smart Wallet Contract
- Contract ID:
CBEDEV6LHEXBZRP37H46HYXXWOYXSQVAUY6KG66SIYYUKFMEZCV3MEXF - Provides secure, on-chain custody and owner-authenticated withdrawals (custom Rust contract optimized down to 1,288 bytes).
- Contract ID:
All operations are fully settled and verified on-chain. Below are live transaction proofs on Stellar Mainnet for all contract actions:
- WASM Upload (Install Code)
- Resource Fee:
3.7307589 XLM(Optimized WASM size: 1,288 bytes) - Tx Hash:
6b4095fdf5a122d5c74023eaa0846b42a969a9ab46edfd0176f1ca1d8d5b8ca1
- Resource Fee:
- Instance Creation (Deploy Wallet)
- Resource Fee:
0.2014522 XLM - Tx Hash:
3db896d250aa7a46e1f26bf63119db30279e2fd24bd84135d99d2f5b40a986f6
- Resource Fee:
- Wallet Initialization
- AF$ Token Deposit (250.00 AF$ from Owner to Agent)
- AF$ Token Withdrawal (50.00 AF$ from Agent back to Owner)
- Automatic Micropayment Deduction (1.00 AF$)
- Agent Marketplace Forking (0.1 XLM Forking Fee)
5+ active users with their Name, Wallet ID, email and Feedback: https://docs.google.com/spreadsheets/d/1vLztvp1yzuMoxyTsJxFebRteebIhMIdvP6aaxCJ9CrQ/edit?usp=drivesdk
Full architecture document: docs/architecture/ARCHITECTURE.md
It combines:
- Soroban contracts for on-chain registry and deployment validation
- HTTP 0x402 protocol to AI - AI, pay-per-request execution in XLM
- Wallet-signature UX with Multiwallet auth
- Realtime pub/sub pipeline for events and analytics
- Agent marketplace, fork economy, workflow executor, and trading surface
- fork-wallet-confirm.png
2. stellar-explorer-proof.png
3. marketplace-fork-success.png
4. run-payment-modal.png
5. run-summary-live-feed.png
6. build-validation-sign.png
7. trading-surface.png
8. workflow-waiting-signature.png
9. workflow-invoice-confirmed.png
10. dashboard-analytics.png
After adding images, commit and push. The main README references these paths directly.
AI agents are easy to build but hard to monetize safely across open networks. Traditional API keys and off-chain billing create trust gaps:
- No atomic link between payment and execution
- No shared payment standard between autonomous clients
- No transparent, verifiable evidence that value moved
AgentForge addresses this by pairing 0x402 style payment negotiation with Stellar transactions and on-chain policy enforcement.
Stellar is a strong fit for machine-to-machine micro-payments and agent marketplaces:
- Fast finality and low fees for frequent small-value API calls
- Mature account model and strong wallet ecosystem (Freighter)
- Great UX for memo-tagged payments, which map naturally to request IDs
- Soroban smart contracts for deterministic validation and inter-contract control
- Publicly verifiable transaction proofs through Horizon / Explorer
- Build custom agents with model, prompt, tools, visibility, and pricing
- Register agents with validator + registry contract flow
- Run agents through a 402 payment challenge-response mechanism
- Fork marketplace agents with paid fork transactions
- Execute paid workflow tasks with invoices and explorer proofs
- Track activity in dashboard and live feed components
flowchart LR
U[User + Freighter Wallet] --> FE[Next.js App Router UI]
FE --> API[API Routes / Server Actions]
API --> SUPA[(Supabase)]
API --> AI[OpenAI + Anthropic]
API --> HZ[Stellar Horizon]
API --> VAL[AgentValidator Contract]
VAL -->|invoke_contract| REG[AgentRegistry Contract]
API --> ABLY[Ably Realtime]
API --> Q[QStash Consumers]
Q --> SUPA
ABLY --> FE
- User opens the app and connects Freighter (or other supported wallet).
- Public key is stored locally for session-scoped UX and request signing context.
- User configures agent metadata (name/model/prompt/price/visibility/tools).
POST /api/agents/validate-deploybuilds a Soroban validation transaction (XDR).- User signs in wallet.
POST /api/agents/confirm-deploysubmits and prepares confirmation call.- Validator contract confirms and performs inter-contract call to registry.
- Agent metadata is persisted to Supabase for app indexing and search.
- Public agents appear in marketplace cards.
- Consumer can fork an existing agent by paying fork fee in XLM.
- Memo ties payment to fork action (
fork:<agent-or-request-id>). - Forked configuration can be customized before first execution.
- Client calls
POST /api/agents/[id]/runwith prompt input. - If unpaid, server returns payment challenge (402 semantics + payment details).
- Wallet signs and submits Stellar payment.
- Client retries with tx hash and wallet headers.
- Server verifies payment via Horizon and executes selected model.
- Request, billing, and runtime stats are persisted.
- Trading page simulates strategy actions with XLM-centric UX.
- Workflow page batches paid task executions and wallet approvals.
- Invoice card records amount, tx hash, payer, timestamp, and explorer link.
- Realtime events stream through Ably/QStash pipeline.
- Dashboard aggregates request counts, billing, and latency surfaces.
- Explorer links provide independent payment proof.
- Validates deploy intent and confirmation signatures
- Manages pending deployment state
- Performs inter-contract call into registry during confirmation
- Canonical on-chain index for registered agents
- Holds pricing/ownership metadata and request accounting hooks
- Serves as the source of truth for validator cross-contract checks
Client -> validate-deploy API -> sign tx -> confirm-deploy API
-> AgentValidator.confirm_deploy(...)
-> invoke_contract(AgentRegistry.register_agent(...))
-> on-chain registration success
- Freighter fork confirmation proves user-signed payment authorization before marketplace fork completes.
- Stellar Expert receipt confirms fork tx finality, ledger inclusion, memo integrity, and signature validity.
- Marketplace success banner shows app-level acknowledgment wired to confirmed chain payment.
- Run-agent payment modal demonstrates 402 challenge-response UX tied to wallet signature.
- Agent run summary shows billed amount and runtime metadata linked to the paid execution path.
- Build step validation modal proves deploy flow requires explicit wallet approval before contract submission.
- Confirm-deploy warning state highlights guarded confirmation path for potentially failing preconditions.
- Trading surface demonstrates XLM-focused strategy execution context integrated with wallet identity.
- Workflow executor waiting state proves asynchronous task orchestration blocked on wallet payment signature.
- Workflow invoice panel provides structured proof payload: tx hash, payer, amount, timestamp, explorer link.
- Dashboard panels aggregate monetization telemetry and request analytics after protocol interactions.
POST /api/agents/createGET /api/agents/listGET /api/agents/[id]POST /api/agents/[id]/runPOST /api/agents/validate-deployPOST /api/agents/confirm-deployPOST /api/agents/submit-confirmationPOST /api/payment/verifyGET /api/dashboard/analyticsGET /api/dashboard/requestsGET /api/ably/token
- Node.js 18+
- pnpm 10+
- Freighter wallet (for end-to-end payment/deploy tests)
- Supabase project (recommended for full mode)
pnpm installCreate local env and fill your own keys (never commit secrets):
cp .env.example .env.localpnpm run devpnpm run lint
pnpm exec tsc --noEmit
pnpm run buildWorkflow file: .github/workflows/ci.yml
lint-and-type-check: ESLint CLI + TypeScript noEmitbuild: Next production build + artifact uploaddocker-build: Docker buildx image build (no push)
This pipeline ensures code quality, type safety, production build integrity, and deploy parity.
.env.localand.env.local.bakare ignored and must remain local only.- Never commit API keys, private keys, or service-role secrets.
- If a key is ever exposed, rotate it immediately.
AgentForge demonstrates that autonomous software can be monetized transparently when identity, payment, and execution are composed as one protocol surface.
By building on Stellar, the project converts abstract AI usage into verifiable economic events that users, builders, and integrators can trust.