Conversation
|
I'm looking at this again and wondering if this is the correct approach. The original commit has 'dynamic callbacks' but they seem to add complexity (at least to me). Also, if the intention is only a single agent running at a time(which spins off a claude process) then maybe things can be kept simple. If there might be concurrent agents I'm not sure how that's done. Also, as I noted in discord, seems that we would need class definitions of Response and Event/Message to make the desired interface possible: module RubyAgent
class Response
attr_reader events
def initialize
# ???
end
def final
"the_final_response"
end
...
end
class Event
attr_reader :type, :sub_type, :tool_calls # or are these separate events?
# OR should the claude message json be the superset of fields?
end
end |
|
Sorry. I should have created the branch for this in my fork of this repo. I'll move it. Also, as you can see, I'm struggling a bit with the events and callbacks. I think I'm better at working with existing 'application' code than libraries with dynamic stuff like this. I'll keep struggling with it a bit, but feel free to consider this a learning experiment rather than something that needs to be merged into main. BTW: This project looks to have good patterns: https://ai-agents.chatwoot.dev/ |
Added a possible implementation of basic funtionality with short example.
Tests not completed.