{"slug": "solvent-publishing-guide", "title": "Solvent Publishing Guide", "summary": "A new open-source AI agent called SOLVENT operates as a self-funding business, selling research briefs via Stripe and using its own revenue to pay for compute. It profit-gates every job before starting, declining unprofitable work, and enforces spend policies through a NemoClaw-style sandbox. The agent runs offline-first with stubs or live with API keys, and a demo processes four analyst jobs in about 30 seconds.", "body_md": "**An AI agent that runs as a profitable, self-funding business.**\n\nIt sells research briefs. It collects payment on Stripe. It spends its own revenue to provision the compute it needs. And it refuses any job that doesn't clear a margin.\n\nMost agents can spend money. Almost none can **run as a business.**\n\nSOLVENT closes the full loop:\n\n```\n  Client pays Stripe → Agent earns revenue → Agent fulfils the work\n  → Agent pays its own vendor bills → P&L booked → balance sheet grows\n```\n\nEvery job is **profit-gated before it starts**. Unprofitable work is declined without touching Stripe. Vendor payments are screened by a NemoClaw-style policy sandbox. The agent literally cannot spend more than it earns.\n\n**Zero dependencies. No API keys. Works right now.**\n\n```\ngit clone https://github.com/ianalloway/solvent-agent.git\ncd solvent-agent\npython3 run_demo.py\n```\n\nThe agent will run a full batch of 4 analyst jobs — complete with margin gating, Stripe payment simulation, NVIDIA Nemotron fulfillment, guardrail screening, and live P&L — in about 30 seconds.\n\nFirst run: A short onboarding wizard asks you to choose a model, interaction mode, and whether to enable Stripe test mode. Preferences are saved to`.solvent/config.json`\n\nand never committed.\n\nAfter a run, open the live treasury dashboard:\n\n```\nopen treasury_dashboard.html   # macOS\n```\n\nA typical batch session:\n\n| Metric | Value |\n|---|---|\n| Revenue | $223.00 |\n| Operating spend | $13.35 |\nNet profit |\n$209.65 |\n| Margin | 94% |\n| Jobs declined | 1 (below margin floor) |\n\n```\n inbound job\n     │\n     ▼\n ┌─────────────┐   margin < floor?  ┌───────────┐\n │  MARGIN GATE│ ─────────────────▶ │  DECLINE  │\n │  (pricing)  │                    └───────────┘\n └─────┬───────┘ accept\n       ▼\n ┌─────────────┐   EARN\n │   STRIPE    │ ── Payment Link → poll/webhook until paid ──▶ + revenue\n └─────┬───────┘    (records cs_... + pi_... on ledger)\n       ▼\n ┌─────────────┐   FULFIL\n │  NEMOTRON   │ ── Llama-3.1-Nemotron-Ultra produces the brief ──▶ resource usage\n └─────┬───────┘\n       ▼\n ┌─────────────┐   SPEND (every payment screened first)\n │ GUARDRAILS  │ ── NemoClaw policy: allowlist · caps · reserve · ROI\n │   → STRIPE  │ ── Issuing virtual card (test) or simulated spend ──▶ − expense\n └─────┬───────┘\n       ▼\n   BOOK P&L  ──▶ treasury updated · dashboard refreshed\n```\n\nRevenue is **always collected before cost is incurred**, and no payment can violate policy. The business is safe by construction and profitable by rule.\n\n| Layer | Technology | File |\n|---|---|---|\nAnalyst / reasoning |\nNVIDIA Nemotron (Llama-3.1-Nemotron-Ultra) | `solvent/nemotron.py` |\nSpend safety |\nNVIDIA NemoClaw-style policy sandbox | `solvent/guardrails.py` |\nEarn |\nStripe Payment Links + Checkout Session polling | `solvent/stripe_client.py` |\nSpend |\nStripe Issuing virtual cards (test mode) | `solvent/stripe_client.py` |\nOrchestration |\nHermes / Nous tool-calling agent loop | `solvent/agent.py` |\nMemory |\nSQLite treasury + pricing ledger | `solvent/treasury.py` · `solvent/pricing.py` |\n\n**Key design choices:**\n\n**Structural profitability**—`pricing.py`\n\ncomputes unit cost before quoting. If margin < floor, the job never reaches Stripe.**Spend policy**—`guardrails.py`\n\nenforces vendor allowlist, per-transaction cap, rolling 24h budget, minimum cash reserve, and no-negative-ROI rule.**Offline-first**— without API keys the demo runs on deterministic stubs. Add`NVIDIA_API_KEY`\n\n+`STRIPE_API_KEY=sk_test_...`\n\nto unlock live inference and real Payment Links.**Audit trail**— every`cs_...`\n\ncheckout session ID and`pi_...`\n\nPaymentIntent ID is recorded on the ledger before fulfilment begins.\n\n```\npython3 run_demo.py\n```\n\n4 pre-loaded jobs. ~30 seconds. Shows margin gating, Stripe earn/spend, Nemotron fulfillment, and guardrails in action.\n\n```\npython3 run_demo.py --interactive\n```\n\nType a research topic and client budget at the prompt. The agent quotes, pays, fulfils, and books P&L for each one in real time. Keep going until you quit.\n\n```\npython3 run_demo.py --seed 500        # start with $500 instead of $100\npython3 run_demo.py --keep-balance    # resume existing treasury balance\n```\n\nIn interactive mode, type `/fund 200`\n\nat the prompt to deposit $200 into the live treasury without restarting.\n\n``` python\nfrom solvent.agent import Solvent\n\nagent = Solvent(seed_cents=10_000)          # reset treasury, seed $100\nagent.handle_job(SAMPLE_JOBS[0])            # process one job\nsnap = agent.run(SAMPLE_JOBS[1:])           # process a list; returns snapshot\n\nprint(snap[\"balance_cents\"], snap[\"margin_pct\"])\npython3 demo_guardrails.py\n```\n\nShows five spend attempts and which ones the NemoClaw-style policy blocks — without starting the agent or touching Stripe.\n\nTo use live Nemotron inference and real Stripe test-mode payment links:\n\n```\npip install -r requirements.txt\n\nexport NVIDIA_API_KEY=nvapi-...        # from build.nvidia.com\nexport STRIPE_API_KEY=sk_test_...      # Stripe test mode only (live keys refused)\n\npython3 run_demo.py\n```\n\nWith both keys set:\n\n- Briefs are written by\n**NVIDIA Nemotron**(Llama-3.1-Nemotron-Ultra). - Each job creates a real\n**Stripe Payment Link**. Pay with test card`4242 4242 4242 4242`\n\n. - SOLVENT\n**polls** the Checkout Session (`cs_...`\n\n) until`payment_status == paid`\n\nbefore fulfilling — no instant confirm. - Optional: set\n`STRIPE_WEBHOOK_SECRET`\n\nand forward`checkout.session.completed`\n\nevents via`StripeClient.process_webhook()`\n\n. - Optional: enable\n**Stripe Issuing** on your test account to provision capped single-use virtual debit cards for each vendor payment.\n\n| Variable | Purpose |\n|---|---|\n`NVIDIA_API_KEY` |\nLive Nemotron inference (`nvapi-...` ) |\n`STRIPE_API_KEY` |\nStripe test key (`sk_test_...` ) |\n`STRIPE_WEBHOOK_SECRET` |\nOptional webhook verification |\n`STRIPE_PAYMENT_POLL_TIMEOUT` |\nSeconds to wait for payment (default `120` ) |\n`STRIPE_PAYMENT_POLL_INTERVAL` |\nPoll interval in seconds (default `2` ) |\n`SOLVENT_FORCE_STRIPE_SIMULATE` |\nForce offline simulate mode even with a key |\n\nProduct/Price objects are cached in `.solvent/stripe_catalog.json`\n\nso repeated runs reuse a single **SOLVENT Research Brief** product instead of cluttering your Stripe dashboard.\n\n```\npip install pytest\npython3 -m pytest tests/ -v\n```\n\nUnit tests cover: pricing & margin gate · guardrail policy · treasury ledger · Stripe client (simulate + test mode) · config/onboarding.\n\n```\nsolvent/\n  agent.py         the orchestrator (earn → fulfil → spend → book)\n  treasury.py      SQLite ledger / balance sheet\n  pricing.py       the margin gate\n  guardrails.py    NemoClaw-style spend policy\n  stripe_client.py two-sided Stripe layer (earn + spend)\n  nemotron.py      NVIDIA Nemotron client (+ offline stub)\n  service.py       the product: an on-demand research brief\n  jobs.py          sample inbound work\n  dashboard.py     renders the treasury to HTML + JSON\n  config.py        onboarding wizard and config persistence\nrun_demo.py        the full business loop (CLI entry point)\ndemo_guardrails.py the safety story (standalone)\ntests/             pytest suite\ndocs/              screenshots and supporting assets\n```\n\n**Hermes Agent Accelerated Business Hackathon** — NVIDIA × Stripe × Nous Research\n\nThe agent was designed to demonstrate:\n\n- An agent that is\n**economically self-aware**— it has a treasury, prices against its own costs, and gates every action on projected profit - A\n**complete two-sided Stripe integration**— earns via Payment Links, spends via Issuing virtual cards **Provable spend safety**— a NemoClaw-style policy sandbox that makes \"give an agent a payment credential\" a reasonable thing to do** Live inference with NVIDIA Nemotron**— the offline stub means the demo always works, even without API keys\n\nIssues, PRs, and ideas are very welcome. Some good starting points:\n\n- Add more sample research topics in\n`solvent/jobs.py`\n\n- Improve the Nemotron prompt template in\n`solvent/service.py`\n\n- Add a new guardrail policy to\n`solvent/guardrails.py`\n\n- Extend the dashboard with charts or new metrics in\n`solvent/dashboard.py`\n\n**If SOLVENT gave you ideas, give it a ⭐**", "url": "https://wpnews.pro/news/solvent-publishing-guide", "canonical_source": "https://github.com/ianalloway/solvent-agent", "published_at": "2026-06-18 00:45:49+00:00", "updated_at": "2026-06-18 00:52:17.312623+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "ai-infrastructure", "developer-tools"], "entities": ["SOLVENT", "Stripe", "NVIDIA", "Nemotron", "NemoClaw", "Llama-3.1-Nemotron-Ultra", "Hermes", "Nous"], "alternates": {"html": "https://wpnews.pro/news/solvent-publishing-guide", "markdown": "https://wpnews.pro/news/solvent-publishing-guide.md", "text": "https://wpnews.pro/news/solvent-publishing-guide.txt", "jsonld": "https://wpnews.pro/news/solvent-publishing-guide.jsonld"}}