Not sure if there is method to disable the agent through API because the enable/disable property is configuration property and stored with that agent in CQ (for example /etc/replication/agents.author/publish/jcr:content). But what you can do to accomplish that is as below.
AgentManager agentMgr = sling.getService(AgentManager.class);
Agent agent = agentMgr.getAgents().get(id);
AgentConfig cfg = agent == null ? null : agent.getConfiguration();
I hope above helps you to proceed.
Pawan, I had a related question. Is it a posibility to progrmatically replicate a node/content from author to publish without using the replication agent (even if the corresponding publish replication agents are disabled)
I dont think there is any other OOTB/API way which allows you to publish node without using agent. You have to use agent, as these are the only API which has been created to manage the replication and all other stuff related to replication until you are planning to write something which can stand parallel to replication api .