Skip to content

Refactoring TalksAgent to use active agent #890

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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

TonsOfFun
Copy link
Contributor

Refactoring TalksAgent to use active agent's action prompt for action… view style prompt message template rendering


1. First, review the metadata of the video:
<metadata>
- title: #{title}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These interpolations won't work in ERB files

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed this needs to be updated and tested still, thanks for pointing this out.

@@ -0,0 +1,22 @@
<%= {
Copy link
Member

@marcoroth marcoroth Aug 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason why this is in ERB and in a separate file if it's just a Ruby hash anyway?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Separate file to separate of concerns, but doesn't have to be erb, though I have been using erb to render things like action names dynamically.

def update_topics
raw_response = JSON.repair(response.dig("choices", 0, "message", "content"))
topics = begin
JSON.parse(raw_response)["topics"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like this should either be directly handled in the framework or maybe the schema needs to be updated?

Isn't the whole idea of structured output that it gives you JSON back?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, this also needs testing, I mostly wanted to show how it will look overall compared to how it was before. That way I could get your feedback before spending too much time on it.

@adrienpoly
Copy link
Member

Hello

thanks for working on this proposal. Just a quick heads up that this part of the code has been working quite well for us up to now and I kind of liked the combination of ActiveJob-performs and associated object we ended up using.

At this point of the PR I don't really see a clear benefits of introducing a new dependency/framework. I am following ActiveAgent development I feel like it is made for more complex Agent workflows and we are not there yet our usage is very simple and I think will remain simple for quite some time.

If we where to introduce a new framework I would prefer that this happens on some new feature where it really brings something new to the table

but happy to be convinced otherwise

@TonsOfFun
Copy link
Contributor Author

I appreciate your perspective and the old adage of don't fix what isn't broken certainly applies to your sentiments.

I was planning to start with this conversion/refactor as a POC for what you already have as an example of how active agent could be used to make even simple use cases more concise.

The ultimate goal would be to continue on to having more advanced agent feature sets for collecting talks, events, and sponsors data.

Let me know if you'd like to discuss this proposal/draft PR more or if there is any interest in continuing down this path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants