Custom Agent
How to create a custom agent with the HUD SDK
Overview
A custom agent typically consists of:
-
An agent class that processes observations and decides on actions
-
An adapter that converts your agent’s actions to the Common Language for Action (CLA) format
-
A main loop that handles the interaction between your agent and the environment
It’s useful to look at our sample Claude Computer Use implementation before writing your own agent class.
Creating a Simple Agent
Here’s an example of a simple agent that responds to tasks:
Creating a Custom Adapter
Next, create an adapter to translate your agent’s actions to the CLA format. See more details under the adapter concept.
Main Loop
Finally, implement the main loop to connect your agent with the environment: