You’re looking at mismatched versions here between the tutorial, the docs, and your installed version. It looks like the tutorial is using v5, which matches what you currently have installed. But you’re looking at the docs for v6. Use the dropdown on the bottom left of the docs to pick the version you’re using — it might be: https://juliadynamics.github.io/Agents.jl/v5.17/tutorial/.
I guess saying it supports “any” declaration is probably not an accurate statement, as it doesn’t apply to mutable. Because it is already added by de facto. All @agent created types are mutable already, so you are trying to add an extra mutable and that doesn’t work. This should clarified in the docs (if it isn’t already?).
as for your first question, we allowed (internally) the first version you posted to work for backwards compatibility. It is not supported in any official sense and may be removed in future versions without any warning.
@martin_sanchez this post here and the one you just opened about DynamicalSystems.jl are pretty much the same problem: attempting to use too old versions that use InteractiveDynamics.jl. Can I ask, where did you find the advice to use this? Probably some outdated tutorial that exists somewhere and needs to be deleted.
Videos cannot be updated to newer versions. My advice would be to not use videos to learn code. At least, not for the packages of JuliaDynamics. The documentation is as good as it can possible get, and always up to date. Start there!