Overview
All Magpie configuration is via environment variables. Copy.env.example or set them in your shell before running the CLI or adapters.
Pipeline Configuration
These variables control core pipeline behavior across all adapters (CLI, Discord, Teams).Path to the git repository to operate on. Ignored when
MAGPIE_GITHUB_ORG is set.Example:Base branch for new feature branches. All Magpie branches are created from this branch and PRs target it.Example:
Command to run tests during the CI loop.Examples:
Command to run lints during the CI loop.Examples:
Maximum number of lint→test→fix retry attempts.Example:
GitHub organization to restrict repo access to. When set, Magpie dynamically resolves the target repo from the task message and clones it into a temp workspace.Example:Use Case: Run a single Magpie instance across multiple repos in the same GitHub organization.
Plane (Issue Tracking)
Optional integration with self-hosted Plane for automatic issue creation and updates.Self-hosted Plane instance URL.Example:
Plane API key for authentication.Example:
Workspace slug in Plane.Example:
Project ID for auto-created issues.Example:
Discord Bot
Configuration for the Discord adapter (magpie-discord).
Discord bot token for authentication.Example:How to Get:
- Create a bot at https://discord.com/developers/applications
- Enable Message Content Intent in Bot settings
- Copy the bot token
Teams Webhook
Configuration for the Teams adapter (magpie-teams).
Bot Framework app ID.Example:
Bot Framework app secret.Example:
Address for the webhook server.Example:
Daytona Sandbox
Configuration for remote Daytona sandbox execution (feature-gated: requiresdaytona feature).
Daytona API key for authentication.Example:Note: When set, all pipeline commands execute inside a Daytona sandbox instead of locally.
Daytona API base URL.Example:
Daytona organization ID (for multi-org accounts).Example:
Sandbox size class:
small, medium, large, etc.Example:Daytona snapshot name to create sandboxes from (pre-built image with dependencies).Example:Use Case: Fast sandbox creation (5-10 seconds vs 5-10 minutes for cold clone+build).
Comma-separated Use Case: Pass API keys and tokens to sandboxes without baking them into snapshots.
KEY=VALUE pairs to inject into sandboxes at creation time.Example:Persistent volume UUID for build cache (e.g. cargo target dir, node_modules).Example:Use Case: Speed up builds by preserving compiled artifacts across sandbox instances.
Mount point for the persistent volume inside the sandbox.Example:Note: Must be set if
DAYTONA_VOLUME_ID is set.External Dependencies
These are not Magpie-specific, but are required for the system to function.Anthropic API key for Claude Code (both Tier 1 and Tier 2 agent calls).Example:How to Get:
- Visit https://console.anthropic.com/settings/keys
- Create a new API key
- Copy and set as env var
claude -p) reads this variable automatically.GitHub personal access token for git operations (clone, push, PR creation).Example:How to Get:
- Visit https://github.com/settings/tokens
- Generate a new token with
reposcope - Copy and set as env var
gh) reads this variable automatically.Example .env Files
Minimal Local Setup
Production Discord Bot with Daytona
Multi-Repo Setup with Tracing
Configuration Priority
Magpie loads configuration in this order:.envfile — loaded viadotenvy::dotenv()at startup- System environment variables — override
.envvalues - Code defaults —
PipelineConfig::default()fills in missing values
- Keep secrets in
.env(gitignored) - Override specific values via environment variables in production
- Rely on sensible defaults for most settings
Related Documentation
- Pipeline Configuration — Detailed PipelineConfig reference
- Plane Configuration — Issue tracking integration
- Sandbox Configuration — Daytona sandbox setup