Getting Started
This guide will walk you through the process of setting up your first Agent on the Almanak platform. By the end, you'll have a fully functional Agent ready to execute your trading strategy.
Prerequisites
Before you begin, make sure you have:
- Python 3.11 or 3.12 installed
- A modern web browser
- About $5 USD worth of ETH on either Base or Arbitrum
Step 1: Install the Almanak SDK
First, let's install the Almanak SDK, which provides all the tools you need to create and manage your strategies.
pip install almanak
Step 2: Authorize the SDK with the Platform
Next, you'll need to authorize your local SDK to communicate with the Almanak platform.
almanak auth
This will open a browser window where you can generate an API key, which you can paste into the terminal.
Step 3: Create a Template Strategy
Now, let's create a new strategy using one of the available templates. The template provides a starting point for you to customize for your specific needs.
almanak strat new
This will create a new directory with the strategy code and configuration files. The template includes comments explaining each component and how to customize it.
Step 4: Push Your Strategy to the Platform
Once you've customized your strategy, push it to the Almanak platform where it can be executed by an Agent.
almanak strat push
Step 5: Create a Wallet
Now that your strategy is on the platform, you need to create a wallet for your Agent to use.
- Navigate to the Wallets section in the Almanak dashboard
- Click Create Wallet
- Give it a name and select the network where you want to deploy your wallet. Choose the network that you have at least $5 USD worth of ETH on.
- Review the wallet creation details and click Confirm
- Sign the three transactions that are generated in your wallet. For more information on what these transactions do, see the Wallets page.
The wallet creation process may take a few minutes to complete as the necessary smart contracts are deployed.
Step 6: Add Gas for Your Wallet
Your Agent needs gas to execute transactions on the blockchain. Let's add some gas to your wallet.
- In the Wallets section, find your newly created wallet
- Find the Wallet Gas section and click Top Up
- Enter the amount of ETH you want to add for gas. For this tutorial, we'll add $2 USD worth of ETH.
- Complete the transaction from your personal wallet
Step 7: Add Funds to Your Wallet
Now, add the funds that your strategy will manage.
- Still in the Wallets section, click on the Deposit button
- Select the token you want to add
- Enter the amount. For this tutorial, we'll add $2 USD worth of ETH.
- Complete the transaction from your personal wallet
Step 8: (Optional) Connect your Telegram account
You can connect your Telegram account to your Almanak account to receive notifications on your Telegram account when your Agent is executing a transaction.
- Go to the Settings section in the dashboard
- Click Notifications
- Follow the instructions to connect your Telegram account
Step 9: Start Your Agent!
Finally, let's start your Agent and watch your strategy in action.
- Go to the Agents section in the dashboard
- Click Create Agent
- Select your strategy from the dropdown
- Select your newly created wallet
- Configure any strategy-specific parameters
- Click Deploy Agent
- Confirm the permission settings
Your Agent is now live and will begin executing your strategy according to its programming. You can monitor its performance in the Agents dashboard, which provides real-time updates on transactions, performance metrics, and any issues that might arise.
Next Steps
Congratulations! You've successfully set up your first Agent on the Almanak platform. Here are some next steps to consider:
- Explore the Strategy Tutorials to learn more advanced strategy patterns
- Learn how to Test your Strategy locally before deploying to the platform
- Learn how to Troubleshoot an Agent if you encounter any issues
- Understand more about Wallet Permissions to fine-tune your Agent's capabilities
- Join our Discord community to connect with other users and get support
Happy automating!