|
|
преди 1 година | |
|---|---|---|
| .. | ||
| agenthub | преди 1 година | |
| controller | преди 1 година | |
| core | преди 1 година | |
| events | преди 1 година | |
| linter | преди 1 година | |
| llm | преди 1 година | |
| memory | преди 1 година | |
| runtime | преди 1 година | |
| security | преди 1 година | |
| server | преди 1 година | |
| storage | преди 1 година | |
| utils | преди 1 година | |
| README.md | преди 1 година | |
| __init__.py | преди 1 година | |
| py.typed | преди 1 година | |
This directory contains the core components of OpenHands.
This diagram provides an overview of the roles of each component and how they communicate and collaborate.

The key classes in OpenHands are:
Here's the basic loop (in pseudocode) that drives agents.
while True:
prompt = agent.generate_prompt(state)
response = llm.completion(prompt)
action = agent.parse_response(response)
observation = runtime.run(action)
state = state.update(action, observation)
In reality, most of this is achieved through message passing, via the EventStream. The EventStream serves as the backbone for all communication in OpenHands.
flowchart LR
Agent--Actions-->AgentController
AgentController--State-->Agent
AgentController--Actions-->EventStream
EventStream--Observations-->AgentController
Runtime--Observations-->EventStream
EventStream--Actions-->Runtime
Frontend--Actions-->EventStream
Please refer to the documentation to learn more about Runtime.