How to select the sum from three tables and group by date
With other servers you  can use common table expressions.  With MySQL you can use derived tables as in:

select name, year, month, sum(cnt) from
(select agent.name, year(date) as year, monthname(date) as month, count(*) as cnt
from
agent inner join software on (agent.id = software.agent_id) group by agent.name, year(date), monthname(date)
union (select agent.name, year(date) as year, monthname(date) as month, count(*) as cnt
from 
agent inner join works on (agent.id = works.agent_id)
group by agent.name, year(date), monthname(date))) T1
group by name, year, month