Skip to content
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

Agents that don't run forever #44

Open
AndrewBKang opened this issue Jul 22, 2024 · 1 comment
Open

Agents that don't run forever #44

AndrewBKang opened this issue Jul 22, 2024 · 1 comment

Comments

@AndrewBKang
Copy link
Contributor

AndrewBKang commented Jul 22, 2024

class SayHelloWorld5TimesAgent < Sublayer::Agents::Base
  trigger TimeTrigger.new(5)

  goal_condition { @greeting_count == 5 }

  check_status { puts "Current hello world count is: #{@greeting_count}" }

  step do
    @greeting_count += 1
    puts "hello world"
  end

  def initialize
    @greeting_count = 0
  end
end

There may be a desire to have "stop" conditions for an agent.

The code above is "wrong" in the sense that "goal conditions" and "status checking" is meant for the repetition of steps. Triggers are meant for the "starting" of the step/goal condition flow, and in some ways the agent itself.
so "starting" is directly related to "triggers" and status/goals/steps is the repetitve "action" but "stopping" the entire agent itself is currently not yet a thing.

@swerner
Copy link
Contributor

swerner commented Jul 24, 2024

Bringing the conversation here over from Discord.

Couple things to thing about with this...

I know there are probably a lot of them, but would love to see some examples of agents that we'd want to stop on their own (and not sit around waiting for a trigger) where you wouldn't just kill the process yourself.

We're also exploring bringing back the CLI/TUI from an earlier version of the framework for controlling and building agents, and in that case being able to control execution directly between multiple agents, actions, and generators

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

No branches or pull requests

2 participants