Let's make a clean starter directory:
# mkdir test
# cd test
# aea fetch open_aea/my_first_aea:0.1.0:bafybeibnjfr3sdg57ggyxbcfkh42yqkj6a3gftp55l26aaw2z2jvvc3tny --remote
Adding protocol 'fetchai/state_update:1.0.0:bafybeihaknve6slfpsml5bz62xqwxcpv3u7bqaskuataehsrgygoeiucqe'...
...
Successfully added skill 'fetchai/echo:0.19.0'.
Agent my_first_aea successfully fetched.
# tree -d
.
└── my_first_aea
├── aea-config.yaml
└── vendor
├── fetchai
│ ├── connections
│ ├── protocols
│ └── skills
└── open_aea
└── protocols
So what was the AEA directory
in our case? Was it test
? let's leave this here for a second.
from the test
folder, let's create an agent manually:
# autonomy create jarvis_agent --remote --empty
Initializing AEA project 'jarvis_agent'
Creating project directory './jarvis_agent'
Creating config file aea-config.yaml
# ls
jarvis_agent my_first_aea
Now we have two agents in test
folder, one fetched remotely and one from scratch locally.
Let's dig further into semantics:
# cd jarvis_agent
# ls
aea-config.yaml connections contracts protocols skills vendor
What exactly are "packages" ?
-
So the local agent folder contains
aea-config.yaml
and packages likeconnections, contracts, protocols, skills
.- But they're not supposed to be placed together as per open-autonomy/tree/main/packages/valory
-
I say they're "packages" because that's what the docs say (search for "can be added as packages" at https://open-aea.docs.autonolas.tech/core-components-1/).
-
If connections, contracts, protocols, skills are what's referred to as "packages", then what are "valory" and "open_aea" if not the actual "package" under a folder called "packages" ? ref: https://github.com/valory-xyz/open-autonomy/tree/main/packages
-
And
test/my_first_aea
containsaea-config.yaml
and avendor
folder.- According to official agents template as noted from these docs, this "agent" is probably supposed to go in as a "package" within an
AEA directory
- this could also be inferred from the structure at open-autonomy/tree/main/packages/valory
- Does that mean "agent" is also a "package" afterall?
- According to official agents template as noted from these docs, this "agent" is probably supposed to go in as a "package" within an
Let's dig further into semantics:
# aea scaffold --with-symlinks skill notes_app
Adding skill scaffold 'notes_app' to the agent 'jarvis_agent'...
Fingerprinting skill components of 'arcolife/notes_app:0.1.0' ...
Adding symlinks from vendor to non-vendor and packages to vendor folders.
- a new
packages
symlink is created inside an "agent" (jarvis_agent
) which is later supposed to be inside a folder containing all packages?
Let's dig further into semantics.
From jarvis_agent
folder, let's fetch a connection type package remotely:
# aea add connection valory/http_client:0.1.0:bafybeicmoolrrjnt5qn7jbwon7a3b5noe6hkj7kbjj57xtfosoygkckhuy --remote
Adding connection 'valory/http_client:0.1.0:bafybeicmoolrrjnt5qn7jbwon7a3b5noe6hkj7kbjj57xtfosoygkckhuy'...
Adding protocol 'valory/http:1.0.0:bafybeienmids6f5pcey2bnywmiup2faawqgmdhhz65qfciuhkntugztvpi'...
Successfully added protocol 'valory/http:1.0.0'.
Successfully added connection 'valory/http_client:0.1.0'.
Looking at the structure:
# tree -d
.
├── connections
├── contracts
├── packages -> vendor
├── protocols
├── skills
│ └── notes_app
└── vendor
├── arcolife
│ └── skills
│ └── notes_app -> ../../../skills/notes_app
└── valory
├── connections
│ └── http_client
└── protocols
└── http
- Aren't I supposed to not touch
vendor
folder? - Due to the flow of commands thus far, it has created a
packages
symlink forcing me to thereby edit my new skillnotes_app
as a "vendor" insidetest/jarvis_agent/packages/arcolife/skills/notes_app
which is actuallytest/jarvis_agent/vendor/arcolife/skills/notes_app
?