With the growing functionality and capability of technology in human-technology interaction, humans are no longer the only autonomous entity. Automated machines increasingly play the role of agentic teammates, and through this process, human agency and machine agency are constructed and negotiated. Previous research on "Computers are Social Actors (CASA)" and self-serving bias suggest that humans might attribute more technology agency and less human agency when the interaction outcome is undesirable, and vice versa. We conducted an experiment to test this proposition by manipulating task outcome of a game co-played by a user and a smartphone app, and found partially contradictory results. Further, user characteristics, sociability in particular, moderated the effect of task outcome on agency attribution, and affected user experience and behavioral intention. Such findings suggest a complex mechanism of agency attribution in human-technology collaboration, which has important implications for emerging socio-ethical and socio-technical concerns surrounding intelligent technology.