Bird
Raised Fist0
Agentic AIml~10 mins

Agent API design patterns 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 create an agent that uses a single tool.

Agentic AI
agent = Agent(tools=[[1]])
Drag options to blanks, or click blank then click option'
Atools
Btoolset
Ctool_list
Dtool
Attempts:
3 left
💡 Hint
Common Mistakes
Using a variable name that implies multiple tools instead of a single tool.
Passing a string instead of a tool object.
2fill in blank
medium

Complete the code to initialize an agent with a memory component.

Agentic AI
agent = Agent(memory=[1])
Drag options to blanks, or click blank then click option'
Amemory_buffer
BMemoryBuffer()
CMemory
DbufferMemory
Attempts:
3 left
💡 Hint
Common Mistakes
Passing the class name without parentheses.
Passing a variable name that is not an instance.
3fill in blank
hard

Fix the error in the agent's run method call to pass the input correctly.

Agentic AI
result = agent.run([1]="What is the weather today?")
Drag options to blanks, or click blank then click option'
Ainput
Bquery
Cprompt
Dtext
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'query' or 'prompt' which are not accepted parameter names.
Passing the input as a positional argument instead of keyword.
4fill in blank
hard

Fill both blanks to create a tool that wraps a function and add it to the agent.

Agentic AI
tool = Tool(name=[1], func=[2])
agent = Agent(tools=[tool])
Drag options to blanks, or click blank then click option'
A"calculator"
Bcalculate
Dcalc
Attempts:
3 left
💡 Hint
Common Mistakes
Using the function name as a string.
Not quoting the tool name.
5fill in blank
hard

Fill all three blanks to define an agent with tools, memory, and a callback manager.

Agentic AI
agent = Agent(
    tools=[[1]],
    memory=[2],
    callback_manager=[3]
)
Drag options to blanks, or click blank then click option'
Atool
BMemoryBuffer()
CCallbackManager()
Dtools
Attempts:
3 left
💡 Hint
Common Mistakes
Passing tools without a list.
Passing class names instead of instances for memory and callback manager.