Strictly, you are agile by adhering to the agile manifesto. In practice, a code-base isn't agile enabled unless it has good test coverage. You can do TDD and write the tests before/during the development of functionality or write tests for the functionality after it's developed. It's usually easier and more effective to do it the TDD way though.