Bird
Raised Fist0
Agentic AIml~10 mins

Agent-to-agent communication standards in Agentic AI - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to define a basic message format for agent communication.

Agentic AI
message = {"sender": "AgentA", "receiver": "AgentB", "content": [1]
Drag options to blanks, or click blank then click option'
ATrue
B"Hello, AgentB!"
C12345
DNone
Attempts:
3 left
💡 Hint
Common Mistakes
Using a number or boolean instead of a string for message content.
2fill in blank
medium

Complete the code to send a message using a standard send function.

Agentic AI
def send_message(agent, message):
    agent.[1](message)
Drag options to blanks, or click blank then click option'
Asend
Breceive
Cprocess
Dstore
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'receive' instead of 'send'.
3fill in blank
hard

Fix the error in the message parsing code to extract the sender correctly.

Agentic AI
def parse_message(msg):
    sender = msg[[1]]
    return sender
Drag options to blanks, or click blank then click option'
A"sender"
B0
C1
D'receiver'
Attempts:
3 left
💡 Hint
Common Mistakes
Using numeric index instead of key string.
4fill in blank
hard

Fill both blanks to create a filter that selects messages sent by 'AgentX' and containing 'urgent'.

Agentic AI
filtered = [msg for msg in messages if msg[[1]] == 'AgentX' and 'urgent' [2] msg["content"]]
Drag options to blanks, or click blank then click option'
A"sender"
Bin
Cnot in
D"receiver"
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'not in' instead of 'in' for substring check.
Using wrong keys like 'receiver'.
5fill in blank
hard

Fill all three blanks to build a dictionary comprehension mapping agent names to their last received message content.

Agentic AI
last_messages = {agent: messages[-1][[1]] for agent, messages in [2].items() if messages and messages[-1][[3]] == agent}
Drag options to blanks, or click blank then click option'
A"content"
Binbox
C"receiver"
D"sender"
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'sender' instead of 'receiver' for the check.
Using wrong dictionary name instead of 'inbox'.