Profile Management¶
Profiles are the heart of Clown. Each profile binds an agent to a specific provider, model, and credentials with complete isolation.
What is a Profile?¶
A profile contains:
- Agent binding - Which CLI tool to use (Claude Code, Codex, etc.)
- Provider binding - Which API backend (Anthropic, MiniMax, etc.)
- Credentials - API key stored securely in your system keychain
- Configuration - Model selection, arguments, hooks, and more
When you run a profile, Clown creates an isolated environment where all configuration is separate from other profiles.
Profile Lifecycle¶
Create¶
Options:
| Flag | Description |
|---|---|
--provider <id> | API provider to use (required) |
--endpoint <id> | Specific endpoint for multi-region providers |
--model <model> | Override default model |
--hooks <list> | Enable agent hooks (comma-separated) |
--mcp <list> | Enable MCP servers (comma-separated) |
--bare | Create minimal profile without defaults |
--proxy | Enable request routing proxy |
--template <name> | Use a registry template |
Example:
# Basic profile
ringlet profiles create claude my-project --provider anthropic
# With specific model and endpoint
ringlet profiles create claude china-work --provider minimax --endpoint china --model MiniMax-M2.1
# With hooks and MCP servers
ringlet profiles create claude dev-claude --provider anthropic --hooks auto_format --mcp filesystem,github
# Using a template
ringlet profiles create claude quick --provider anthropic --template anthropic-sonnet
List¶
Example output:
Alias Provider Endpoint Model Last Used
work-anthropic anthropic default claude-sonnet-4 2026-01-08T11:23:51Z
work-minimax minimax international MiniMax-M2.1 2026-01-08T09:18:12Z
home-minimax minimax international MiniMax-M2.1 2026-01-07T22:45:00Z
Inspect¶
Shows profile configuration (secrets are redacted):
Alias: work-minimax
Agent: claude
Provider: minimax
Endpoint: international
Model: MiniMax-M2.1
Created: 2026-01-05T10:00:00Z
Last Used: 2026-01-08T09:18:12Z
Profile Home: ~/.claude-profiles/work-minimax
API Key: ****...****
Run¶
Launches the agent with the profile's isolated environment:
# Basic run
ringlet profiles run my-project
# With additional arguments
ringlet profiles run my-project -- /path/to/code --verbose
Delete¶
Removes the profile and runs any cleanup hooks defined in the agent manifest.
Shell Integration¶
Export Environment¶
For manual usage, export a profile's environment to your shell:
Shell Aliases¶
Install quick-access aliases:
# Install alias
ringlet aliases install my-project
# Now you can run:
my-project # Equivalent to: ringlet profiles run my-project
# Uninstall when done
ringlet aliases uninstall my-project
Model Selection¶
When creating a profile, the model is determined by (highest to lowest priority):
--modelflag - Explicitly specified- Provider default - From provider manifest
- Agent default - From agent manifest
# Uses provider default (MiniMax-M2.1 for minimax)
ringlet profiles create claude work --provider minimax
# Override with explicit model
ringlet profiles create claude work --provider minimax --model claude-opus-4
Changing Models Later
To change a profile's model, delete and recreate it, or edit the JSON directly at ~/.config/ringlet/profiles/<alias>.json.
Profile Isolation¶
How It Works¶
Clown uses the home-wrapper strategy for isolation:
~/.claude-profiles/my-project/
├── .claude/
│ ├── settings.json # Profile-specific settings
│ ├── hooks.json # Hook configuration
│ └── history/ # Conversation history
└── .config/
└── ... # Other agent configs
When running a profile:
- Clown sets
HOMEto the profile directory - Agent reads/writes config relative to this new HOME
- Each profile has completely separate state
What Gets Isolated¶
| Isolated | Not Isolated |
|---|---|
| Configuration files | System binaries |
| API credentials | Shell configuration |
| Conversation history | Network access |
| Agent settings | File system access |
Advanced Features¶
Profile Hooks¶
Profiles support event-driven hooks for tool usage and agent events:
# Add a hook
ringlet hooks add my-project PreToolUse "Bash|Write" "echo Tool: $EVENT"
# List hooks
ringlet hooks list my-project
# Remove a hook
ringlet hooks remove my-project PreToolUse 0
See Hooks Guide for details.
Proxy Routing¶
Enable intelligent request routing:
# Create profile with proxy
ringlet profiles create claude smart-routing --provider anthropic --proxy
# Configure routing
ringlet proxy route add smart-routing cheap-route "tokens < 1000" "minimax/MiniMax-M2.1"
See Proxy Guide for details.
MCP Servers¶
Enable Model Context Protocol servers:
Profile Schema¶
Profiles are stored as JSON in ~/.config/ringlet/profiles/:
{
"alias": "my-project",
"agent_id": "claude",
"provider_id": "anthropic",
"endpoint_id": "default",
"model": "claude-sonnet-4",
"env": {
"ANTHROPIC_MODEL": "claude-sonnet-4"
},
"args": [],
"working_dir": null,
"metadata": {
"created_at": "2026-01-05T10:00:00Z",
"last_used": "2026-01-08T09:18:12Z",
"profile_home": "~/.claude-profiles/my-project",
"hooks_config": {},
"proxy_config": null
}
}
Secret Storage
API keys are stored in your system's keychain (macOS Keychain, GNOME Keyring, etc.), not in the JSON file.
Best Practices¶
-
Use descriptive aliases -
project-provider-purposeformat is readable -
One profile per project - Keep settings isolated
-
Use aliases for quick access - Install shims for frequent profiles
-
Export for scripts - Use JSON output for automation
Troubleshooting¶
Profile won't start¶
- Check agent is detected:
ringlet agents list - Verify credentials:
ringlet profiles inspect <alias> - Check daemon status:
ringlet daemon status
Wrong model being used¶
- Inspect the profile:
ringlet profiles inspect <alias> - Verify model field matches expected
- Recreate with explicit
--modelflag if needed
Credentials not working¶
- Try recreating the profile to re-enter credentials
- Check if the provider endpoint is reachable
- Verify API key is valid with the provider directly