Template Repository
A ready-to-use example showcasing the Okto Eliza Plugin with complete setup instructions and customization options.
Customize Before Production
Please note that this template is for development and testing purposes only. Be sure to customize and secure it before using in production.
Getting Started
Get started quickly with our pre-configured example that demonstrates the Okto Eliza Plugin in action. This implementation includes authentication setup, basic Web3 operations, and example conversations.
- Pre-configured Okto Plugin integration
- Google OAuth authentication setup
- Example AI agent implementation
- Sample Web3 operations and commands
- Basic conversation flows
Prerequisites
Before you begin, set up your developer dashboard by making sure you have :
- Created your Okto Developer Dashboard account
- Get your Okto credits from the dashboard
- Obtained your API keys from the dashboard
- Enabled the specific Chains and Tokens you plan to use in your application
- Optional: Enabled Sponsorship for the desired chains
If you need help, reach out to us on our troubleshooting form and we will contact you.
Before running the sample application, ensure you have:
- Node.js: v23+ (required) - Download
- Package Manager: pnpm - Install Guide
- Okto API Keys: You need your
OKTO_CLIENT_PRIVATE_KEY
andOKTO_CLIENT_SWA
. Obtain these from the Okto Dashboard. - Okto Account Setup: Ensure you have sufficient Okto Credits, enable the required Chains and Tokens , and optionally Activate Sponsorship.
- Google OAuth Credentials (if using Google authentication): Create OAuth 2.0 credentials in the Google Cloud Console.
- LLM Provider: Access to OpenAI, Anthropic, or other supported providers.
Installation
Clone the repository and set up the initial project structure:
# Clone the repository
git clone https://github.com/okto-hq/okto-sdk-eliza-agent-template
cd okto-eliza-ai-agent-example
# Install dependencies
pnpm install
Environment Setup
Copy the .env.sample
file to .env
:
cp .env.sample .env
Edit .env
with your credentials:
# Okto specific settings
OKTO_ENVIRONMENT= # Optional. Defaults to "sandbox". Options: sandbox, staging, production.
OKTO_CLIENT_PRIVATE_KEY= # Required. Your client private key provided by Okto.
OKTO_CLIENT_SWA= # Required. Your client SWA provided by Okto.
# Google OAuth settings
GOOGLE_CLIENT_ID= # Required. Get from https://console.cloud.google.com/
GOOGLE_CLIENT_SECRET= # Required. Get from https://console.cloud.google.com/
# Note: You also need to set the environment variable for the LLM you want to use.
Get your OKTO_CLIENT_PRIVATE_KEY
and OKTO_CLIENT_SWA
from the Okto Dashboard.
- Go to Google Cloud Console
- Create OAuth 2.0 credentials for your project
- Set the redirect URI to:
http://localhost:5000
- Save your Client ID and Client Secret in the
.env
file
Need detailed instructions? Check our Google Console Setup Guide.
Configuration
1. LLM Provider
By default, this sample agent uses Groq as the LLM model provider. To use a different provider:
- Open
characters/okto.character.json
- Update the
modelProvider
field - Add your provider's API key to
.env
{
"modelProvider": "groq", // Change to your preferred provider
// ... other settings
}
Supported providers include OpenAI, Anthropic, and others compatible with Eliza.
2. Agent Character
The agent's personality, behavior, and capabilities are defined in characters/okto.character.json
:
{
"name": "Okto",
"plugins": ["okto"],
"system": "Okto is a helpful assistant that can help you perform blockchain network transactions.",
"bio": [
"Okto is a helpful assistant that can help you perform blockchain network transactions."
],
"style": {
"chat": [
"be cool, don't act like an assistant",
"be helpful when asked and be agreeable",
"be warm and accommodate reasonable requests"
]
},
"topics": [
"Blockchain",
"Blockchain Transactions",
"Blockchain Network"
]
}
You can modify these settings to adjust how your agent:
- Responds to queries
- Presents information
- Handles transactions
- Interacts with users
Launch
Start the application and begin testing:
pnpm run start
Try these example commands to test the integration:
- "Show me my wallet balance"
- "What chains are supported?"
- "Help me transfer some tokens"
Next Steps
Now that you have the sample agent running, you can:
- Explore our Ideas to Get Started for implementation examples
- Check out the Plugin Setup Guide to understand the integration
Need help or have questions? Join our Discord community for support and discussions!