![Baby Smith Logo](/hydralabs-sh/baby-smith/raw/main/img/baby-smith.png)
A simplified autonomous trading agent for Hyperliquid, derived from Agent Smith.
Baby Smith is experimental software that can autonomously trade with real money. The consequences of bugs, market events, or other unforeseen circumstances could result in immediate and total loss of funds.
By using this software:
- You acknowledge that you are solely responsible for any losses
- You understand that autonomous trading is inherently risky
- You accept that no warranties or guarantees are provided
- You agree to the terms of the MIT license
Baby Smith is a simplified autonomous trading agent for Hyperliquid perpetual futures. It includes:
- Basic market making strategy
- Position management
- Rate limiting
- Risk controls
- Real-time monitoring
- Poetry (Python package manager)
- Docker and Docker Compose (optional)
- A funded Hyperliquid account
- Private key with trading permissions
- Basic understanding of perpetual futures trading
- Clone the repository:
git clone https://github.com/hydralabs-sh/baby-smith.git
cd baby-smith
- Copy and configure environment variables:
cp .env.template .env
- Edit
.env
with your credentials:
# Required - Trading Account
HL_ACCOUNT_ADDRESS=your_account_address
HL_SECRET_KEY=your_private_key
# Optional - Trading Parameters
HL_ASSET=HYPE
HL_MAX_POSITION=5.0
HL_BASE_POSITION=1.0
HL_LEVERAGE=3
HL_TESTNET=true
- Start the agent:
docker compose up
- Clone and enter the repository:
git clone https://github.com/hydralabs-sh/baby-smith.git
cd baby-smith
- Install dependencies using Poetry:
poetry install
- Copy and configure environment variables:
cp .env.template .env
# Edit .env with your settings
- Run the agent:
poetry run python -m agent_smith.main
Parameter | Description | Default |
---|---|---|
HL_ACCOUNT_ADDRESS | Your Hyperliquid account address (required) | None |
HL_SECRET_KEY | Private key with trading permissions (required) | None |
HL_ASSET | Trading asset | HYPE |
HL_MAX_POSITION | Maximum position size | 5.0 |
HL_BASE_POSITION | Target position size | 1.0 |
HL_LEVERAGE | Trading leverage | 3 |
HL_TESTNET | Use testnet instead of mainnet | true |
Baby Smith consists of several key components:
agent.py
- Main trading logic and order executionstrategies/
- Trading strategy implementationsmetrics.py
- Performance trackingrate_limit.py
- Request rate managementdashboard.py
- Real-time monitoring interface
The agent provides a real-time dashboard at http://localhost:8501
showing:
- Current positions
- Account value
- Recent trades
- PnL metrics
- Market data
Built-in risk management features:
- Maximum position limits
- Rate limiting
- Slippage protection
- Position reduction logic
- Price deviation checks
The project uses Poetry for dependency management. To set up a development environment:
- Install Poetry if you haven't already:
curl -sSL https://install.python-poetry.org | python3 -
- Install dependencies:
poetry install
- Activate the virtual environment:
poetry shell
- Run tests:
poetry run pytest
- Run the agent:
poetry run python -m agent_smith.main
- Fork the repository
- Create a feature branch
- Install development dependencies:
poetry install --with dev
- Run tests:
poetry run pytest
- Commit your changes
- Push to the branch
- Create a Pull Request
This project uses Poetry for dependency management. Key dependencies include:
- hyperliquid-python-sdk
- streamlit (for dashboard)
- pandas (for data processing)
- loguru (for logging)
- pydantic (for config)
To add new dependencies:
poetry add package_name
For development dependencies:
poetry add --group dev package_name
This project is licensed under the MIT License - see the LICENSE file for details.
THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
The developers of Baby Smith take no responsibility and assume no liability for any money lost through the use of this software. Use at your own risk.
For questions and support:
- Join the Hyperliquid Discord
- Visit the Hyperliquid Documentation
Remember: This is experimental software for educational purposes. Never trade with more money than you can afford to lose.
© Copyright 2025 HYDRA Labs - MIT License