1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

[Fetch.ai]AEAのQuickStartをやってみた

Posted at

[Fetch.ai]AEAのQuickStartをやってみた

AEAs とは Autonomous Economic Agents (AEAs)の略 = 自律型エージェント

aea をインストール

System Requirements を確認すること。

fetchai_aea_agent direcotory を作成して、aea をインストールする。

mkdir fetchai_aea_agent
cd fetchai_aea_agent
pipenv install 'aea[all]'
pipenv shell
aea init
(fetchai_aea_agent) ➜  fetchai_aea_agent git:(develop) ✗ aea init
Please enter the author handle you would like to use: 
Do you have a Registry account? [y/N]: 
Create a new account on the Registry now:
Email: 
Password: 
Please make sure that passwords are equal.
Confirm password: 
Do you want to subscribe for developer news? [y/N]: y
Please visit `https://aea-registry.fetch.ai/mailing-list` to subscribe for developer news
Successfully registered and logged in:
    _     _____     _    
   / \   | ____|   / \   
  / _ \  |  _|    / _ \  
 / ___ \ | |___  / ___ \ 
/_/   \_\|_____|/_/   \_\
                         
v0.10.1

AEA configurations successfully initialized: {'author': ''}
(fetchai_aea_agent) ➜  fetchai_aea_agent git:(develop) ✗ 

agent の作成

aea create aea_agent
cd aea_agent

directory 構造は以下に記載がある

Skill

Skill については以下に記載がある

Skill や Protocol は以下から探せる

Echo skill を追加

aea add skill fetchai/echo:0.14.0
aea add protocol fetchai/default:0.12.0

AEA を実行

aea run

AEA へメッセージ送信

まず、別のTerminalで同一Directoryに移動する

aea interact

でinteractive tool を実行する

そのコマンドが実行されているところで、以下のコマンドを実行する。

echo 'recipient_aea,sender_aea,fetchai/default:0.12.0,\x08\x01\x12\x011*\x07\n\x05hello,' >> input_file

AEA側でメッセージが受信できている。

info: [aea_agent] Echo Behaviour: act method called.
info: [aea_agent] Echo Handler: message=Message(sender=aea_agent_interact,to=aea_agent,content=b"echo 'recipient_aea,sender_aea,fetchai/default:0.12.0,\x08\x01\x12\x011*\x07\n\x05helloworld,' >> input_file",dialogue_reference=('e1be93a7101d01683dfb323606b341c49b4138512ca406791eccfffbc9733b68', ''),message_id=1,performative=bytes,target=0), sender=aea_agent_interact

ref.

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?