from llama_index.core.tools import FunctionTool
from llama_index.llms.openai import OpenAI
from llama_index.core.agent.workflow import ReActAgent, FunctionAgent
from llama_index.llms.nebius import NebiusLLM
# define sample Tool
def multiply(a: int, b: int) -> int:
"""Multiply two integers and returns the result integer"""
return a * b
llm = NebiusLLM(
model="Qwen/Qwen3-30B-A3B",
api_key=os.getenv("NEBIUS_API_KEY")
)
# initialize agent
agent = FunctionAgent(
tools=[multiply],
system_prompt="You are an agent that can invoke a tool for multiplication when assisting a user.",
)