Deploy code that moves your money across any venue (DeFi + CEX), governed by a policy that can refuse. Write a fund-moving action, dry-run it against your policy through the production gate, read the verdict, then install it. Use when building, dry-running, or deploying trading/rebalancing/yield code that runs on your own funds. Covers the deploy loop, CLI, and MCP.
Resources
17Install
npx skillscat add lit-protocol/flows Install via the SkillsCat registry.
Flows by Lit Protocol
Deploy code that moves your money across any venue, governed by a policy that can refuse. Vercel-shaped: write a fund-moving action (or let your agent compose it), flows deploy it to Lit's enclave, and a policy you set judges every move before it runs. Your funds live at a PKP (a programmable key pair) that is custody AND execution — it signs across any chain and any exchange, gated by immutable CID-pinned Actions in the Lit TEE. Flows can show you everything and move nothing.
Two sibling skills cover the agent-driven paths:
SKILL-deploy.mddrives this deploy loop from MCP;SKILL-agent.mdcalls other people's paid APIs from a single credit balance. This file is the CLI surface.
Deploy an action
Write a fund-moving action — a trade, a rebalance, a yield deposit. The code is a proposer: it computes and returns the move it wants to make, and never signs. A certified executor acts on the judged intent only after the policy gate blesses it.
flows init rebalance # scaffold a runnable action + its manifest
flows deploy rebalance.js # dry-run it against your policy → see the verdict
flows deploy rebalance.js --wallet evm # install onto a connected venueflows deploy prices the action, judges it against your policy, and prints the verdict — ALLOW, HOLD, or DENY — with nothing executed and nothing signed. A DENY blocks the install.
Honest about today: installs land in dry-run — actions don't move funds yet. Autonomous live execution unlocks with the runtime. The gate refuses out-of-policy moves either way.
The manifest + policy
The action's manifest (flows-capability-manifest-v1) declares what it may do (its verbs — the gate input). Your policy (flows-policy-v1) decides what it actually does.
{
"schema": "flows-capability-manifest-v1",
"name": "USDC rebalancer",
"verbs": ["trade-spot"],
"notional": { "kind": "param", "param": "maxNotionalUsd" }
}Any verb the code uses that isn't declared is denied. Declare the least you need. Omit --policy and the gate defaults to the agent-on-a-leash preset.
CLI commands
All via npx -y @lit-protocol/flows <command>:
| Command | Description |
|---|---|
login |
Authenticate (--key KEY for CI) |
init [template] |
Scaffold a runnable fund action + its manifest (--list for the gallery) |
deploy <file> |
Dry-run an action against your policy, then install (--wallet, --leash, --policy, --grant) |
policy show|presets|apply|edit |
View and edit your policy (policy-as-code) |
list |
List your actions |
logs <slug> |
View execution logs |
secrets set|list|delete |
Manage encrypted secrets (TEE-only access) |
connect <app> |
OAuth connect (gmail, slack, etc.) |
CeFi ↔ DeFi rebalance
A rebalance crosses two venues — withdraw off the source exchange, deposit into a DeFi vault — previewed as a plan of two legs, each judged through the same one gate. The plan is allowed only if both legs pass. See `SKILL-deploy.md`.
MCP
Drive the whole deploy loop from Claude / Cursor / Codex via the wallet MCP server:
claude mcp add flows-wallet --transport http https://flows.litprotocol.com/mcp --header "Authorization: Bearer YOUR_FLOWS_API_KEY"The tools (flows_dry_run_action, flows_deploy_action, flows_rebalance_dry_run, …) give your agent typed wallet tools — it can read, propose, and run inside your caps, but it can never approve its own fund movements. Full guide: `SKILL-deploy.md`.
TEE globals
Code runs in Lit's TEE with: params (caller input), params.secrets (encrypted secrets), params.connections (OAuth tokens), params.pkpAddress (the wallet PKP — custody and execution), Lit.Actions (signing/decryption), ethers, fetch.
Links
- Platform: https://flows.litprotocol.com
- Template gallery: https://flows.litprotocol.com/explore
- Docs: https://flows.litprotocol.com/docs