Core Concepts
1. Brainβ
A Brain is the central concept of the system, representing an AI configuration with specific capabilities.
Key Properties:
- ID: Unique identifier
- Name: Human-readable name
- Engine: Configuration for the underlying AI model (OpenAI, LlamaCPP)
- Modules: Extensions that provide additional functionality
- Persona: Personality definition that shapes interactions (can be language-specific)
- PromptInit: Initial context/instructions for the AI (can be language-specific)
- Flow: Optional conversation flow structure
- Subscription: Optional usage limits and billing information
Responsibility:
- Serves as the container for AI capabilities and configuration
- Defines the personality and behavior of the AI
- Contains modules that extend functionality
2. Agentβ
An Agent is an instantiation of a Brain that can be independently deployed and interacted with.
Key Properties:
- ID: Unique identifier
- BrainID: Reference to the parent Brain
- Name: Human-readable name
- AuthSecret: Authentication credential
- StreamingEnabled: Whether streaming responses are enabled
- Voice Configuration: Settings for speech synthesis
- Status: Current state (BUSY/IDLE)
- Instances: Multiple running instances of the same agent
Responsibility:
- Provides an interface to interact with a Brain
- Manages state for ongoing conversations
- Handles voice synthesis and streaming
3. Chatβ
A Chat represents a conversation session between a user and an Agent.
Key Properties:
- ID: Unique identifier
- BrainID: Reference to the Brain being used
- AgentID: Reference to the Agent being used
- Messages: Array of messages in the conversation
- Context: Metadata and state for the conversation
- Language: The language being used in the conversation
Responsibility:
- Stores conversation history
- Maintains conversation state and context
- Tracks message flow and tool usage
4. Messageβ
A Message represents a single interaction within a Chat.
Key Properties:
- ID: Unique identifier
- Role: Sender type (USER, ASSISTANT, SYSTEM)
- Content: The actual message text
- ToolResults: Results of tools used in processing the message
- Suggestions: Suggested responses or follow-ups
- FlowNode: Reference to the flow node that generated this message
- Timestamp: When the message was created
- Actions: Actions that can be taken in response to the message
Responsibility:
- Stores content of individual interactions
- Associates tool usage with messages
- Carries metadata for flow control and UI elements
5. Flowβ
A Flow defines a structured conversation path with nodes that guide interactions.
Key Properties:
- Nodes: Individual conversation steps
- Entrypoints: Conditions that trigger the flow
- Exits: Transitions to other nodes
- Contents: Content and behavior for each node
Responsibility:
- Structures conversations into logical paths
- Controls tool access at different stages
- Provides guided conversation experiences
- Enforces requirements before progressing
6. Moduleβ
A Module is an extension that adds functionality to a Brain.
Key Types:
- External: Integration with external APIs via REST
- ContextualKnowledgeWeaviate: Knowledge retrieval from vector database
Responsibility:
- Extends the Brain's capabilities
- Provides access to external systems and data
- Enables retrieving relevant context for conversations
7. Guardianβ
A Guardian provides content moderation and safety for interactions.
Key Types:
- PROMPTCHECK: Evaluates input for safety
- WORDCHECK: Filters specific words
- INTENTIONCHECK: Analyzes intent of messages
- ATTACKCHECK: Detects potential security threats
- ANONIMIZE: Removes personally identifiable information
Responsibility:
- Ensures conversation safety
- Filters inappropriate content
- Prevents prompt injection and other attacks
- Protects private information
8. Toolβ
A Tool is a function that can be used by a Brain to perform specific actions.
Responsibility:
- Provides specific capabilities to the Brain
- Executes actions based on conversation context
- Returns results that can be incorporated into responses