How to use set_config with bit[7:0]

agent1 contain bit[7:0] var;
alu_env contain agent1 agt;

how to set config (the syntax) the var field in the build of alu_env ???

The OVM has the ability to configure only three types of variables: int(which is actually 4096 bits wide), string, and a class object. You can use set_config_int with a variable of any size less than 4096 bits.

However, for better performance and maintainability, we recommend that you create a single configuration object for each component, with a field in that object for each variable you need to configure, rather than trying to set individual configurations for each variable.

thanks ,
i looked for an example that i can see how to use it with env and agents
how to use the set_config_int and get_config_int
if u have an short example just for the build implementation it will be great,