Lesson 4: Agent projects
By the end of this lesson:
You will know the basics of an agent project's file structure and how to configure an agent to behave exactly how you would like it to.
Agents are modular
Recall from Lesson 2 that agents are created from components of varying types, for example, skills, protocols, connections, ...
Agent project structure¶
Any agent project has a predefined file structure. Below you can see this for a typical agent project along with a brief description of the most important files/directories:
aea_name                        
├── aea-config.yaml             AEA configuration
├── fetchai_private_key.txt     Agent's private key
├── connections                 Directory containing every connection developed by the agent's author.
│   └── connection_1            Connection 1
│   └── ...                     ...
├── protocols                   Directory containing every protocols developed by the agent's author.
│   └── protocol_1              Protocol 1
│   └── ...                     ...
├── skills                      Directory containing every skills developed by the agent's author.
│   └── skill_1                 Skill 1
│   └── ...                     ...
└── vendor                      Directory containing components added from the registry (sorted by author).
    └── author_1                Components by author 1
        ├── connections         Connections by author 1
        ├── protocols           Protocols by author 1
        └── skills              Skills by author 1
In a general AEA project:
The top level directory has the agent's name. Below that:
- aea-config.yaml: Agent's configuration file
- File(s) containing the private key(s) of the agent (fetchai_private_key.txtin the above example)
- Directories (e.g. connections,protocols,skills, ...) containing the components developed by the agent's author
- vendorcontaining the components (e.g. connections, protocols, skills, ...) added from the registry, sorted by author.
- .build/containing build artefacts
- .certs/containing certificates
New directories
You can create new directories where necessary but the core structure must remain the same.
Exercise
Browse the directories and files of the hello_world agent you ran in the last lesson and compare it with the above structure.  
AEA Configuration¶
The aea-config.yaml file is where an AEA can be configured to behave differently.
Configure the hello_world agent
Let's configure the hello_world agent to print another message on display. Under hello_world, open aea-config.yaml and change the value of message to something else. Then run the agent: aea run
You should now see your new message printed on the screen.