Split agents to separate app - #17
Open
timonv wants to merge 2 commits into
Open
Conversation
Member
Author
|
Todo for later:
|
timonv
commented
Oct 8, 2023
| } | ||
| ) | ||
| # TODO: should be pushed to amqp instead | ||
| AmqpConnection.instance.publish_on_channel('agents.events', type: 'prompt', content: { prompt: result.prompt, response: result.full_response }.to_json) |
|
|
||
| def codebase | ||
| Codebase.find(codebase_id) | ||
| raise "finding codebase not allowed" |
| context.agent_run.events.create!(event_hash: context.history.last) | ||
| # TODO: should post agent run updates to amqp instead | ||
| AmqpConnection.instance.publish_on_channel("agents.update", context.agent_run.as_json) | ||
| AmqpConnection.instance.publish_on_channel("agents.event", context.agent_run.events.last.as_json) |
Member
There was a problem hiding this comment.
I like it, maar misschien AmqpConnection.instance.publish_on_channel nog even abstraheren naar iets als Message.publish('agents.update', context.agent_run.as_json) ofzo zodat we gemakkelijk Amqp uit kunnen swappen of mocken als nodig.
Member
|
Sneakers ziet er gaaf uit! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Draft concept split into two parts.
Everything agent goes to ruby agents, everything else stays in deckhand.
Conceptialliy, main app pushes events via AMQP for agents to pick up and process. Agents can also push events to trigger new agents and push back to the main app.
In terms of code changes:
For this to merge, to keep the scope small, I'd suggest to not split up agents, add new functionality / tests or change the way agents work. Just replace the calls with AMQP events and keep the rest as is.