Currently need to copy an agent first before assembling it, otherwise the AST cannot be changed without crashing.