DREAMv1 Quick Start Guide
Get up and running with DREAMv1 in minutes.
Prerequisites
Before installing DREAMv1, ensure you have the following:
Python 3.8+
DREAMv1 requires Python 3.8 or higher. You can check your version with:
python --version
Package Manager
Ensure you have pip installed and up to date:
pip install --upgrade pip
Docker (Optional)
For containerized deployment, Docker is recommended:
docker --version
Virtual Environment
We recommend using a virtual environment:
pip install virtualenv
Installation
Install via Pip
The simplest way to install DREAMv1 is via pip:
# Create and activate virtual environment
python -m venv dreamv1-env
source dreamv1-env/bin/activate # On Windows: dreamv1-env\Scripts\activate
# Install DREAMv1
pip install dreamv1
Install from Source
For the latest development version or to contribute:
# Clone the repository
git clone https://github.com/hmas-ai/dreamv1.git
cd dreamv1
# Create and activate virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -e .
Docker Installation
For containerized deployment:
# Pull the Docker image
docker pull hmasai/dreamv1:latest
# Run the container
docker run -p 8000:8000 hmasai/dreamv1:latest
Verify Installation
After installation, verify that DREAMv1 is working correctly:
python -c "import dreamv1; print(dreamv1.__version__)"
This should print the version number of your DREAMv1 installation.
Basic Usage
Hello World Example
Create a file named hello_dream.py
with the following content:
from dreamv1.core import MasterControlProgram
from dreamv1.agents import AgentRegistry
from dreamv1.memory import MemoryManager
from dreamv1.utils.logging import setup_logging
# Setup logging
setup_logging()
# Initialize the Master Control Program
mcp = MasterControlProgram()
# Create and register basic agents
agent_registry = AgentRegistry()
agent_registry.register_default_agents()
# Initialize memory systems
memory_manager = MemoryManager()
memory_manager.initialize_basic_memory()
# Initialize the system
mcp.initialize(agent_registry, memory_manager)
# Create a simple task
task = {
"type": "information_request",
"content": "Hello, DREAMv1!",
"priority": "medium"
}
# Process the task
result = mcp.process_task(task)
print(f"Task result: {result}")
Run the example:
python hello_dream.py
You should see output indicating that the task was processed by the system.
Running the Interactive Shell
DREAMv1 comes with an interactive shell for testing and exploration:
dreamv1 shell
This will start an interactive session where you can experiment with different aspects of the system.
Starting the API Server
To start the DREAMv1 API server:
dreamv1 serve --host 0.0.0.0 --port 8000
This will start the API server on the specified host and port. You can then interact with the system via HTTP requests.
Configuration
Basic Configuration
DREAMv1 uses YAML files for configuration. Create a file named config.yaml
with your desired settings:
# DREAMv1 configuration file
system:
name: "my-dreamv1-instance"
log_level: "info"
workers: 4
agents:
executive:
enabled: true
parameters:
planning_horizon: 10
tactical:
enabled: true
parameters:
max_tasks: 20
worker:
enabled: true
count: 5
parameters:
timeout: 30
memory:
working_memory:
type: "redis"
url: "redis://localhost:6379/0"
semantic_memory:
type: "vector_db"
connection: "localhost:8080"
communication:
protocol_version: "1.0"
message_timeout: 60
Load this configuration when initializing the system:
from dreamv1.core import MasterControlProgram
# Initialize with custom configuration
mcp = MasterControlProgram(config_path="config.yaml")
Environment Variables
You can also use environment variables to configure DREAMv1:
# Set the logging level
export DREAMV1_LOG_LEVEL=debug
# Set the memory storage location
export DREAMV1_MEMORY_PATH=/path/to/memory
# Set the number of worker agents
export DREAMV1_WORKER_COUNT=8
Next Steps
Need Help?
If you encounter any issues or have questions, check these resources:
- GitHub Issues - Report bugs or request features
- Discord Community - Get help from other users
- Contact Us - Reach out directly to the development team