lib/agents/protagonist_antagonist.ex

defmodule Langchain.Agent.Protagonist do
  defstruct [:name, :objective, :context, :model, :prompt, :score, :antagonist]
end

defmodule LangChain.Agent.Antagonist do
  defstruct [:name, :objective, :context, :model, :prompt, :score, :protagonist]
end

defmodule ProtagonistAntagonistEvolve do
  @moduledoc """
  The Protagonist is the agent that is trying to solve the problem.
  The Antagonist is the agent that is trying to prevent the Protagonist from solving the problem.
  """

  @doc """
  The Protagonist can start the dialogue or the Antagonist can start the dialogue.
  """

  def init_prompts(protagonist_prompts, antagonist_prompts) do
  end

  def protagonist_dialogue(antagonist, objective, context) do
    Logger.info("Protagonist: I am trying to #{objective}.")
    # result = LangChain.LanguageModelProtocol.ask(protagonist.model, )

  end

  def antagonist_dialogue(protagonist, objective, context) do
    Logger.info("Antagonist: I am trying to prevent you from #{objective}.")
    Logger.info("Antagonist: I am going to ask you to #{context}.")
  end
end

defmodule ProtagonistAntagonistEvolve do
end