Skip to content

Development Mode

Enable advanced features for development and experimentation.

Overview

Development mode (moxxy dev) enables features that are disabled in normal operation for security reasons.

Enabled Features

FeatureNormal ModeDev Mode
evolve_core skill
Debug loggingInfoDebug
Self-modification
Elevated permissions

Starting Dev Mode

bash
moxxy dev

This starts the gateway with development features enabled.

The evolve_core Skill

What It Does

The evolve_core skill allows agents to modify the Moxxy framework code:

xml
<invoke name="evolve_core">["Add a new logging function to the brain module"]</invoke>

Use Cases

  • Rapid prototyping - Test changes without rebuilding
  • Self-improvement - Let agents optimize their own code
  • Research - Experiment with AI self-modification

How It Works

  1. Agent generates code modification
  2. Code is written to source files
  3. Changes are logged and versioned
  4. Gateway may need restart to apply

Example

User: Add a function to format timestamps in the brain module

Agent: I'll add a timestamp formatting function.
<invoke name="evolve_core">["Add a function format_timestamp() to src/core/brain.rs that converts Unix timestamps to ISO 8601 format"]</invoke>

System: Code modification applied to src/core/brain.rs
Agent: I've added the format_timestamp function. You'll need to restart the gateway to use it.

Safety Guidelines

DANGER

Dev mode allows agents to modify system code. Use with extreme caution.

Recommendations

  1. Use a VM - Run dev mode in an isolated environment
  2. Version control - Commit changes before enabling dev mode
  3. Monitor changes - Watch for unexpected modifications
  4. Disable in production - Never use dev mode in production
  5. Backup regularly - Keep copies of your codebase

Audit Trail

All evolve_core invocations are logged:

bash
moxxy logs | grep evolve_core
2024-01-15 10:30:00 WARN  [evolve_core] Modification requested: "Add function to brain.rs"
2024-01-15 10:30:01 INFO  [evolve_core] Applied change to src/core/brain.rs
2024-01-15 10:30:01 INFO  [evolve_core] Change ID: evo_20240115_103001

Debug Logging

Dev mode enables verbose debug logging:

bash
moxxy logs
2024-01-15 10:30:00 DEBUG [brain] Building context with 5 memories
2024-01-15 10:30:00 DEBUG [brain] Skill catalog: 12 skills available
2024-01-15 10:30:00 DEBUG [llm] Request to OpenAI: gpt-4o (temperature=0.7)
2024-01-15 10:30:01 DEBUG [skill] host_shell executing: ls -la
2024-01-15 10:30:01 DEBUG [skill] Completed in 0.023s

Log Levels

LevelNormalDev
ERROR
WARN
INFO
DEBUG
TRACE

Development Workflow

Typical Dev Session

  1. Start dev mode:

    bash
    moxxy dev
  2. Make changes through agent:

    Add a new skill that does X
  3. Review changes:

    bash
    git diff
    moxxy logs | grep evolve_core
  4. Test:

    bash
    moxxy run --agent default --prompt "Test the new skill"
  5. Commit or revert:

    bash
    git add -A && git commit -m "Add new skill"
    # or
    git checkout .

Pairing with IDE

For best results, use an IDE alongside dev mode:

  1. Keep source code open in editor
  2. Watch for agent modifications
  3. Review and refine changes manually
  4. Run tests before committing

Environment Variables

Dev mode respects these environment variables:

VariableDescription
MOXXY_DEV_MODEForce dev mode (true/false)
MOXXY_SOURCE_DIRSource directory for modifications
RUST_LOGLog level override

Reverting Changes

Using Git

bash
# View changes
git status
git diff

# Revert specific file
git checkout src/core/brain.rs

# Revert all
git checkout .

Using Backups

Dev mode creates backups before modifications:

bash
ls ~/.moxxy/backups/
# evolve_20240115_103001_brain.rs.bak

Configuration

Enable/Disable evolve_core

Even in dev mode, you can control evolve_core:

bash
# Disable evolve_core even in dev mode
moxxy run --agent default --prompt "Store 'false' in vault as evolve_core_enabled"

Restrict Modifications

Limit which files can be modified:

bash
moxxy run --agent default --prompt "Store 'src/skills/,src/utils/' in vault as evolve_core_allowed_paths"

Best Practices

For Development

  1. Use dev mode on a branch
  2. Review all agent changes
  3. Run tests after modifications
  4. Document significant changes
  5. Don't commit blindly

For Research

  1. Use isolated environment
  2. Set clear boundaries
  3. Monitor resource usage
  4. Take snapshots regularly
  5. Document experiments

Troubleshooting

"evolve_core is disabled"

Even in dev mode, if you see this:

  1. Check vault setting:
    bash
    moxxy run --agent default --prompt "Is evolve_core_enabled true?"
  2. Verify you're in dev mode:
    bash
    moxxy gateway status

Changes Not Applied

Some changes require gateway restart:

bash
moxxy gateway restart

Corrupted Source

If source becomes corrupted:

  1. Revert with git:
    bash
    git checkout .
  2. Or restore from backup:
    bash
    cp ~/.moxxy/backups/evolve_*_brain.rs.bak src/core/brain.rs

Open source · Self-hosted · Data sovereign