code: func (as *AgentServer) Execute(request *pb.ExecutionRequest, stream pb.GleamAgent_ExecuteServer) error {
  
  	dir := path.Join(*as.Option.Dir, fmt.Sprintf("%d", request.GetInstructionSet().GetFlowHashCode()), request.GetDir())
  	os.MkdirAll(dir, 0755)
  
  	allocated := *request.GetResource()
  
  	as.plusAllocated(allocated)
  	defer as.minusAllocated(allocated)
  
  	request.InstructionSet.AgentAddress = fmt.Sprintf("%s:%d", *as.Option.Host, *as.Option.Port)
  
  	statsChan := createStatsChanByInstructionSet(request.InstructionSet)
  
  	defer deleteStatsChanByInstructionSet(request.InstructionSet)
  
  	return as.executeCommand(stream, request, dir, statsChan)
  
  }
docs: // Execute executes a request and stream stdout and stderr back