#!/bin/bash # setup_environment.sh echo "Setting up Agentic AI Environment..." # Create and activate conda environment conda create -n agentic_ai python=3.9 -y source activate agentic_ai # Install requirements pip install -r requirements.txt # Create conda env directories mkdir -p $CONDA_PREFIX/etc/conda/activate.d mkdir -p $CONDA_PREFIX/etc/conda/deactivate.d # Create activation script cat > $CONDA_PREFIX/etc/conda/activate.d/env_vars.sh << EOL #!/bin/bash export OPENAI_API_KEY='your-openai-key-here' export SERPAPI_KEY='your-serpapi-key-here' # Add more API keys as needed EOL # Create deactivation script cat > $CONDA_PREFIX/etc/conda/deactivate.d/env_vars.sh << EOL #!/bin/bash unset OPENAI_API_KEY unset SERPAPI_KEY # Add more unset commands for additional API keys EOL # Make scripts executable chmod +x $CONDA_PREFIX/etc/conda/activate.d/env_vars.sh chmod +x $CONDA_PREFIX/etc/conda/deactivate.d/env_vars.sh echo "Environment setup complete!" echo "Please edit $CONDA_PREFIX/etc/conda/activate.d/env_vars.sh to add your actual API keys" echo "Then run: source activate agentic_ai"