# Introduction

<div align="center"><img src="https://385940188-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MW6A6E0L1zra4m3voL_%2Fsync%2F1aa23e12013ce5b3e26a41208016c078ffac28ad.png?generation=1616695021634698&#x26;alt=media" alt="Foundry" width="400"></div>

**Foundry-ML** is a Python library that simplifies access to machine learning-ready datasets in materials science and chemistry.

## Features

* **Search & Discover** - Find datasets by keyword or browse the catalog
* **Rich Metadata** - Understand datasets before downloading with detailed schemas
* **Easy Loading** - Get data in Python, PyTorch, or TensorFlow format
* **Automatic Caching** - Fast subsequent access after first download
* **Publishing** - Share your own datasets with the community
* **AI Integration** - MCP server for AI assistant access
* **CLI** - Terminal-based workflows

## Quick Example

```python
from foundry import Foundry

# Connect
f = Foundry()

# Search for datasets
results = f.search("band gap", limit=5)

# Load a dataset
dataset = results.iloc[0].FoundryDataset
X, y = dataset.get_as_dict()['train']

# Get citation for your paper
print(dataset.get_citation())
```

## Installation

```bash
pip install foundry-ml
```

For cloud environments (Colab, remote Jupyter):

```python
f = Foundry(no_browser=True, no_local_server=True)
```

## What's Next?

| <p><strong>Getting Started</strong></p><ul><li><a href="installation">Installation</a></li><li><a href="quickstart">Quick Start</a></li></ul> | <p><strong>User Guide</strong></p><ul><li><a href="../user-guide/searching">Searching</a></li><li><a href="../user-guide/loading-data">Loading Data</a></li><li><a href="../user-guide/ml-frameworks">ML Frameworks</a></li></ul> | <p><strong>Features</strong></p><ul><li><a href="../features/cli">CLI</a></li><li><a href="../features/mcp-server">MCP Server</a></li><li><a href="../features/huggingface">HuggingFace</a></li></ul> |
| --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

## Project Support

This work was supported by the National Science Foundation under NSF Award Number: 1931306 "Collaborative Research: Framework: Machine Learning Materials Innovation Infrastructure".

Foundry brings together components from:

* [Materials Data Facility (MDF)](https://materialsdatafacility.org)
* [Data and Learning Hub for Science (DLHub)](https://www.dlhub.org)
* [MAST-ML](https://mastmldocs.readthedocs.io/)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ai-materials-and-chemistry.gitbook.io/foundry/getting-started/readme.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
