-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Split agents to separate app #17
base: main
Are you sure you want to change the base?
Conversation
Todo for later:
|
} | ||
) | ||
# 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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
naming
|
||
def initialize(assignment, codebase: nil, **kwargs) | ||
@codebase_id = codebase.id | ||
super(assignment, **kwargs) | ||
end | ||
|
||
def codebase | ||
Codebase.find(codebase_id) | ||
raise "finding codebase not allowed" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tragedy waiting to happen
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
naming
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Sneakers ziet er gaaf uit! |
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.