Skip to content

Utilities

Tools

calculator

Evaluate math expressions, solve equations, and perform calculus operations with symbolic support

Environment variables

VariableRequiredDefaultDescription
CALCULATOR_MODEoptionalevaluateDefault calculator mode
CALCULATOR_PRECISIONoptional10Decimal precision
CALCULATOR_SCIENTIFICoptionalFalseUse scientific notation by default
CALCULATOR_FORCE_NUMERICoptionalFalseForce numeric evaluation
CALCULATOR_FORCE_SCIENTIFIC_THRESHOLDoptional1e21When to switch to scientific notation
CALCULATOR_DERIVE_ORDERoptional1Default derivative order
CALCULATOR_SERIES_POINToptional0Default series expansion point
CALCULATOR_SERIES_ORDERoptional5Default series order

current_time

Return the current date and time with optional timezone — useful for scheduling and time-sensitive tasks

Environment variables

VariableRequiredDefaultDescription
DEFAULT_TIMEZONEoptionalUTCTimezone used by current_time

load_tool

Dynamically import and register tools from Python files at runtime without restarting the agent

Environment variables

VariableRequiredDefaultDescription
ELSAI_DISABLE_LOAD_TOOLoptionalunsetSet to true to turn off the load_tool runtime loader

sleep

Pause the agent for a specified duration; respects interrupts so long waits can be cancelled

Environment variables

VariableRequiredDefaultDescription
MAX_SLEEP_SECONDSoptional300Longest allowed sleep duration (seconds)

stop

Force-stop the agent event loop immediately, ending the current run

Environment variables

No dedicated environment variables.

Examples

Requires OPENAI_API_KEY.

bash
pip install --extra-index-url https://elsai-agents.elsai.ai/root/ elsai-agents==0.3.1
pip install --extra-index-url https://core-packages.elsai.ai/root/ "elsai-model[openai]==2.1.0"
pip install --extra-index-url https://elsai-agents.elsai.ai/root/ elsai-agents-tools==0.3.0
python
import os

from elsai import Agent
from elsai.agent import AgentConfig
from elsai_model.openai import OpenAIModel
from elsai_tools.calculator import calculator
from elsai_tools.current_time import current_time

agent = Agent(
    model=OpenAIModel(
        model_id="gpt-4o-mini",
        client_args={"api_key": os.environ["OPENAI_API_KEY"]},
    ),
    tools=[calculator, current_time],
    system_prompt=(
        "Use calculator for math and current_time for dates. "
        "After using tools, answer the user clearly in plain text."
    ),
    config=AgentConfig(name="utility_assistant"),
)

result = agent("What is 17 * 28, and what is the current UTC date?")
print(result)

Parameter reference: Utilities API.

API reference

See Utilities API for parameters and import paths.

See also

Copyright © 2026 elsai foundry.