(defconst agda-startProg "Path1/emacsagda")
(autoload 'agda-mode "Path2/agda-mode.el" "Major mode for Agda files" t)
(setq auto-mode-alist (cons '("\\.agda" . agda-mode) auto-mode-alist))
where Path1 is the path to the compiled program (agda/Code, preceded by where it is in your filestructure) and Path2 is the path to the file agda-mode.el in the directory agda. The third lines makes agda be loaded directly if the file ends with .agda. Then insert the code into your standard .emacs-file, and everything should work. (If you have no .emacs file, create a file .emacs in your root-directory). Evaluate this lines or restart Emacs.