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

# Introduction to SLang

> The programming language for defining Sutro backends.

## Overview

SLang is the programming language for defining Sutro backends.

The purpose of SLang is to provide a simple but powerful language to cleanly and intuitively define entire backends, including entities, logic, and security, without being slowed down by boilerplate, complex syntax, or hard-to-follow logical expressions.

The result is a language that makes backend definition easy, avoids the majority of common mistakes, and is intuitive to pick up for humans and AI alike.

<CardGroup cols={2}>
  <Card title="Why a new language?" icon="lightbulb" href="https://withsutro.com/blog/software-is-due-for-its-next-abstraction-layer-cad">
    Read about why backend engineering needs a new software language.
  </Card>

  <Card title="Zero-infra philosophy" icon="book-open" href="https://withsutro.com/blog/the-rise-of-zero-infra-backends">
    Read about the "Zero-infra" philosophy behind Sutro.
  </Card>
</CardGroup>

## Core concepts

SLang is designed around a small set of constructs that map directly to modern backend architecture:

1. **Entities**: Persisted database records and relationships.
2. **Schemas**: Reusable non-persisted structured types.
3. **Actions**: Typed business logic functions.
4. **Triggers**: HTTP endpoints, queues, cron jobs, and events that invoke actions.
5. **Security**: Subjects, identity fields, groups, roles, and permissions.
6. **Modules**: Built-in and local imports for capabilities such as AI and HTTP calls.

## Agent skill

If you're using an AI coding agent like [Claude Code](https://docs.anthropic.com/en/docs/claude-code), you can install the official SLang skill to give your agent full knowledge of SLang syntax and semantics:

```bash theme={null}
npx skills add https://github.com/SutroOrg/sutro-skills --skill slang
```

## Learn more

<CardGroup cols={2}>
  <Card title="Data models" icon="database" href="/docs/SLang/data-modeling">
    Define entities, fields, and relationships.
  </Card>

  <Card title="Logic & Actions" icon="code" href="/docs/SLang/logic">
    Write business logic using simple control flow.
  </Card>

  <Card title="Security" icon="shield-check" href="/docs/SLang/security">
    Implement robust permissions and auth.
  </Card>

  <Card title="API & Triggers" icon="globe" href="/docs/SLang/triggers">
    Expose your logic via HTTP and Queues.
  </Card>

  <Card title="Files & Storage" icon="file" href="/docs/SLang/files-and-storage">
    Upload, persist, and pass documents through backend logic.
  </Card>

  <Card title="Modules" icon="package" href="/docs/SLang/modules">
    Use built-in AI and HTTP modules or import local helpers.
  </Card>
</CardGroup>
