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

# Key Concepts

> Understand the core building blocks of Brainstormer: agents, knowledge bases, prompts, models, organizations, and credits.

Before diving deeper, it helps to understand the key concepts that make up the Brainstormer platform.

## Agents

An **agent** is your AI-powered conversational assistant. Each agent has its own personality, instructions, and capabilities defined by:

* A **system prompt** that tells the AI how to behave
* A selected **AI model** (GPT-4, Claude, Gemini, Llama, and more)
* Optional **knowledge bases** that ground responses in your content
* Configuration for **streaming**, **temperature**, and **welcome messages**

Agents can be in **draft** or **published** state. You test in draft mode and publish when ready to share.

<Info>
  Agents were historically called "bots" in the codebase. You may see both terms — they mean the same thing.
</Info>

## Knowledge Bases

A **knowledge base** (KB) is a collection of content that your agent can search and reference when answering questions. Knowledge bases support:

* **Documents** — PDFs, Word docs, text files, images, audio, and video
* **Web sources** — URLs, RSS feeds, sitemaps
* **Social media** — Instagram posts, YouTube videos, Twitter content
* **Platform connectors** — Substack, Medium, Ghost, and other blog platforms

When you link a knowledge base to an agent, the agent uses **RAG (Retrieval-Augmented Generation)** to find relevant content chunks and include them as context when generating responses. This is what makes responses accurate and citable rather than purely generated.

Each knowledge base also builds a **knowledge graph** — a network of entities and relationships extracted from your content that enables structured discovery alongside vector search.

## Prompts

**Prompts** are the instructions that control how your agent behaves. Brainstormer uses a unified prompt configuration system with several prompt types:

| Prompt Type              | Purpose                                                                                |
| ------------------------ | -------------------------------------------------------------------------------------- |
| **System**               | Core personality and behavioral instructions for the agent                             |
| **Welcome**              | The first message shown when a conversation starts                                     |
| **KB Context Injection** | Template that formats knowledge base results before injecting them into the AI context |

Each prompt supports two modes:

* **Fixed** — Static text that is used as-is (with variable substitution)
* **Generated** — An instruction sent to the AI model, which generates the actual content dynamically

Prompts support **dynamic variables** using `{{variable_name}}` syntax, letting you personalize messages with user names, plan tiers, or any custom data.

All prompt changes are **versioned** with semantic versioning (major.minor) and a full changelog, so you can track what changed and roll back if needed.

## Models

Brainstormer connects to **300+ AI models** through OpenRouter, giving you access to providers like:

* **OpenAI** — GPT-4, GPT-4o, GPT-3.5 Turbo
* **Anthropic** — Claude 3 Opus, Sonnet, Haiku
* **Google** — Gemini 2.0 Flash, Gemini Pro
* **Meta** — Llama 3, Llama 2
* And many more

Each model has different strengths, pricing, and context window sizes. You choose the model that best fits your agent's needs — a fast, cheap model for simple Q\&A, or a powerful model for complex reasoning.

The platform syncs available models from OpenRouter automatically, so you always have access to the latest options.

## Organizations

An **organization** is your workspace in Brainstormer. Everything — agents, knowledge bases, conversations, and billing — is scoped to an organization.

When you register, a default organization is created for you. You can:

* **Invite members** to collaborate on agents and knowledge bases
* **Assign roles** (owner, admin, member, viewer) to control what each person can do
* **Create groups** to manage permissions for teams of users
* **Configure settings** like approval workflows and API keys

Organizations are the unit of billing — credits are purchased and consumed at the organization level.

## Credits

Brainstormer uses a **credit-based billing system** to track and charge for platform usage. Here is how it works:

* **1 credit = \$0.50** (configurable by platform administrators)
* Every external AI call (chat completions, embeddings, vector operations) incurs a cost
* The platform applies a **margin multiplier** (default 2x) to the raw provider cost
* Credits are deducted from your organization's wallet automatically

For example, if an AI chat call costs \$0.01 at the provider level:

1. Charged cost = $0.01 x 2.0 = $0.02
2. Credits burned = $0.02 / $0.50 = 0.04 credits

Your organization has a **credit wallet** that tracks your balance. All transactions are recorded in an immutable **credit ledger** for full auditability.

<Note>
  Credits cover all billable operations: AI chat completions, document embeddings, vector search queries, file storage, and voice synthesis. You do not need to manage separate billing for each service.
</Note>

## How It All Fits Together

```
Organization
├── Members (with roles and permissions)
├── Agents
│   ├── System Prompt (versioned)
│   ├── Welcome Message (versioned)
│   ├── Model Selection
│   └── Linked Knowledge Bases
├── Knowledge Bases
│   ├── Documents (PDF, DOCX, images, audio, video)
│   ├── Web Sources (URLs, RSS)
│   ├── Social Sources (Instagram, YouTube, Twitter)
│   └── Knowledge Graph (entities + relationships)
├── Conversations
│   ├── Messages (with citations and sources)
│   └── Attachments
└── Credit Wallet
    └── Credit Ledger (all transactions)
```

When a user chats with an agent:

1. The agent's **system prompt** is loaded and rendered with any **dynamic variables**.
2. If knowledge bases are linked, the platform runs a **semantic search** across them.
3. Relevant content chunks are injected into the AI context with numbered citations.
4. The selected **AI model** generates a response grounded in your content.
5. The response is streamed to the user with interactive citation tooltips.
6. **Credits** are deducted from the organization wallet based on the provider cost.

## Next Steps

<Columns>
  <Card title="Creator Wizard" icon="wand-magic-sparkles" href="/platform-guide/agents/creator-wizard">
    Build your first agent using the guided Creator Wizard.
  </Card>

  <Card title="Creating a Knowledge Base" icon="book-open" href="/platform-guide/knowledge-bases/creating-a-kb">
    Set up a knowledge base to ground your agent in real content.
  </Card>
</Columns>
