mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-26 05:48:36 +08:00
* docs(docs): start implementing docs website * update video url * add autogenerated codebase docs for backend * precommit * update links * fix config and video * gh actions * rename * workdirs * path * path * fix doc1 * redo markdown * docs * change main folder name * simplify readme * add back architecture * Fix lint errors * lint * update poetry lock --------- Co-authored-by: Jim Su <jimsu@protonmail.com>
1.0 KiB
1.0 KiB
sidebar_label, title
| sidebar_label | title |
|---|---|
| codeact_agent | agenthub.codeact_agent.codeact_agent |
CodeActAgent Objects
class CodeActAgent(Agent)
The Code Act Agent is a minimalist agent. The agent works by passing the model a list of action-observation pairs and prompting the model to take the next step.
__init__
def __init__(llm: LLM) -> None
Initializes a new instance of the CodeActAgent class.
Arguments:
- llm (LLM): The llm to be used by this agent
step
def step(state: State) -> Action
Performs one step using the Code Act 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) - command action to run
- AgentEchoAction(content=INVALID_INPUT_MESSAGE) - invalid command output
Raises:
- NotImplementedError - for actions other than CmdOutputObservation or AgentMessageObservation