# Programmatische Nutzung

> Foundry lässt sich über den Haupteinstiegspunkt direkt programmatisch importieren und nutzen:

Source: https://bifrost5.com/de/foundry/docs/programmatic/

# Programmatische Nutzung

Information

Use the AI tool you already pay for as a Foundry worker, through an MCP bridge, with Production-Grade.

[See editions](/de/foundry/docs/editions)

Foundry lässt sich über den Haupteinstiegspunkt direkt programmatisch importieren und nutzen:

```
import {
  controlLoop,
  loadState,
  enqueueTask,
  createQueue,
  type Task,
} from './index';
```

## Systemgrenzen & Vorgaben

- **Volle Kontrolle beim Operator**: Ausschließlich der Operator definiert Ziele und Aufgaben.

- **Deterministische Ausführung**: Feste, klar definierte Regelschleife.

- **Dauerhafte Zustandsspeicherung**: Jeder Einzelschritt wird persistent gespeichert.

- **Sandbox-Isolation**: Jedes Projekt läuft strikt isoliert im eigenen Verzeichnis.

- **Lückenlose Nachvollziehbarkeit**: Sämtliche Entscheidungen werden protokolliert.

## Werkzeuge für Diagnose & Analyse

```
# Check provider status and circuit breakers
npx ts-node scripts/investigations/provider-health.ts

# Inspect task queue and blocked tasks
npx ts-node scripts/investigations/task-queue-inspect.ts

# Analyze execution logs and error patterns
npx ts-node scripts/investigations/log-analyzer.ts --summary
```
