agentleFS
datachain-aidatachain-ai/datachain/docs/llms.txt

datachain

llms.txt2.8k starsChanged 2 years agoApache-2.0View on GitHub

DataChain is the Data Context Layer for unstructured data. It chains Python functions and warehouse-speed data operations into composable queries, and every query deposits its result into the Dataset DB as a versioned, typed dataset with automatic lineage. The next query (human or agent) starts from prior conclusions instead of raw bytes. The Compute Engine produces; the Dataset DB recalls; the Knowledge Base compiles datasets into agent-readable knowledge. Access everything through dc.*: dc.read_storage(), dc.Column(), dc.func.*, dc.File, dc.ImageFile, etc. For annotation…

Trending

More talk lately.thin dataabout the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 0 mentionsAug 2026: 0 mentionsSep 2026: 1 mentionOct 2026: 2 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the datachain-ai/datachain repository that our weekly crawl found: only 3 in all, so this is a hint, not a trend. There is no adoption data for this file yet.
  • In this repositoryOne other file it gives its agents.

The file

We split this llms.txt into the rules it gives an agent

6 rules. About 0 are common, 1 is distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Always type Python operation return values -- missing annotations default to str and crash

    line 46
  2. Very specific:

    Always use trailing slash in storage URIs: "s3://bucket/path/"

    line 47
  3. Very specific:

    Use save() before filter() on expensive Python operation output

    line 49
  4. Very specific:

    Use settings(parallel=True) for ML/LLM operations

    line 50
  5. Distinctive:

    Use data-engine operations (filter, mutate, group_by) over Python when possible

    line 51
  6. Very specific:

    Use dc.func.* for SQL-speed analytics: distance, aggregate, window, path, string, conditional

    line 53

≈ “Common” is an estimate: at least 1 in 5 of the 1,484 llms.txt files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
llms.txt
# DataChain

> DataChain is the Data Context Layer for unstructured data. It chains Python functions and warehouse-speed data operations into composable queries, and every query deposits its result into the Dataset DB as a versioned, typed dataset with automatic lineage. The next query (human or agent) starts from prior conclusions instead of raw bytes. The Compute Engine produces; the Dataset DB recalls; the Knowledge Base compiles datasets into agent-readable knowledge.

## Import Convention

```python
import datachain as dc
```

Access everything through `dc.*`: `dc.read_storage()`, `dc.Column()`, `dc.func.*`, `dc.File`, `dc.ImageFile`, etc.

For annotation types: `from datachain import model`
For custom types: `from pydantic import BaseModel`

Never use: `from datachain import File, C, func`

## Key Patterns

### Read data
- `dc.read_storage("s3://bucket/path/", type="image")` -- files from cloud storage
- `dc.read_csv()`, `dc.read_json()`, `dc.read_parquet()` -- structured formats
- `dc.read_database(query, connection_string)` -- SQL databases
- `dc.read_dataset("name")` -- previously saved datasets
- `dc.read_pandas(df)`, `dc.read_hf("dataset")` -- in-memory sources

### Transform data
- `.filter(dc.C("col") > value)` -- SQL-compiled filter (warehouse speed)
- `.mutate(new_col=dc.func.path.file_ext("file.path"))` -- SQL-compiled column derivation
- `.map(result=my_function)` -- Python operation per record (needs `settings(parallel=N)` for perf)
- `.gen(chunks=split_function)` -- expand one record to many
- `.agg(summary=aggregate_fn, partition_by="group_col")` -- group and reduce
- `.merge(other, on="key")` -- join two chains
- `.group_by(count=dc.func.count(), partition_by="col")` -- aggregate analytics

### Save and export
- `.save("dataset_name")` -- versioned, named dataset (PREFERRED terminal operation)
- `.persist()` -- anonymous cache for branching
- `.to_pandas()`, `.to_parquet()`, `.to_csv()`, `.to_json()` -- export formats
- `.to_pytorch(transform=..., tokenizer=...)` -- PyTorch DataLoader
- `.to_storage("s3://output/")` -- write files to storage
- `.to_database("table", "connection_string")` -- write to SQL database

## Critical Rules

1. Always type Python operation return values -- missing annotations default to `str` and crash
2. Always use trailing slash in storage URIs: `"s3://bucket/path/"`
3. Pass `anon=True` for public buckets
4. Use `save()` before `filter()` on expensive Python operation output
5. Use `settings(parallel=True)` for ML/LLM operations
6. Use data-engine operations (filter, mutate, group_by) over Python when possible
7. One output signal per map/gen/agg -- use Pydantic models for multiple fields
8. Use `dc.func.*` for SQL-speed analytics: distance, aggregate, window, path, string, conditional

## Documentation Sections

- Getting Started: /getting-started/
- Core Concepts: /concepts/ (dataset db, datasets, chain, execution model, files and types)
- Guides: /guide/ (reading data, operations, Python operations, exporting, datasets, functions, scaling, best practices)
- API Reference: /references/ (auto-generated from docstrings)
- CLI Reference: /commands/
- Best Practices: /guide/best-practices/

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.