Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Choose Your Path

Grimoire has two entry points. Both run the same underlying engine — the difference is where execution lives and what's built on top.

At a Glance

Open Source CLIPlatform API
Where it runsYour machine or CIGrimoire cloud
How you interact.spell files + terminalREST API
Natural language intentsYes
Policy enforcementManual (constraints in spell)Automated (rules via API)
Clarification sessionsYes
AI advisory decisionsYes (model of your choice)Yes
Audit persistenceLocal SQLiteManaged database
Onchain executionYour private keyVia executor
Multi-user / API keysYes
CostFree, open sourceContact for pricing

Open Source CLI

The CLI is a local tool. You write spells, validate them, simulate against live protocol data, and execute with your own key.

Terminal
npm i -g @grimoirelabs/cli
grimoire simulate spells/rebalance.spell --chain 1
grimoire cast spells/rebalance.spell --chain 1 --key-env PRIVATE_KEY --rpc-url $RPC
Best for:
  • Developers building and testing strategies locally
  • Quant teams who want full control over execution
  • Protocol integrations and CI/CD automation
  • Agent workflows where an LLM authors and runs spells
  • Self-custody: you hold the key, nothing goes through a third party
You manage:
  • RPC endpoint
  • Private key
  • Simulation and dry-run steps
  • Advisory model API keys

Get started with the CLI →


Platform API

The Platform wraps the same engine in a cloud API. You send an intent — in natural language or as a structured action plan — and get back a validated preview. Policy enforcement runs automatically against your configured rules.

Natural Language
curl -X POST https://api.grimoire.run/v1/run \
  -H "x-api-key: YOUR_KEY" \
  -d '{
    "partner_id": "YOUR_PARTNER_ID",
    "user_message": "Swap 500 USDC to ETH on Uniswap",
    "user_context": {"chain": "ethereum"}
  }'
Best for:
  • Wallets and consumer apps that want to let users describe actions in plain English
  • Teams who want policy enforcement without embedding rules in every spell
  • Multi-user products where different API keys need different permissions
  • Integrations that don't want to manage RPC endpoints or execution infrastructure
You get:
  • Hosted execution engine
  • Natural language → action plan translation
  • Clarification sessions when intent is ambiguous
  • Scoped API keys per partner or user
  • Managed audit persistence

Get started with the Platform →


Still Not Sure?

If you're writing a DeFi strategy yourself and running it from a terminal or a script — use the CLI.

If you're building a product where users describe what they want and you need to validate and execute on their behalf — use the Platform.

You can also combine both: use the CLI to author and test spells, then submit them to the Platform for policy validation before live execution.