Skip to content

feat: Add Pi agent support and .env.example template (based on #57)#58

Closed
shrwnsan wants to merge 12 commits into
fletchgqc:mainfrom
shrwnsan:feat/pi-agent-support
Closed

feat: Add Pi agent support and .env.example template (based on #57)#58
shrwnsan wants to merge 12 commits into
fletchgqc:mainfrom
shrwnsan:feat/pi-agent-support

Conversation

@shrwnsan
Copy link
Copy Markdown
Contributor

Summary

  • Add Pi agent support with AGENTBOX_INCLUDE_PI build arg and --tool pi flag
  • Add comprehensive .env.example template for API key configuration
  • Fix NVM sourcing for Pi npm installation in Dockerfile
  • Update tool error messages to include 'pi' option
  • Clarify ANTHROPIC_API_KEY vs ANTHROPIC_AUTH_TOKEN usage in .env.example

Dependency:
Based on feat/config-file (PR #57) which adds config file support and optional toolchains.

Changes

Pi Agent Support

  • New AGENTBOX_INCLUDE_PI build arg (default: false)
  • New --tool pi CLI flag for running Pi instead of Claude
  • Auto-enables Pi installation when --tool pi is selected
  • Mounts ~/.pi directory for Pi configuration persistence

.env.example Template

  • Comprehensive template with all Anthropic environment variables
  • Documents model selection variables for Claude Code
  • Lists optional LLM provider API keys (OpenAI, Gemini, Mistral, Groq, etc.)
  • Clarifies which tools use which authentication variables

Bug Fixes

  • Fix NVM sourcing before npm install in Pi installation block
  • Update --tool error message to list all three options

Test plan

  • Build image with --tool pi and verify Pi installs correctly
  • Verify agentbox --tool pi starts Pi agent
  • Confirm .env.example template covers necessary API keys
  • Test all three tool selections: claude, opencode, pi

shrwnsan and others added 10 commits February 27, 2026 01:04
Add ~/.agentbox/config for persistent settings (tool, Java, Claude channel).
Make Java opt-out with --no-java flag (backwards compatible).
Add --cc-latest flag for latest Claude Code channel.
Improve Java status message to avoid command-not-found errors.

Config file supports bash key=value format with shebang for syntax highlighting.
CLI flags override config file settings.

Co-Authored-By: GLM <zai-org@users.noreply.github.com>
Override AGENTBOX_INCLUDE_OPENCODE=false when AGENTBOX_TOOL=opencode
since the tool cannot run without being installed.

Co-Authored-By: GLM <zai-org@users.noreply.github.com>
- Prefix all Docker ARGs with AGENTBOX_ for consistency (INCLUDE_JAVA, CC_CHANNEL, etc.)
- Add AGENTBOX_SIMPLE_PROMPT arg for simple traditional Unix-style prompt (user@host:~)
- Keep default oh-my-zsh theme for backwards compatibility
- Maintain terminal size handling for better TTY support
- Add projects/ and .agents/ to .gitignore

Co-Authored-By: OpenCode <noreply@opencode.ai>
Add support for Pi coding agent (pi.dev) as an opt-in tool.

- Add AGENTBOX_INCLUDE_PI build arg (default: false)
- Auto-enable Pi when AGENTBOX_TOOL=pi is set
- Mount ~/.pi/ directory for config persistence
- Add Pi to tool validation and help text
- Update entrypoint.sh to display Pi version

Usage: AGENTBOX_TOOL=pi agentbox
- Template for ~/.agentbox/.env (global configuration)
- Anthropic API key (required for Claude, Pi, OpenCode)
- Optional LLM providers for Pi and OpenCode (OpenAI, Gemini, Mistral, Groq, etc.)
- Docker host access configuration (AGENTBOX_EXTRA_HOSTS)
- Clear authentication setup instructions for each tool
- Documented config/auth directory mounts and precedence

Co-authored-by: Amp <amp@ampcode.com>
- ANTHROPIC_AUTH_TOKEN (used by Claude Code)
- ANTHROPIC_BASE_URL (API endpoint)
- ANTHROPIC_MODEL variants (Opus, Sonnet, Haiku selection)
- Kept ANTHROPIC_API_KEY for Pi compatibility
- Both AUTH_TOKEN and API_KEY can be set to same value

Co-authored-by: Amp <amp@ampcode.com>
Claude Code recommends AUTH_TOKEN over API_KEY. Kept both for Pi compatibility.

Co-authored-by: Amp <amp@ampcode.com>
Replace generic beach emoji with 🤖 to match other tool icons

Co-Authored-By: GLM <zai-org@users.noreply.github.com>
- Update --tool error message to include 'pi' option
- Move ANTHROPIC_API_KEY to optional section in .env.example
  (Pi agent uses this variable, Claude Code uses ANTHROPIC_AUTH_TOKEN)
@shrwnsan shrwnsan changed the title feat: Add Pi agent support and .env.example template feat: Add Pi agent support and .env.example template (based on #57) Feb 28, 2026
@shrwnsan
Copy link
Copy Markdown
Contributor Author

shrwnsan commented Mar 1, 2026

Closing this PR in favor of #60, which contains the same Pi agent support feature but is now based on upstream/main instead of feat/config-file. This makes the PR self-contained and not dependent on the config file feature.

@shrwnsan shrwnsan closed this Mar 1, 2026
@shrwnsan shrwnsan deleted the feat/pi-agent-support branch March 1, 2026 06:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant