I am preparing an enviornment for ALU using UVM. I have prapared a driver, monitor and sequencer in one agent and only a monitor in another agent. 1)Is that necessary to create a passive agent always? 2)If the answer is 'no', then how can I use the only

I am preparing an enviornment for ALU using UVM. I have prapared a driver, monitor and sequencer in one agent and only a monitor in another agent.
1)Is that necessary to create a passive agent always?
2)If the answer is ‘no’, then how can I use the only monitor for monitoring the DUT output and for providing the transactions to the scoreoard?

In reply to Prathamesh Govardhane:

I would suggest take a look
https://colorlesscube.com/uvm-guide-for-beginners/chapter-1-the-dut/
you can have two monitor in one agent
like
class simpleadder_agent extends uvm_agent;
`uvm_component_utils(simpleadder_agent)

uvm_analysis_port#(simpleadder_transaction) agent_ap_before;
uvm_analysis_port#(simpleadder_transaction) agent_ap_after;

simpleadder_sequencer		sa_seqr;
simpleadder_driver		sa_drvr;
simpleadder_monitor_before	sa_mon_before;
simpleadder_monitor_after	sa_mon_after;

Details : https://github.com/naragece/uvm-testbench-tutorial-simple-adder/blob/master/simpleadder_agent.sv
simpleadder_monitor_after evaluates expected out , and other one have data from the design

You can use just the one agent if you add a configuration setting which specifies if the agent is ACTIVE or PASSIVE.

In the build phase, you will always create the monitor.
However you will only create the sequencer and driver if the agent config variable is set to ACTIVE. Below is some example code from the build phase for doing that.

 // Construct a sequencer and driver only if agent is in active mode
 if (configuration.active_passive == ACTIVE) begin
   sequencer = new("sequencer",this);
   driver = DRIVER_T::type_id::create({agent_name,"_driver"},this);
   driver.set_config(configuration);
 end

In reply to graeme_jessiman:

The key question is what is the second monitor intended for? Should it observe the same functional interface as the agent i connected to?

In reply to chr_sue:

See the one monitor is collecting the output from the DUT and giving it to the scoreboard.
and the second monitor will collect the transactions and give it to the scoreboard.

In reply to Prathamesh Govardhane:

Agents are related to functional interfaces in your UVM environment. If you have only 1 functional interface, then you need only one monitor.
I recommedn you should watch the UVM videos from the Verification Academy.