π OpenHands: AI-Driven Development
Update AgentHubREADME.md (#2290)
Aleksandarb0b19e6c25ce
diff --git a/agenthub/README.md b/agenthub/README.mdindex 6dd6b54c83..232c31caec 100644--- a/agenthub/README.md+++ b/agenthub/README.md@@ -2,15 +2,15 @@In this folder, there may exist multiple implementations of `Agent` that will be used by the framework.-For example, `agenthub/monologue_agent`, `agenthub/metagpt_agent`, `agenthub/codeact_agent`, etc.+For example, `agenthub/codeact_agent`, etc.Contributors from different backgrounds and interests can choose to contribute to any (or all!) of these directions.## Constructing an Agent-The abstraction for an agent can be found [here](../opendevin/agent.py).+The abstraction for an agent can be found [here](../opendevin/controller/agent.py).Agents are run inside of a loop. At each iteration, `agent.step()` is called with a-[State](../opendevin/state.py) input, and the agent must output an [Action](../opendevin/action).+[State](../opendevin/controller/state/state.py) input, and the agent must output an [Action](../opendevin/events/action).Every agent also has a `self.llm` which it can use to interact with the LLM configured by the user.See the [LiteLLM docs for `self.llm.completion`](https://docs.litellm.ai/docs/completion).@@ -28,21 +28,19 @@ The `state` contains:Here is a list of available Actions, which can be returned by `agent.step()`:-- [`CmdRunAction`](../opendevin/action/bash.py) - Runs a command inside a sandboxed terminal-- [`CmdKillAction`](../opendevin/action/bash.py) - Kills a background command-- [`IPythonRunCellAction`](../opendevin/action/bash.py) - Execute a block of Python code interactively (in Jupyter notebook) and receives `CmdOutputObservation`. Requires setting up `jupyter` [plugin](../opendevin/sandbox/plugins) as a requirement.-- [`FileReadAction`](../opendevin/action/fileop.py) - Reads the content of a file-- [`FileWriteAction`](../opendevin/action/fileop.py) - Writes new content to a file-- [`BrowseURLAction`](../opendevin/action/browse.py) - Gets the content of a URL-- [`AgentRecallAction`](../opendevin/action/agent.py) - Searches memory (e.g. a vector database)-- [`AddTaskAction`](../opendevin/action/tasks.py) - Adds a subtask to the plan-- [`ModifyTaskAction`](../opendevin/action/tasks.py) - Changes the state of a subtask-- [`AgentThinkAction`](../opendevin/action/agent.py) - A no-op that allows the agent to add plaintext to the history (as well as the chat log)-- [`AgentTalkAction`](../opendevin/action/agent.py) - A no-op that allows the agent to add plaintext to the history and talk to the user.-- [`AgentFinishAction`](../opendevin/action/agent.py) - Stops the control loop, allowing the user/delegator agent to enter a new task-- [`AgentRejectAction`](../opendevin/action/agent.py) - Stops the control loop, allowing the user/delegator agent to enter a new task-- [`AgentFinishAction`](../opendevin/action/agent.py) - Stops the control loop, allowing the user to enter a new task-- [`MessageAction`](../opendevin/action/message.py) - Represents a message from an agent or the user+- [`CmdRunAction`](../opendevin/events/action/commands.py) - Runs a command inside a sandboxed terminal+- [`CmdKillAction`](../opendevin/events/action/commands.py) - Kills a background command+- [`IPythonRunCellAction`](../opendevin/events/action/commands.py) - Execute a block of Python code interactively (in Jupyter notebook) and receives `CmdOutputObservation`. Requires setting up `jupyter` [plugin](../opendevin/runtime/plugins) as a requirement.+- [`FileReadAction`](../opendevin/events/action/files.py) - Reads the content of a file+- [`FileWriteAction`](../opendevin/events/action/files.py) - Writes new content to a file+- [`BrowseURLAction`](../opendevin/events/action/browse.py) - Gets the content of a URL+- [`AgentRecallAction`](../opendevin/events/action/agent.py) - Searches memory (e.g. a vector database)+- [`AddTaskAction`](../opendevin/events/action/tasks.py) - Adds a subtask to the plan+- [`ModifyTaskAction`](../opendevin/events/action/tasks.py) - Changes the state of a subtask.+- [`AgentFinishAction`](../opendevin/events/action/agent.py) - Stops the control loop, allowing the user/delegator agent to enter a new task+- [`AgentRejectAction`](../opendevin/events/action/agent.py) - Stops the control loop, allowing the user/delegator agent to enter a new task+- [`AgentFinishAction`](../opendevin/events/action/agent.py) - Stops the control loop, allowing the user to enter a new task+- [`MessageAction`](../opendevin/events/action/message.py) - Represents a message from an agent or the userYou can use `action.to_dict()` and `action_from_dict` to serialize and deserialize actions.@@ -54,13 +52,13 @@ in the background).Here is a list of available Observations:-- [`CmdOutputObservation`](../opendevin/observation/run.py)-- [`BrowserOutputObservation`](../opendevin/observation/browse.py)-- [`FileReadObservation`](../opendevin/observation/files.py)-- [`FileWriteObservation`](../opendevin/observation/files.py)-- [`AgentRecallObservation`](../opendevin/observation/recall.py)-- [`ErrorObservation`](../opendevin/observation/error.py)-- [`SuccessObservation`](../opendevin/observation/success.py)+- [`CmdOutputObservation`](../opendevin/events/observation/commands.py)+- [`BrowserOutputObservation`](../opendevin/events/observation/browse.py)+- [`FileReadObservation`](../opendevin/events/observation/files.py)+- [`FileWriteObservation`](../opendevin/events/observation/files.py)+- [`AgentRecallObservation`](../opendevin/events/observation/recall.py)+- [`ErrorObservation`](../opendevin/events/observation/error.py)+- [`SuccessObservation`](../opendevin/events/observation/success.py)You can use `observation.to_dict()` and `observation_from_dict` to serialize and deserialize observations.