ToolCallingAgent
, CodeAgent
, or a custom interface you build),Agency Level | Description | Example Pattern |
---|---|---|
★☆☆ (Low) | LLM output is used for simple decisions (like routing). | if llm_decision(): path_a() else: path_b() |
★★☆ (Medium) | LLM decides which tool/function to call and its arguments. | tool_name, args = llm_parse_output(); tool_name(args) |
★★★ (High) | LLM controls the entire multi-step loop and orchestrates calls. | while llm_should_continue(): execute_next_step() |
execute
method that takes in a Message
and returns a Message
:
Message
is defined as:
Note: This is the bare-bones of an Agent Interface. However, when we refer to Agents, we mean the entire system which also includes tools, memory, runtime and clients.
ToolCallingAgent
– Focuses on calling external functions (tools) to solve tasks.CodeAgent
– Lets the LLM “write” Python code that is then executed, offering a powerful and flexible approach for certain use-cases.CharacterAgent
shows how to craft an agent with a distinct persona (like a Discord bot with a particular style).
CodeAgent
with a web search tool, run it via the runtime, and communicate with a simple input/output client.
CodeAgent
can “write” code to perform tasks.DuckDuckGoSearchTool
provides a web search capability.SimpleMessageClient
supplies the user’s query and will receive the final answer.AgentRuntime
ties it all together, feeding data between the user, agent, and output.