Skip to main content
The Function Calling Agent is the default agent in Lumo. It enables AI models to interact with external tools and APIs by automatically selecting and executing the appropriate functions based on the task at hand. This agent type is designed to handle complex tasks that require multiple steps, external data retrieval, or interactions with third-party services.

When to use the Function Calling Agent

Use the Function Calling Agent when you need to:
  • Perform multi-step tasks that require sequential actions or decision-making
  • Access external data from APIs, databases, or web services
  • Interact with tools like search engines, web browsers, calculators, or custom APIs
  • Handle complex workflows where the AI needs to determine which tools to use and in what order
  • Execute actions that go beyond simple text generation, such as making API calls, processing data, or performing calculations
The agent automatically manages the execution flow, calling tools as needed and using their results to progress toward completing the task.

Passing tools

You can specify which tools the agent has access to by passing a tools array to the run_task method. Each tool in the array should be a string identifier that corresponds to an available tool in your Lumo environment. Common tools include:
  • ExaSearchTool - For web search capabilities
  • VisitWebsite - For browsing and extracting content from web pages
The agent will intelligently select and use these tools based on the task requirements, without you needing to specify the exact sequence of tool calls.

Example

from lumo_sdk import LumoClient, Message, MessageRole

# Initialize the client
client = LumoClient(api_key="your-api-key-here")

response = client.run_task(
    task="What is the weather in Berlin?",
    model="gpt-4.1-nano",
    base_url="https://api.openai.com/v1/chat/completions",
    tools=["ExaSearchTool", "VisitWebsite"],
)