README.md

July 8, 2026 ยท View on GitHub

๐Ÿณ Floe Cookbook

Reference AI agents built on Floe โ€” the spend layer for agents. One Floe key pays every vendor, with programmable spend controls.

License: MIT CI Docs X / Twitter GitHub

Website ยท Dashboard ยท Docs ยท Quickstart


What is this?

A cookbook of small, self-contained reference agents that show Floe in real frameworks โ€” Vapi, LangChain, CrewAI, Coinbase AgentKit, MCP, the OpenAI Agents SDK, and plain SDKs. Each folder is an independent example you can read, copy, and run on its own. This is a gallery, not a template โ€” there's nothing to clone wholesale; pick the recipe closest to what you're building.

Floe is the spend/billing layer for AI agents. It's walletless and priced in USD. One Floe key pays every vendor your agent uses โ€” the model, memory, tools, and 2,000+ x402 API services โ€” through a single endpoint, governed by programmable, context-aware spend controls. That's unified billing for agents: rail-agnostic, one key, one ledger, no per-vendor accounts, no crypto.

Start free. Create an agent key at the dashboard, fund it with a card, and your agent makes its first paid API call in minutes.

What you can build

  • Voice agents that pay per-lookup for live web search and stop cleanly at a budget โ€” vapi-voice-agent, vapi-venice-voice-agent โ€” or that remember callers across calls via HydraDB โ€” hydra-memory-agent
  • Budget-capped multi-agent crews where a runaway loop dies at $1, not $414 โ€” crewai-demo
  • Metered LLM access โ€” any OpenAI/Anthropic model behind one billed endpoint with a server-side cap โ€” metered-llm
  • Conversational agents that pay x402 APIs from natural language โ€” langchain-agent
  • Zero-install access from Claude Desktop / Cursor via hosted MCP โ€” mcp-demo
  • On-chain / self-custody agents โ€” treasury, yield, and flash-loan strategies โ€” yield-optimizer, flash-arb-bot

Examples

ExampleLanguageFramework / StackDifficultyWhat it showsLink
metered-llmTypeScript ยท PythonOpenAI SDK (framework-agnostic)BeginnerRoute any OpenAI/Anthropic model through Floe's metered proxy โ€” per-token billing on one key, capped server-side, your provider key never stored.โ†’
x402-clientTypeScriptCoinbase AgentKitBeginnerThe minimal payment example: delegate credit to the Floe facilitator, then call any x402 API with automatic, gas-free payment.โ†’
mcp-demoConfig onlyClaude Desktop / Cursor (MCP)BeginnerConnect Claude Desktop or Cursor to Floe's hosted MCP server in one line โ€” read markets, intents, and loans with zero install.โ†’
langchain-agentPythonLangChainBeginnerA LangChain agent that exposes Floe actions as tools โ€” check markets, borrow, monitor, and repay in natural language.โ†’
openai-agentsConfig onlyOpenAI Agents SDKBeginner (Preview)Use Floe from the OpenAI Agents SDK today via MCP fallback, ahead of the native adapter.โ†’
crewai-demoPythonCrewAI ยท crewai-floeIntermediatePer-agent budgets with a hard, server-side ceiling: a rigged loop halts at $1, and a procurement crew enforces allowlists and per-role caps.โ†’
vapi-voice-agentTypeScriptVapi ยท GPT-4o ยท ElevenLabs ยท ExaIntermediateAn outbound voice concierge that pays for live web search through Floe, tapers as it nears its budget, and audibly hard-stops at the cap.โ†’
yield-optimizerTypeScriptCoinbase AgentKitIntermediateA treasury agent that borrows USDC against WETH, deploys to a yield strategy, monitors loan health, and repays. On-chain / self-custody.โ†’
vapi-venice-voice-agentTypeScriptVapi ยท Venice ยท ElevenLabs ยท ExaAdvancedSame voice concierge, but the LLM inference itself runs on Venice through Floe โ€” model and tools metered on one key, with an audible hard-stop.โ†’
hydra-memory-agentTypeScriptVapi ยท Venice ยท HydraDBAdvancedA voice concierge with persistent memory โ€” it stores caller facts in HydraDB and recalls them, so a later call greets you by name. Brain (Venice) + memory (HydraDB) on one Floe key, no vendor keys.โ†’
flash-arb-botTypeScriptCoinbase AgentKitAdvancedOn-chain flash-loan arbitrage across Aerodrome pools โ€” a crypto-native / MEV strategy on Floe's lending surface.โ†’

Difficulty is a rough guide: Beginner = a key and a few minutes; Intermediate = a webhook, a framework, or a running server; Advanced = self-custody / on-chain setup (a funded wallet, an RPC endpoint). Some on-chain examples exercise Floe's lending surface โ€” check each README for its current run status.

Demos

Two of the most-requested flows, end to end. Click a card to watch (~90s each).

Venice voice agent โ€” model and tools on one Floe key

Watch the Venice voice-agent demo

A phone call where the LLM inference and the paid web-search tools both meter on a single Floe key โ€” tapering as the budget runs down to an audible hard-stop. See vapi-venice-voice-agent.

Persistent-memory voice concierge โ€” recall across calls

Watch the persistent-memory demo

The agent stores caller facts in HydraDB and recalls them on a later call โ€” brain (Venice) + memory (HydraDB) on one Floe key, no vendor keys. See hydra-memory-agent.

Quickstart

Every example is standalone. Pick one, cd into it, and follow its README.

git clone https://github.com/Floe-Labs/floe-cookbook.git
cd floe-cookbook

# Pick an example โ€” e.g. the minimal x402 payment client
cd x402-client
cp .env.example .env          # fill in FLOE_API_KEY (and any keys the README lists)

# TypeScript examples
npm install && npx tsx index.ts

# Python examples (e.g. langchain-agent)
pip install -r requirements.txt && python agent.py

You'll need a Floe API key โ€” get one at the dashboard and fund it with a card. No wallet or crypto required for the spend-layer examples; the on-chain examples list their extra prerequisites.

Contributing

New recipes are welcome. See CONTRIBUTING.md and the per-example README template at docs/EXAMPLE_TEMPLATE.md.

License

MIT ยฉ Floe Labs