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

# Core Concepts

> The building blocks of a21e: intents, prompts, packages, credits, and memory.

## Intents

An **intent** is a natural-language description of what you want. a21e parses it into structured fields — primary task, success criteria, constraints, risk tolerance — then routes it through the execution pipeline.

```json theme={null}
{
  "input": "Refactor this function to use async/await instead of callbacks",
  "auto_execute": true,
  "model_tier": "standard"
}
```

Intents can be submitted via the [RPC endpoint](/api-reference/overview), the [OpenAI-compatible endpoint](/guides/openai-compatibility), or the [Huddle web interface](/guides/huddle).

## Prompt synthesis

a21e doesn't just forward your message to a model. It **compiles** an optimized prompt by:

1. **Technique selection** — matching your intent to curated prompt strategies (chain-of-thought, few-shot examples, role prompting, etc.)
2. **Context injection** — adding your workspace preferences, memory, persona directives, and repository context
3. **Constraint enforcement** — applying org-level policies and user preferences
4. **Quality gating** — scoring the output and capturing feedback for future improvement

## Model tiers

| Tier       | Behavior                                             | Best for                       |
| ---------- | ---------------------------------------------------- | ------------------------------ |
| `auto`     | a21e selects the best model based on task complexity | Most requests                  |
| `economy`  | Fastest, lowest cost                                 | Simple lookups, formatting     |
| `standard` | Balanced quality and speed                           | Code generation, writing       |
| `premium`  | Highest capability models                            | Complex analysis, architecture |

## Deliberation

For complex decisions, a21e can run **multi-model deliberation**:

1. Multiple models each generate a plan independently
2. Each model critiques the other models' plans
3. A consensus vote determines the best approach
4. The winning plan is optionally executed

This surfaces disagreements and produces higher-confidence results than any single model.

## Credits

**1 credit = 1 enhancement** — one pass through the prompt synthesis and execution pipeline.

* **Managed mode**: credits cover prompt engineering + LLM inference
* **BYOK mode**: credits cover prompt engineering only (you pay the LLM provider directly)

Credits are consumed from subscription balance first, then add-on balance.

## Memory

a21e maintains **persistent memory** across sessions:

* **Corrections** — "I prefer snake\_case, not camelCase" is remembered for future requests
* **Preferences** — language, framework, coding style, verbosity
* **Context** — project details, architecture decisions, team conventions

Memory is scoped to user and optionally to organization. It's automatically retrieved and injected when relevant.

## Workspaces

A **workspace** binds together:

* **Repository context** — connect a GitHub repo for code-aware responses
* **Preferences** — default model tier, risk tolerance, verbosity
* **Persona** — custom system instructions for all responses
* **StylePrint** — extracted design tokens for consistent output style

Workspaces can be personal or organization-level, with enforced org policies overriding personal preferences.
