Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -136,3 +136,7 @@ letsencrypt/

# dev env
.env

# Pants build system
/.pants.d/
/dist/
2 changes: 1 addition & 1 deletion full_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Drakkar-Software full requirements
OctoBot-Commons[full]==1.10.6
OctoBot-Trading[full]==2.5.4
OctoBot-Trading[full]==2.5.5
OctoBot-Evaluators[full]==1.10.1
OctoBot-Tentacles-Manager[full]==2.10.0
OctoBot-Services[full]==1.7.2
Expand Down
4 changes: 3 additions & 1 deletion octobot/backtesting/independent_backtesting.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,8 @@ def _find_reference_market_and_update_contract_type(self):
forced_contract_type = self.octobot_origin_config.get(common_constants.CONFIG_CONTRACT_TYPE,
common_constants.USE_CURRENT_PROFILE)
for symbols in self.symbols_to_create_exchange_classes.values():
if not symbols:
continue
symbol = symbols[0]
if next(iter(self.octobot_backtesting.exchange_type_by_exchange.values())) \
== common_constants.CONFIG_EXCHANGE_FUTURE:
Expand Down Expand Up @@ -451,7 +453,7 @@ def _find_reference_market_and_update_contract_type(self):
if ref_market_candidate != quote and \
ref_market_candidates[ref_market_candidate] < ref_market_candidates[quote]:
ref_market_candidate = quote
return ref_market_candidate
return ref_market_candidate or common_constants.DEFAULT_REFERENCE_MARKET

def _add_config_default_backtesting_values(self):
if backtesting_constants.CONFIG_BACKTESTING not in self.backtesting_config:
Expand Down
8 changes: 8 additions & 0 deletions packages/agents/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Pants BUILD file for octobot_agents package

python_sources(
name="lib",
sources=["octobot_agents/**/*.py"],
# External dependencies (async_channel, octobot_commons, pydantic)
# will be resolved from requirements.txt or lockfile via Pants dependency inference
)
1 change: 1 addition & 0 deletions packages/agents/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# OctoBot Agents
90 changes: 90 additions & 0 deletions packages/agents/octobot_agents/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# This file is part of OctoBot (https://github.com/Drakkar-Software/OctoBot)
# Copyright (c) 2025 Drakkar-Software, All rights reserved.
#
# OctoBot is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either
# version 3.0 of the License, or (at your option) any later version.
#
# OctoBot is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public
# License along with OctoBot. If not, see <https://www.gnu.org/licenses/>.

from octobot_agents import agent
from octobot_agents.agent import (
AbstractAgentChannel,
AbstractAgentChannelProducer,
AbstractAgentChannelConsumer,
AbstractAIAgentChannel,
AbstractAIAgentChannelProducer,
AbstractAIAgentChannelConsumer,
AbstractMemoryAgent,
export_memories,
import_memories,
)

from octobot_agents import storage
from octobot_agents.storage import (
AbstractMemoryStorage,
JSONMemoryStorage,
create_memory_storage,
get_memory_tools,
execute_memory_tool,
)

from octobot_agents import team
from octobot_agents.team import (
AbstractAgentsTeamChannel,
AbstractAgentsTeamChannelProducer,
AbstractAgentsTeamChannelConsumer,
AbstractSyncAgentsTeamChannelProducer,
AbstractLiveAgentsTeamChannelProducer,
AbstractCriticAgent,
AbstractJudgeAgent,
)

from octobot_agents import errors
from octobot_agents.errors import (
AgentError,
TeamConfigurationError,
MissingManagerError,
MissingRequiredInputError,
AgentConfigurationError,
StorageError,
UnsupportedStorageTypeError,
)

__all__ = [
"AbstractAgentChannel",
"AbstractAgentChannelProducer",
"AbstractAgentChannelConsumer",
"AbstractAIAgentChannel",
"AbstractAIAgentChannelProducer",
"AbstractAIAgentChannelConsumer",
"AbstractAgentsTeamChannel",
"AbstractAgentsTeamChannelProducer",
"AbstractAgentsTeamChannelConsumer",
"AbstractSyncAgentsTeamChannelProducer",
"AbstractLiveAgentsTeamChannelProducer",
"AbstractMemoryStorage",
"JSONMemoryStorage",
"AbstractMemoryAgent",
"create_memory_storage",
"export_memories",
"import_memories",
"get_memory_tools",
"execute_memory_tool",
"AbstractCriticAgent",
"AbstractJudgeAgent",
"AgentError",
"TeamConfigurationError",
"MissingManagerError",
"MissingRequiredInputError",
"AgentConfigurationError",
"StorageError",
"UnsupportedStorageTypeError",
]
54 changes: 54 additions & 0 deletions packages/agents/octobot_agents/agent/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# This file is part of OctoBot (https://github.com/Drakkar-Software/OctoBot)
# Copyright (c) 2025 Drakkar-Software, All rights reserved.
#
# OctoBot is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either
# version 3.0 of the License, or (at your option) any later version.
#
# OctoBot is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public
# License along with OctoBot. If not, see <https://www.gnu.org/licenses/>.

from octobot_agents.agent import channels
from octobot_agents.agent.channels import (
AbstractAgentChannel,
AbstractAgentChannelConsumer,
AbstractAgentChannelProducer,
AbstractAIAgentChannel,
AbstractAIAgentChannelConsumer,
AbstractAIAgentChannelProducer,
)

from octobot_agents import storage
from octobot_agents.storage import (
AbstractMemoryStorage,
JSONMemoryStorage,
create_memory_storage,
)

from octobot_agents.agent import memory
from octobot_agents.agent.memory import (
export_memories,
import_memories,
AbstractMemoryAgent,
)

__all__ = [
"AbstractAgentChannel",
"AbstractAgentChannelConsumer",
"AbstractAgentChannelProducer",
"AbstractAIAgentChannel",
"AbstractAIAgentChannelConsumer",
"AbstractAIAgentChannelProducer",
"AbstractMemoryStorage",
"JSONMemoryStorage",
"export_memories",
"import_memories",
"AbstractMemoryAgent",
"create_memory_storage",
]
36 changes: 36 additions & 0 deletions packages/agents/octobot_agents/agent/channels/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# This file is part of OctoBot (https://github.com/Drakkar-Software/OctoBot)
# Copyright (c) 2025 Drakkar-Software, All rights reserved.
#
# OctoBot is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either
# version 3.0 of the License, or (at your option) any later version.
#
# OctoBot is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public
# License along with OctoBot. If not, see <https://www.gnu.org/licenses/>.

from octobot_agents.agent.channels.agent import (
AbstractAgentChannel,
AbstractAgentChannelConsumer,
AbstractAgentChannelProducer,
)

from octobot_agents.agent.channels.ai_agent import (
AbstractAIAgentChannel,
AbstractAIAgentChannelConsumer,
AbstractAIAgentChannelProducer,
)

__all__ = [
"AbstractAgentChannel",
"AbstractAgentChannelConsumer",
"AbstractAgentChannelProducer",
"AbstractAIAgentChannel",
"AbstractAIAgentChannelConsumer",
"AbstractAIAgentChannelProducer",
]
Loading