Active development. APIs and behaviour may change. Production use at your own risk. GitHub
Mentat

Quickstart · ~30 min

From clone to a curated market.

Self-hosting the open-source stack is free. Clone the repo, bring your own AI key, and you have an AI-drafted, human-curated prediction-market workbench running locally. Here is the path.

  1. 01

    Clone and configure

    The whole stack is MIT. Clone the monorepo, copy the example env, and point the backend at your own Postgres.

    git clone https://github.com/cryptuon/mentat
    cd mentat
    cp .env.example .env
    # set DATABASE_URL and an AI key:
    #   OPENAI_API_KEY=...   or   ANTHROPIC_API_KEY=...
  2. 02

    Run the backend + agents

    Bring up the FastAPI backend and the DSPy agent service. The agents are model-agnostic — swap the provider with one env var, including a local vLLM endpoint.

    # FastAPI + TortoiseORM backend
    uvicorn app.main:app --reload
    # DSPy agent service (Scout → Draft → Validator)
    python -m agents.serve
  3. 03

    Draft a market in Creator Studio

    Open the Vue 3 Creator Studio and describe a market in one line. The Scout → Draft → Validator pipeline emits a full structured spec in seconds — question, resolution criteria, source allowlist, trigger, economics.

    # example one-line idea
    "Will ETH/USD on CoinGecko be >= $5,000 on 2026-08-01?"
    # ...becomes a canonical market JSON, ready for curation
  4. 04

    Curate the draft

    Open the Curator Console. Review the AI draft with the diff view and validation scores, edit any wording, then approve. Nothing goes on-chain without a human sign-off.

    # Curator Console → pending queue
    #   ▸ diff view + validation score
    #   ▸ edit resolution criteria / source allowlist
    #   ▸ approve  (or reject with a reason)
  5. 05

    Understand resolution

    Approved markets deploy to the Solana MarketFactory (on devnet/testnet, or your own validator, while self-hosting). When the outcome is knowable, a zkTLS proof of the named source is verified by the MarketSettlement program, which triggers payout — no oracle, no jury.

    # devnet self-host
    anchor deploy --provider.cluster devnet
    # a proof of the source resolves the market on-chain
    #   canonical source ─▶ zkTLS proof ─▶ MarketSettlement ─▶ payout

What "self-host" gets you today

M2 (Creator MVP — AI agents, FastAPI backend, Vue Creator Studio, Curator Console) is complete and self-hostable now. M3 (Solana programs, Rust indexer, wallet integration, trading UI) is in active development; M4 ships the zkTLS proof service; M5 is the audited mainnet launch. Run the agents and console locally today; follow M3 for on-chain deploy.

More detail: how it works · roadmap · FAQ

Get the source.

Bring your own AI keys, settle on your own Solana cluster, and read every parameter in the repo.