Skip to content

Conversation

@Peilin-FF
Copy link

Description

Conghui He and Weijia Li's team from the Shanghai AI Laboratory introduced the Earth-Agent framework in the paper titled "Earth-Agent: Unlocking the Full Landscape of Earth Observation with Agents" (https://arxiv.org/pdf/2509.23141). This paper introduces the first Agent framework for the Earth Observation domain and has developed over 100 Earth Science-specific tools based on the MCP. We have defined these tools according to Camel's MCP specification and integrated them into the Camel repository, which is well-known within the community. We hope to enhance the Camel tool system and foster the development of Earth-Agent within the Camel community :)

This issue Link: Issues

Checklist

Go over all the following points, and put an x in all the boxes that apply.

  • I have read the CONTRIBUTION guide (required)
  • I have linked this PR to an issue using the Development section on the right sidebar or by adding Fixes #issue-number in the PR description (required)
  • [] I have checked if any dependencies need to be added or updated in pyproject.toml and uv lock
  • I have updated the tests accordingly (required for a bug fix or a new feature)
  • [] I have updated the documentation if needed:
  • [] I have added examples if this is a new feature

If you are unsure about any of these, don't hesitate to ask. We are here to help!

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 29, 2025

Important

Review skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Wendong-Fan
Copy link
Member

thanks @Peilin-FF for the PR!

@Wendong-Fan Wendong-Fan added this to the Sprint 41 milestone Nov 2, 2025
@Saedbhati
Copy link
Collaborator

Saedbhati commented Nov 3, 2025

@Peilin-FF I noticed that you have also released the Earth-Bench benchmark. It would be great if we could include this benchmark in our Camel AI benchmarks folder. Thanks

Comment on lines +48 to +57
Returns:
str: Path to the saved NDVI file.
"""
with rasterio.open(input_nir_path) as nir_src:
nir_band = nir_src.read(1)
nir_profile = nir_src.profile
with rasterio.open(input_red_path) as red_src:
red_band = red_src.read(1)
nir_band = np.array(nir_band, dtype=np.float32)
red_band = np.array(red_band, dtype=np.float32)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To prevent errors when agent provide non-existent file paths, it would be beneficial to add validation checks for the input paths before processing.

Comment on lines +205 to +207
blue_band = np.array(blue_band, dtype=np.float32)
denominator = nir_band + C1 * red_band - C2 * blue_band + L + 1e-06
evi = G * (nir_band - red_band) / denominator
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
blue_band = np.array(blue_band, dtype=np.float32)
denominator = nir_band + C1 * red_band - C2 * blue_band + L + 1e-06
evi = G * (nir_band - red_band) / denominator
blue_band = np.array(blue_band, dtype=np.float32)
denominator = nir_band + (C1 * red_band) - (C2 * blue_band) + L + 1e-06
evi = G * (nir_band - red_band) / denominator

Copy link
Collaborator

@fengju0213 fengju0213 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for this amazing pr! left some comments below

"""A class representing a toolkit for earth obseravation science.

This class provides 104 basic methods for earth observation problem solutions which can be divided into
Index(12 functions), Inversion(18 functions), Perception(15 functions), Analysis(10 functions), and Statistics(49 functions).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since you already classified these tools ,could we add a parameter during the init process to determine which functions are returned in categories during get_tools? Adding around 100 function at once might incur some performance penalty, but as a professional, you can help us identify and categorize these specialized functions.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean that returning 100 tools with get_tools would cause a performance loss, so you would like to add a parameter to return functions from a specific category? For example, if the input parameter is an index, it would only return 12 functions from category index?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes,exactly

dst.write(ndvi.astype(rasterio.float32), 1)
return f'Result save at {TEMP_DIR / output_path}'

def calculate_batch_ndvi(self, input_nir_paths: list[str],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We typically use the following method to write docstrings. use 'r' at the beginning of the line, and then write...

image


@MCPServer()
class EarthScienceToolkit(BaseToolkit):
"""A class representing a toolkit for earth obseravation science.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"""A class representing a toolkit for earth obseravation science.
r"""A class representing a toolkit for earth obseravation science.

@fengju0213
Copy link
Collaborator

@Peilin-FF could you alse add some example to show how to use this awesome toolkit? maybe you can demonstrate different function combinations to suit different scenarios.

@Peilin-FF
Copy link
Author

@Peilin-FF I noticed that you have also released the Earth-Bench benchmark. It would be great if we could include this benchmark in our Camel AI benchmarks folder. Thanks

Ok,are there any guidelines for adding benchmarks?

@Peilin-FF
Copy link
Author

@Peilin-FF could you alse add some example to show how to use this awesome toolkit? maybe you can demonstrate different function combinations to suit different scenarios.

Sure, I will update it for you soon :)

@Saedbhati Saedbhati added Waiting for Update PR has been reviewed, need to be updated based on review comment and removed Review Required PR need to be reviewed labels Nov 3, 2025
Copy link
Collaborator

@waleedalzarooni waleedalzarooni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @Peilin-FF awesome contribution!

Just a few comments from me, bulk of the work is done to a great standard so well done!

from scipy.stats import linregress
from scipy.stats import norm
import matplotlib.cm as cm
TEMP_DIR = Path('/tmp/earth_science')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The path /tmp/earth_science is a Unix/Linux/macOS-specific path. Windows doesn't have a /tmp directory by default.

Recommendation: Use tempfile.mkdtemp() or make it configurable:

import tempfile
TEMP_DIR = Path(os.getenv('EARTH_SCIENCE_TEMP_DIR', tempfile.gettempdir()))
 / 'earth_science'

@@ -0,0 +1,4508 @@
import warnings
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We also typically include test and example files for newly added toolkits, reference Contributing.MD to see what supplementary files are added when toolkits are created!

Index(12 functions), Inversion(18 functions), Perception(15 functions), Analysis(10 functions), and Statistics(49 functions).
"""

def calculate_ndvi(self, input_nir_path, input_red_path, output_path):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some methods have type hints, some don't at the moment. Would be great if you could include complete type hints for all methods to maintain quality in the codebase.

@fengju0213
Copy link
Collaborator

fengju0213 commented Nov 4, 2025

@Peilin-FF I noticed that you have also released the Earth-Bench benchmark. It would be great if we could include this benchmark in our Camel AI benchmarks folder. Thanks

Ok,are there any guidelines for adding benchmarks?

@Peilin-FF I noticed that you have also released the Earth-Bench benchmark. It would be great if we could include this benchmark in our Camel AI benchmarks folder. Thanks

Ok,are there any guidelines for adding benchmarks?

@Peilin-FF for benchmark you can refer to this pr #2293
and for now you can just focus on this pr ,after this finished ,if you still have the will,free feel to add the benchmark!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Waiting for Update PR has been reviewed, need to be updated based on review comment

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

[Feature Request] Add 100+ Earth Science Tools to enhance the Camel tool system

5 participants