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

# Core concepts

> The building blocks of AutoSage and how they relate to each other.

AutoSage has a small set of concepts. Once you know how they nest, the whole platform is easy to navigate.

## The hierarchy

```
Organization
  └── Environment            (dev / staging / production)
        └── Tenant           (credits, quotas, data isolation)
              └── Knowledge base
                    ├── Documents        (the RAG corpus)
                    ├── Database connections
                    ├── Prompts          (persona, instructions, custom prompt)
                    ├── Agents           (saved, deployable configurations)
                    └── Chats            (conversations)
```

Each resource has its own deletion behavior. Environment and tenant deletion remove their contained data, while deleting a knowledge base removes its content and archives dependent agents rather than deleting their history. Review the relevant resource page before deleting production data.

<Info>
  Every knowledge base belongs to exactly one tenant, and retrieval stays within its private corpus. [Agent sharing](/knowledge-bases/agent-sharing) can pass another agent's final answer back to the caller, but it does not expose or merge the other knowledge base's documents.
</Info>

## The main objects

<AccordionGroup>
  <Accordion title="Organization" icon="building">
    Your top-level account — the business or team. It owns billing, members and their roles, and one or more environments. When you create an organization, AutoSage automatically sets up a default environment and tenant so you can start immediately.
  </Accordion>

  <Accordion title="Environment" icon="layer-group">
    An isolation context within an organization, such as `dev`, `staging`, or `production`. **API keys are scoped to a single environment** — a key can never reach data in another environment. Use separate environments to keep test data away from production.
  </Accordion>

  <Accordion title="Tenant" icon="box">
    A resource owner that holds its own **credit pool** and **quotas** (max knowledge bases, documents, and storage). Tenants are the data-isolation unit. In a multi-customer product, you typically create one tenant per customer so their usage and data stay separate.
  </Accordion>

  <Accordion title="Knowledge base" icon="book">
    The workspace that ties everything together: uploaded **documents**, **database connections**, the **prompts** that shape the assistant's voice, the **agents** built on it, and the **chats** that run against it. Most day-to-day configuration happens at the knowledge base level.
  </Accordion>

  <Accordion title="Agent" icon="robot">
    A saved, versioned configuration — a goal, instructions, a model, and a set of tools and skills — that runs on a knowledge base. Agents can be run interactively, called through the API, or triggered on a schedule. See [Agents](/agents/overview).
  </Accordion>

  <Accordion title="Chat" icon="comment">
    A single conversation. Chats stream responses, keep long-running context through [compaction](/chat/long-conversations), and can be shared read-only. Both dashboard conversations and agent runs use the same underlying chat engine.
  </Accordion>

  <Accordion title="Memory" icon="brain">
    Durable facts an assistant can recall across separate conversations — preferences, decisions, and context you want it to remember. Memory is optional and configured per tenant and per knowledge base. See [Memory](/memory/overview).
  </Accordion>
</AccordionGroup>

## How a question gets answered

When someone sends a message, AutoSage assembles an answer from several grounded sources:

<Steps>
  <Step title="Retrieve from documents">
    The agent searches the knowledge base for the most relevant passages and cites them.
  </Step>

  <Step title="Query connected data">
    If the knowledge base has database connections, the agent can run read queries and chart the results.
  </Step>

  <Step title="Use tools and connected apps">
    The agent can call connected apps, custom tools, MCP servers, or delegate to another agent.
  </Step>

  <Step title="Recall memory">
    If memory is enabled, relevant durable facts from past conversations are added to the context.
  </Step>

  <Step title="Answer">
    The model produces a grounded response with citations when retrieval finds supporting sources. Streaming exposes live progress and final content.
  </Step>
</Steps>

## Where to go next

<CardGroup cols={2}>
  <Card title="Set up a knowledge base" icon="book" href="/knowledge-bases/overview">
    Upload documents and shape the assistant's voice.
  </Card>

  <Card title="Build an agent" icon="robot" href="/agents/overview">
    Give it a goal, tools, and optionally a schedule.
  </Card>
</CardGroup>
