feat: implement conversational AI with tool-calling for strategy management #51

Closed
opened 2026-04-10 06:56:21 +02:00 by shoko · 0 comments
Owner

Problem

Currently the bot forces JSON output from LLM which breaks normal conversation. User cannot have a natural chat with the bot.

Proposed Solution

Implement a hybrid approach:

Mode 1: Normal Conversation

User can ask questions like:

  • What is this bot?
  • How do I configure a strategy?
  • What tokens are supported?

Mode 2: Tool Calling (when user provides specific parameters)

User provides specific instructions like:

  • I want take profit at 200% and stop loss at 30%
  • Buy PEPE when it drops 5%

LLM calls the appropriate tool to update the strategy.

Tools to Implement

    • Returns current trading strategy configuration
    • Updates the trading strategy with conditions and actions

Technical Approach

Use CrewAI's native @tool decorator to create tools, then pass them to the agent. CrewAI's LLM class supports function calling natively.

Tasks

  • Create tools for get_strategy and update_strategy
  • Modify agent to use these tools
  • Test normal conversation flow
  • Test tool calling flow
## Problem Currently the bot forces JSON output from LLM which breaks normal conversation. User cannot have a natural chat with the bot. ## Proposed Solution Implement a hybrid approach: ### Mode 1: Normal Conversation User can ask questions like: - What is this bot? - How do I configure a strategy? - What tokens are supported? ### Mode 2: Tool Calling (when user provides specific parameters) User provides specific instructions like: - I want take profit at 200% and stop loss at 30% - Buy PEPE when it drops 5% LLM calls the appropriate tool to update the strategy. ## Tools to Implement 1. - Returns current trading strategy configuration 2. - Updates the trading strategy with conditions and actions ## Technical Approach Use CrewAI's native @tool decorator to create tools, then pass them to the agent. CrewAI's LLM class supports function calling natively. ## Tasks - [ ] Create tools for get_strategy and update_strategy - [ ] Modify agent to use these tools - [ ] Test normal conversation flow - [ ] Test tool calling flow
shoko closed this issue 2026-04-10 09:40:54 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: shoko/randebu#51