Skip to content

Examples

SmartAgentKit ships with six runnable example projects that demonstrate different architectures, from LLM-powered autonomous agents to deterministic automation bots.

Overview

ExampleLLMPresetKey FeatureComplexity
DeFi Trading AgentGPT-4o (LangChain)defi-traderReAct agent, session keysAdvanced
Treasury ManagementClaude (Anthropic)treasury-agentBatch rebalancingAdvanced
Payment DistributionNonepayment-agentScheduled payouts, allowlistIntermediate
Monitoring & AlertsNoneminimalGuardian pattern, auto-pauseIntermediate
Arbitrage AgentNonedefi-traderSession keys, atomic swapsAdvanced
Policy PlaygroundNoneCustomPlugin architecture, custom policiesBeginner

Mock Mode

All examples support mock mode for testing without deploying or funding wallets. Mock mode uses MockSmartAgentKitClient from @smartagentkit/testing, which enforces the same policies in-memory.

bash
# Run any example in mock mode
pnpm start:mock

Getting Started

bash
# Clone the repo
git clone https://github.com/smartagentkit/smartagentkit.git
cd smartagentkit

# Install and build
pnpm install && pnpm build

# Run any example in mock mode
cd apps/examples/defi-trading-agent
pnpm start:mock

Testnet Mode

To run examples against a real testnet (Base Sepolia), you need:

  1. An RPC URL (e.g., from Alchemy or Infura)
  2. A Pimlico bundler URL
  3. An owner private key with testnet ETH
  4. Any LLM API keys required by the specific example

Copy .env.example to .env in the example directory and fill in the required values.

Released under the MIT License.