Set Configuration Command

The config set command allows you to modify configuration settings for a specific AI Agent.

Usage

xpander config set <agent_id> [--section <section>] [--config <json>] [--file <path>]

Options

OptionDescription
--section <section>Optional. Section to modify: general, memory, tools, interfaces
--config <json>Optional. Configuration in JSON format
--file <path>Optional. Path to JSON configuration file

Examples

Update General Settings

xpander config set agent_123 --section general --config '{
  "name": "Advanced Support Agent",
  "description": "Enhanced support agent with ML capabilities",
  "language": "en-US",
  "timezone": "UTC",
  "max_response_time": 3
}'

Response:

Configuration updated successfully
===============================
Section: general
Status: success
Changes applied: 5
Previous values preserved: yes
Restart required: no

Updated Settings:
- Name: Advanced Support Agent
- Description: Enhanced support agent with ML capabilities
- Language: en-US
- Timezone: UTC
- Max Response Time: 3s

Update Memory Configuration

xpander config set agent_123 --section memory --config '{
  "type": "persistent",
  "storage": "redis",
  "ttl": "48h",
  "max_tokens": 16384,
  "context_window": 8192,
  "backup": {
    "enabled": true,
    "interval": "1h",
    "retention": "7d"
  }
}'

Response:

Configuration updated successfully
===============================
Section: memory
Status: success
Changes applied: 6
Previous values preserved: yes
Restart required: yes

Updated Settings:
- TTL: 48h
- Max Tokens: 16384
- Context Window: 8192
- Backup Enabled: yes
- Backup Interval: 1h
- Backup Retention: 7d

Note: Agent restart required to apply changes

Update from Configuration File

xpander config set agent_123 --file ./agent-config.json

Response:

Configuration updated successfully
===============================
Status: success
Changes applied: 12
Previous values preserved: yes
Restart required: yes

Updated Sections:
1. general
   - Modified: 3 settings
   - Added: 0 settings
   - Removed: 0 settings

2. memory
   - Modified: 4 settings
   - Added: 2 settings
   - Removed: 0 settings

3. tools
   - Modified: 2 settings
   - Added: 1 tool
   - Removed: 0 tools

Note: Agent restart required to apply changes

Configuration File Format

{
  "general": {
    "name": "Advanced Support Agent",
    "description": "Enhanced support agent with ML capabilities",
    "language": "en-US",
    "timezone": "UTC",
    "max_response_time": 3
  },
  "memory": {
    "type": "persistent",
    "storage": "redis",
    "ttl": "48h",
    "max_tokens": 16384,
    "context_window": 8192,
    "backup": {
      "enabled": true,
      "interval": "1h",
      "retention": "7d"
    }
  },
  "tools": [
    {
      "name": "notion",
      "status": "enabled",
      "config": {
        "workspace": "Support Team",
        "permissions": ["read", "write"]
      }
    }
  ]
}

Notes

  • Configuration changes can be made:
    • Section by section using --section
    • All at once using a configuration file
    • Directly via JSON string
  • The command:
    • Validates all configuration changes
    • Preserves existing values not specified
    • Indicates if agent restart is required
    • Provides detailed change summary
  • Use config view to:
    • Check current configuration
    • Verify changes
    • Export configuration template
  • Some changes may require agent restart
  • Backup configurations before major changes