Choose the base class based on where the agent runs.
- Installed agent
- External agent
Extend Use
BaseInstalledAgent when Harbor should install and run the agent CLI
inside the task environment.my_agent.py
exec_as_root for system packages and exec_as_agent for user-level
installation and execution. Override populate_context_post_run to parse
usage or trajectory data after the logs are synced.Run a custom agent
Custom agents are not registered by name, so passmodule.path:ClassName to
--agent (-a). The module must be importable from the Harbor process.
--model (-m) if the agent takes a model, --agent-kwarg (--ak) for other
constructor options, and --agent-env (--ae) for environment variables.
Custom agent example
See a complete
BaseAgent implementation in the Harbor repository.
