MapAgent is ahierarchical multi-agent plug-and-play framework with customized toolsets and agentic scaffolds for map-integrated geospatial reasoning.
Install all required python dependencies (generated by pipreqs):
aiohttp==3.9.5
aiosignal==1.3.1
annotated-types==0.7.0
anyio==3.7.1
async-timeout==4.0.3
attrs==23.2.0
azure-core==1.31.0
azure-identity==1.18.0
beautifulsoup4==4.12.3
bs4==0.0.1
certifi==2024.6.2
cffi==1.17.1
charset-normalizer==3.3.2
cryptography==43.0.1
dataclasses-json==0.6.7
datasets==3.4.1
dill==0.3.8
diskcache==5.6.3
distro==1.9.0
dotenv==0.9.9
easyocr==1.7.1
exceptiongroup==1.2.1
filelock==3.15.3
frozenlist==1.4.1
fsspec==2024.6.0
func-timeout==4.3.5
fuzzywuzzy==0.18.0
googlemaps==4.10.0
h11==0.14.0
hf-xet==1.1.0
httpcore==1.0.5
httpx==0.27.0
huggingface-hub==0.31.1
idna==3.7
imageio==2.34.1
Jinja2==3.1.4
jiter==0.5.0
jsonpatch==1.33
jsonpointer==3.0.0
langchain==0.2.6
langchain-community==0.2.6
langchain-core==0.3.6
langchain-openai==0.2.0
langchain-text-splitters==0.2.4
langsmith==0.1.128
lazy_loader==0.4
MarkupSafe==2.1.5
marshmallow==3.22.0
mpmath==1.3.0
msal==1.31.0
msal-extensions==1.2.0
multidict==6.0.5
multiprocess==0.70.16
mypy-extensions==1.0.0
networkx==3.2.1
ninja==1.11.1.1
numexpr==2.8.7
numpy==1.26.4
openai==1.48.0
opencv-python-headless==4.5.4.60
orjson==3.10.7
packaging==24.1
pandas==2.2.2
pillow==10.3.0
platformdirs==4.3.7
portalocker==2.10.1
pyarrow==19.0.1
pyclipper==1.3.0.post5
pycparser==2.22
pydantic==2.7.4
pydantic_core==2.18.4
PyJWT==2.9.0
python-bidi==0.4.2
python-dateutil==2.9.0.post0
python-dotenv==1.1.0
pytz==2024.1
PyYAML==6.0.1
regex==2024.9.11
requests==2.32.3
safetensors==0.5.3
scikit-image==0.24.0
scipy==1.13.1
shapely==2.0.4
six==1.16.0
sniffio==1.3.1
soupsieve==2.6
SQLAlchemy==2.0.34
sympy==1.12.1
tenacity==8.5.0
tifffile==2024.6.18
tiktoken==0.7.0
tokenizers==0.21.1
torch==2.3.1
torchvision==0.18.1
tqdm==4.66.4
transformers==4.51.3
typing-inspect==0.9.0
typing_extensions==4.12.2
tzdata==2024.1
urllib3==1.26.19
xxhash==3.5.0
yarl==1.9.4
Install all required python dependencies (you can skip this step if you have set up the dependencies before and the versions are not strictly required):
pip install -r requirements.txt
Obtain your OpenAI API key from: https://platform.openai.com/account/api-keys.
To use OpenAI API key for Chameleon, you NEED to have billing set up (AKA paid account).
You can set up paid account at https://platform.openai.com/account/billing/overview.
Obtain your Google Map API key from: https://developers.google.com/maps/get-started.
To run MapAgent (GPT-4):
cd src
python run.py \
--policy_engine gpt-4 \
--kr_engine gpt-4 \
--qg_engine gpt-4 \
--sg_engine gpt-4 \
--test_split test \
--test_number -1 \
--data_root '../datasets_dir/txt_data/trip' \
--output_root '../new'- Construct the module inventory: Create prompts for LLM-based models within the
demosdirectory. Define the input, execution, and output for each module inmodel.py. - Develop the LLM planner: Provide a comprehensive description of the module inventory and include a few examples that demonstrate how to map queries to the target program.
- Implement the data loader and evaluation method: Define the data loader within
model.py. To modify the evaluation method, update the corresponding section inmain.py. - Enjoy the process: With the groundwork in place, it's time to have fun and dive into the task at hand!
If you find MapAgent useful for your research and applications, please kindly cite using this BibTeX:
@inproceedings{
hasan2026mapagent,
title={MapAgent: A Hierarchical Agent for Geospatial Reasoning with Dynamic Map Tool Integration},
author={Md Hasebul Hasan and Mahir Labib Dihan and Tanzima Hashem and Mohammed Eunus Ali and Md Rizwan Parvez},
booktitle={19th Conference of the European Chapter of the Association for Computational Linguistics},
year={2026},
url={https://openreview.net/forum?id=MJPWd96rrv}
}