Aller directement au contenu principal

agenthub.codeact_swe_agent.codeact_swe_agent

CodeActSWEAgent Objects

class CodeActSWEAgent(Agent)

VERSION

This agent is an adaptation of the original SWE Agent based on CodeAct 1.5 using the agentskills library of OpenHands.

It is intended use is solving Github issues.

It removes web-browsing and Github capability from the original CodeAct agent to avoid confusion to the agent.

__init__

def __init__(llm: LLM, config: AgentConfig) -> None

Initializes a new instance of the CodeActSWEAgent class.

Arguments:

  • llm (LLM): The llm to be used by this agent

reset

def reset() -> None

Resets the CodeAct Agent.

step

def step(state: State) -> Action

Performs one step using the CodeAct Agent. This includes gathering info on previous steps and prompting the model to make a command to execute.

Arguments:

  • state (State): used to get updated info and background commands

Returns:

  • CmdRunAction(command) - bash command to run
  • IPythonRunCellAction(code) - IPython code to run
  • MessageAction(content) - Message action to run (e.g. ask for clarification)
  • AgentFinishAction() - end the interaction