Tools#
EngiAI provides a comprehensive set of tools that agents use to complete tasks. All tools are LangChain @tool decorated functions that agents call automatically based on user requests.
ArXiv Tools#
Search and analyze academic papers.
search_arxiv#
Search for papers on arXiv.
from src.tools import search_arxiv
results = search_arxiv.invoke({"query": "topology optimization", "max_results": 5})
get_arxiv_paper#
Retrieve paper details by arXiv ID.
from src.tools import get_arxiv_paper
paper = get_arxiv_paper.invoke({"arxiv_id": "2301.12345"})
Additional tools (created via factory with MMORE client):
download_and_analyze_paper— Download PDF and index in MMOREask_about_papers— Query indexed papers via RAGlist_analyzed_papers— List all indexed papers
RAG Tools#
Retrieve information from your knowledge base using MMORE.
MMOREClient#
The MMORE client provides direct access to the document retrieval service:
from src.tools import MMOREClient
mmore = MMOREClient()
results = mmore.retrieve(query="What is topology optimization?", max_matches=5)
RAG tool functions (created via factory)#
from src.tools import create_rag_tools, MMOREClient
mmore = MMOREClient()
tools = create_rag_tools(mmore)
# Returns: [search_documents, add_document, add_url_to_knowledge_base,
# list_documents, delete_document]
HPC Tools#
Interact with high-performance computing clusters via SSH/SLURM.
submit_slurm_job#
Submit a SLURM job script to the cluster.
from src.tools.hpc import submit_slurm_job
result = submit_slurm_job.invoke(
{
"slurm_file": "#!/bin/bash\n#SBATCH --job-name=test\npython train.py",
"host_alias": "euler",
}
)
get_slurm_job_status#
Check the status of a submitted job.
from src.tools.hpc import get_slurm_job_status
status = get_slurm_job_status.invoke({"job_id": "12345"})
Other HPC tools#
test_hpc_connection— Verify SSH connectivitycancel_slurm_job— Cancel a running jobdownload_job_outputs— Retrieve job output files
Job monitoring tools (src/tools/job_monitor.py)#
Polling-based monitors that sit on top of get_slurm_job_status:
monitor_job_until_complete— Poll a job until it finishes (ormax_checksis reached) and optionally auto-download outputscheck_job_status_change— Compare a job’s current state against a cached status and return whether it changedget_active_jobs_summary— Summarize all jobs currently tracked in the in-memory status cache
Engineering Tools#
Optimization and design tools using EngiBench.
Supported problem types:
beams2d: 2D structural topology optimization
photonics2d: 2D photonic device topology optimization
(thermoelastic2d is still registered as a benchmark problem — see
benchmarks/shared/problem_registry.py — but is not supported by these tools,
so an evaluation against it fails at create_problem.)
optimize_design#
Run topology optimization on an EngiBench problem.
from src.tools import optimize_design
result = optimize_design.invoke(
{
"problem_type": "beams2d",
"volfrac": 0.3,
"forcedist": 0.5,
}
)
All EngiBench tools#
create_problem— Initialize a problem instancesimulate_design— Evaluate a design’s objectivesoptimize_design— Run topology optimizationrender_design— Visualize the design as an imageget_problem_details— Get detailed problem descriptionget_dataset_info— Get dataset information
EngiOpt tools#
Tools for working with trained generative models:
download_wandb_model— Download a model from W&Bload_wandb_model— Load a downloaded modelsample_designs_from_model— Generate designs from a trained modelgenerate_training_command— Generate SLURM training scriptsevaluate_model— Evaluate a trained model against baselines
Algorithm registry (src/tools/algorithms.py)#
Single source of truth for supported generative algorithm IDs. Add an entry to SUPPORTED_ALGORITHMS (and to the AlgorithmId Literal) to expose a new algorithm to every EngiOpt tool automatically.
AlgorithmId— Literal type of valid algorithm IDs (currentlycgan_cnn_2d,diffusion_2d_cond)SUPPORTED_ALGORITHMS— Dict of algorithm metadata (class, dimensions, conditional, model type, model file names)ALGORITHM_IDS— List derived fromAlgorithmId, used by the EngiOpt tools for validation
Export Tools#
convert_design_to_stl#
Convert a 2D design to STL format for 3D printing. Uses xeltofab’s marching-cubes extruder, which produces watertight-by-construction meshes with smoother surfaces than the previous voxel-block backend.
from src.tools import convert_design_to_stl
result = convert_design_to_stl.invoke(
{
"npy_file_path": "outputs/design.npy",
"scale_xy": 1.0,
"scale_z": 10.0,
"mirror_y": False,
"threshold": 0.5,
# Optional xeltofab pre-processing:
"smooth_sigma": 0.0, # Gaussian smoothing sigma (0 = off)
"fill_holes": False, # close single-pixel pinholes
"min_component_area": 0, # drop disconnected blobs smaller than this many pixels
}
)
CLI Tools#
execute_cli_command— Run shell commands locallyopen_gui_application— Launch GUI applications (PrusaSlicer, VS Code, etc.)
Search Tools#
create_search_tool()— Factory that returns a provider-neutralweb_searchtool (DuckDuckGo by default; Tavily optional)
Human Input Tools#
Tools that let an agent pause and request clarification from the user.
ask_human_for_clarification#
Used by the engineering agent when a user’s request does not specify required numerical design parameters (e.g., volume fraction, force distance, filter radius). The agent calls this tool instead of guessing defaults; the UI surfaces the question and waits for a reply before any design tool runs.
from src.tools.human_input import ask_human_for_clarification
ask_human_for_clarification.invoke(
{
"clarification_request": (
"What volume fraction should I use for this beam design? "
"Please specify a value between 0.1 and 0.9."
),
}
)