Getting Started
Welcome to Locus! This guide will walk you through everything you need to start building AI agents with payment capabilities.
Overview
To get started with Locus, you'll need to:
Sign up for a Locus account
Create a wallet
Fund your wallet
Create a policy group
Get your API credentials
Initialize your project with our CLI tool
The entire setup process takes about 10-15 minutes.
What You'll Need
Before you begin, make sure you have:
A modern web browser
Node.js 14 or higher installed
npm or yarn package manager
An Anthropic API key (for AI features)
Step 1: Sign Up
Create your Locus account to get started with the platform.
Sign Up Process
Visit app.paywithlocus.com
Click on "Sign Up" or "Create Account"

Step 2: Create a Wallet
Set up your Locus wallet to manage payments and funds.
Creating Your Wallet
Navigate to the Wallets section in the site or go to https://app.paywithlocus.com/dashboard/wallets
Click "Create New Wallet" or "Add Wallet"

Configure your wallet:
Chain (Base Mainnet or Sepolia Testnet)
Wallet name (e.g., "Production Wallet", "Development Wallet")
Download a json of your private key (NOTE: this will never be shown again)
Confirm and create
Review your settings and click "Deploy Wallet" to finalize.
Wallet Created
Your wallet is now ready to receive funds. You'll see your new wallet listed in your dashboard with:
Wallet Address
Current balance (currently $0.00)
Status of Session Key

Step 3: Fund Your Wallet
Add funds to your Locus wallet to start testing payments.
Mainnet: Funding Your Wallet
Navigate to your wallet in the dashboard
Click "Add"
Follow the instructions in Coinbase OnRamp
If you already have USDC on Base you can send to the wallet address listed
Troubleshooting
Funds not showing up?
Wait a few minutes and refresh
Check your email for payment confirmation
Verify the transaction was successful
Contact support if funds don't appear within 30 minutes
Want to add more funds later?
You can add funds at any time using the same process
Your balance updates in real-time
Step 4: Create a Policy Group
Configure payment policies to control how your agent is able to spend money.
What is a Policy Group?
A policy group defines the rules and permissions for your payments:
Monthly Budgets
Allowed payment methods
Approved contacts
Creating a Policy Group
Navigate to the Agents page or go to https://app.paywithlocus.com/dashboard/agents
Click "Create Policy Group" or "New Policy"

Configure your policy settings:
Basic Information:
Policy group name (e.g., "Production Policy", "Dev Policy")
Associated Wallet:
Select the wallet you created from the last step
Agent Permissions:
Allow agents to send funds to email addresses
Allow agents to send funds to wallet addresses
Allow agents to send funds to contacts
Whitelist particular contacts (Create contacts in the contacts tab or at https://app.paywithlocus.com/dashboard/contacts)
Review and create
Double-check your settings and click "Create Policy Group"

Policy Group Created
Your policy group is now active and ready to use with your applications.
Step 5: Get Your Credentials
Retrieve your API credentials to connect your application to Locus.
Types of Credentials
Locus offers two types of authentication:
OAuth Client Credentials (Recommended for Production)
Client ID and Client Secret
More secure
Best for production applications
Used with LangChain framework
API Key (Simple Authentication)
Single API key
Easier to set up
Good for prototypes and development
Used with Claude SDK
Getting Your Credentials
Navigate to the Agents page or go to https://app.paywithlocus.com/dashboard/agents
Create a new agent

Enter name and memo (optional)
Optionally generate an API key for the agent (NOTE: API key is less secure than OAuth. OAuth is less widely supported however so we give you the option for either)
Click "Create Agent"
Copy your generated Client ID, Client Secret, and API key to a secure place like a .env file
Storing Your Credentials Securely
Never commit credentials to version control!
Create a .env file in your project:
Add .env to your .gitignore file to keep credentials safe.
Troubleshooting
Lost your Client Secret or API Key?
You'll need to create a new one
Delete the old credentials and generate new ones
Update your application with the new credentials
Credentials not working?
Double-check you copied them correctly (no extra spaces)
Verify the credentials are associated with the correct wallet and policy group
Step 6: Initialize Your Project
Use our CLI tool to create a ready-to-run Locus application.
Prerequisites
Before running the CLI, make sure you have:
Node.js 14 or higher installed
Your Locus credentials (from Step 5)
An Anthropic API key (Get one here) or OpenAI key (Get one here) with credits
Create Your Locus App
1. Run the Create Command
Open your terminal and run:
Or specify a project name:
2. Follow the Interactive Prompts
The CLI will guide you through setup:
Project Name
If you didn't specify a name in the command, you'll be prompted:
Choose Your Framework
You'll be asked to select a framework:
LangChain (OAuth)
More secure with Client ID/Secret
Full MCP integration
LangChain ReAct agent
Recommended for production
Claude SDK (API Key)
Simpler setup with single API key
Claude SDK
Streaming support
Great for prototypes
Enter Your Credentials
Depending on your framework choice:
For LangChain:
For Claude SDK:
Your credentials are entered securely (hidden input) and never logged.
3. Installation Process
The CLI will automatically:
Create your project directory
Copy template files
Configure environment variables
Install dependencies
Initialize git repository
Set up proper file permissions
Run Your Application
Once setup is complete:
Your app is ready to run immediately!
Project Structure
Your new project includes:
What's Included
Your generated app comes with:
🔐 Authentication configured (OAuth or API Key)
🤖 AI agent setup with Claude
🎯 Sample code demonstrating Locus features
📦 All dependencies installed
📝 Comprehensive README with examples
Next Steps
Now that your project is set up, you can:
Explore the sample code - See how Locus and Claude work together
Read the project README - Learn about available features
Start building - Modify the code for your project
Test payments - Use your funded wallet to test transactions
Customizing Your App
The generated app is a starting point. You can:
Add new AI agent capabilities
Integrate additional APIs
Build a web interface
Add database persistence
Deploy to production
Check your project's README for specific customization guides based on your chosen framework.
Troubleshooting
Command not found?
Installation fails?
Check your Node.js version:
node --version(must be 14+)Ensure you have internet connection
Try clearing npm cache:
npm cache clean --force
Credentials errors?
Verify your credentials are correct (check app.paywithlocus.com)
Make sure there are no extra spaces when pasting
Try creating new credentials if issues persist
App won't start?
Check the
.envfile was created correctlyVerify all required environment variables are set
Check the console for specific error messages
🎉 Congratulations! You're all set up and ready to build amazing things with Locus!
Start building AI agents with payment capabilities today.
Last updated