> ## Documentation Index
> Fetch the complete documentation index at: https://trytilde.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Foundry

> Foundry is where you model your business data for agents and people: ontologies turn it into typed objects, reads, and actions, used by agents and spaces under one set of Cedar policies.

**Foundry** is the part of Tilde Cloud where you build on your business data. At its core is the **ontology**: a typed model of your business, defined in TypeScript. It joins the data from your systems into **objects**, such as customers and invoices, and exposes **reads** and **actions** over them. Agents call those reads and actions as tools. People use them through spaces. [Cedar policies](https://trytilde.ai/docs/foundry/policies.md) in the same project decide who may do what.

## When to use Foundry

Use Foundry when agents need to read or change business data that lives in several systems, and people need to see and control what they do. Instead of holding database credentials or calling ten APIs, the agent sees a small set of typed tools, such as `customerOverview` or `creditCustomer`, and each call is checked against your policies.

![Your data flows through models and objects into reads and actions, which agents and people call under Cedar policies](https://mintcdn.com/tilde/noABCI5GacloWlZz/images/foundry-overview.drawio.svg?fit=max\&auto=format\&n=noABCI5GacloWlZz\&q=85\&s=e3f2835cf9dfc2690b9b7f0466945ff0)

&#x20;*Click to zoom*

* **Agents** get every read and action as a tool through the **Tilde Foundry** tool provider. See [Give an agent the ontology](https://trytilde.ai/docs/foundry/deploying.md#give-an-agent-the-ontology).
* **People** open [spaces](https://trytilde.ai/docs/foundry/spaces.md) in **Live**, which call the same reads and actions.
* **Policies** see both the person and the agent acting for them. An agent never does more than the person it serves.

## The building blocks

* **Pipelines and models** bring raw records in and shape them with SQL. See [Sources and models](https://trytilde.ai/docs/foundry/sources-and-models.md).
* **Objects and links** are the typed nouns and their relationships. See [Objects and links](https://trytilde.ai/docs/foundry/objects-and-links.md).
* **Views, reads, and actions** are the typed handlers that agents and spaces call. See [Views and actions](https://trytilde.ai/docs/foundry/views-and-actions.md).
* **Policies** are Cedar rules that decide every call. See [Policies](https://trytilde.ai/docs/foundry/policies.md).
* **Spaces** are React pages fed only by the ontology. See [Spaces](https://trytilde.ai/docs/foundry/spaces.md).
* **Projects and environments** are the repository you deploy, and where it runs. See [Deploy and environments](https://trytilde.ai/docs/foundry/deploying.md).

## Where an ontology lives

An ontology is a folder in `ontologies/` of a [Tilde project](https://trytilde.ai/docs/project/overview.md), such as `ontologies/crm/`, with its spaces in `ontologies/crm/spaces/`. You write it in TypeScript with `@trytilde/ontology`. `ontology.ts` default-exports `ontology({ ... })`, which lists the objects, views, reads, actions, pipelines, connections, and policies. [The ontology](https://trytilde.ai/docs/project/ontology.md) walks through a complete one.

Foundry runs only on Tilde Cloud. `tilde deploy` builds them on your machine or in CI, and Tilde Cloud deploys what it uploads. See [Deploy and environments](https://trytilde.ai/docs/foundry/deploying.md).

## Next steps

> [card] [Create your first project](https://trytilde.ai/docs/project/overview.md)
>
> Build, deploy, and connect an ontology, a space, and an agent.

> [card] [Sources and models](https://trytilde.ai/docs/foundry/sources-and-models.md)
>
> Bring data in, and shape it with SQL.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.