Skip to content

A sophisticated agent system designed to optimize asset allocation across multiple Logarithm vaults within a meta vault framework, with the primary objective of maximizing returns.

Notifications You must be signed in to change notification settings

Logarithm-Labs/curator-agent

Repository files navigation

Curator Agent

A sophisticated agent system designed to optimize asset allocation across multiple Logarithm vaults within a meta vault framework, with the primary objective of maximizing returns.

Overview

The Curator Agent employs advanced strategies to dynamically manage and rebalance assets across various Logarithm vaults, ensuring optimal performance and risk-adjusted returns.

System Architecture

Workflow Diagram

Prerequisites

  • Python 3.12
  • uv package manager
  • OpenAI API key
  • Sufficient disk space for backtest data

Installation

For Development/Contributing

  1. Install uv Package Manager

    curl -LsSf https://astral.sh/uv/install.sh | sh
  2. Install Project Dependencies

    uv sync --locked

For Using as a Package in Other Projects

You can install curator-agent as a package in your own projects using uv:

# Install from GitHub repository
uv add git+ssh://[email protected]/Logarithm-Labs/curator-agent.git#egg=curator

# Or install from a specific branch/tag
uv add git+ssh://[email protected]/Logarithm-Labs/curator-agent.git@main#egg=curator

Usage Example

After installation, you can use the curator modules in your project:

from curator import (
    AllocationAction,
    ReallocationAction,
    WithdrawAction,
    AnalysisSummary,
    validate_allocation,
    ValidationFeedback,
    create_allocation_agent,
    create_reallocation_agent,
    create_withdraw_agent,
    create_analysis_agent
)

# Use validation utilities
result = validate_allocation(1000.0, ["btc", "eth"], [600.0, 400.0], [800.0, 500.0])
print(f"Validation result: {result.result}")

# Import action classes and agent creation functions
# See examples/basic_usage.py for more details

See examples/basic_usage.py for a complete usage example.

Running Backtests

1. Build Observations

The system uses historical data from back_test/data/hyperliquid to generate observations. This data includes:

  • Logarithm vaults performance metrics

Within the loader functions in back_test/loader, the following information is simulated during building:

  • Pending Withdrawals and Idle Assets of Logarithm vaults based on standard distribution sampling
  • Deposits to and Withdraws from the Agent are simulated based on uniform distribution sampling

To build observations:

uv run -m back_test.build_observations

2. Execute Backtests

Before running the backtests, ensure your OpenAI API key is configured in your environment:

export OPENAI_API_KEY='your-api-key'

Run the following commands to execute different strategies:

# Run the curator strategy
uv run -m back_test.curator_strategy

# Run the baseline strategy for comparison
uv run -m back_test.baseline_strategy

3. Visualize Results

Generate performance visualizations:

uv run -m back_test.dashboard

Important: Before running the dashboard, ensure the correct log path is configured in dashboard.py.

Project Structure

.
├── back_test/
│   ├── data/
│   │   └── hyperliquid/    # Historical performance data
│   ├── build_observations.py
│   ├── curator_strategy.py
│   ├── baseline_strategy.py
│   └── dashboard.py
└── images/
    └── workflow.png

Contributing

Please read our contributing guidelines before submitting pull requests.

License

MIT License

Copyright (c) 2025 Curator Agent

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 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.

Support

For support and questions, please join our Discord community: Discord Server

About

A sophisticated agent system designed to optimize asset allocation across multiple Logarithm vaults within a meta vault framework, with the primary objective of maximizing returns.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published