Download packages/openpi-client/src/openpi_client/runtime/agent.py from s3y/openpi: direct link, hf CLI and curl.
- Browser
- Download file 465 Bytes
-
https://huggingface.co/s3y/openpi/resolve/main/packages/openpi-client/src/openpi_client/runtime/agent.py
- Command line
-
hf download hf://s3y/openpi/packages/openpi-client/src/openpi_client/runtime/agent.py
-
curl -L -o agent.py https://huggingface.co/s3y/openpi/resolve/main/packages/openpi-client/src/openpi_client/runtime/agent.py
465 Bytes
| import abc | |
| class Agent(abc.ABC): | |
| """An Agent is the thing with agency, i.e. the entity that makes decisions. | |
| Agents receive observations about the state of the world, and return actions | |
| to take in response. | |
| """ | |
| def get_action(self, observation: dict) -> dict: | |
| """Query the agent for the next action.""" | |
| def reset(self) -> None: | |
| """Reset the agent to its initial state.""" | |