Skip to content

Commit 7009bc2

Browse files
committed
enhance documentation for AgentArgs class with usage examples and serialization note
1 parent ff2a3c3 commit 7009bc2

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/agentlab/agents/agent_args.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,16 @@
33

44

55
class AgentArgs(AbstractAgentArgs):
6+
"""Base class for agent arguments for instantiating an agent.
7+
8+
Define agent arguments as dataclass variables of this class. For example:
9+
10+
class MyAgentArgs(AgentArgs):
11+
my_arg: str = "default_value"
12+
my_other_arg: int = 42
13+
14+
Note: for working properly with AgentXRay, the arguments need to be serializable and hasable.
15+
"""
616

717
def set_benchmark(self, benchmark: bgym.Benchmark, demo_mode: bool):
818
"""Optional method to set benchmark specific flags.

0 commit comments

Comments
 (0)