code: protected synchronized void destroyAgent (int agentId)
      {
          Agent agent = null;
          agent = _agents.remove(agentId);
  
          if (agent == null) {
              log.warning("Lost an agent, id " + agentId);
          } else {
              try {
                  agent.stop();
              } catch (Throwable t) {
                  log.warning("Stopping an agent caused an exception", t);
              }
              SafeSubscriber<AgentObject> subscriber = _subscribers.remove(agentId);
              if (subscriber == null) {
                  log.warning("Lost a subscriber for agent " + agent);
              } else {
                  subscriber.unsubscribe(_ctx.getDObjectManager());
              }
              _bureauService.agentDestroyed(agentId);
          }
      }
docs: Destroys an agent at the server's request.