Settings Reference
Configuration options for Agenix.
Table of Contents
Overview
Agenix can be configured through:
Environment variables
Command-line arguments
Currently, Agenix does not support configuration files. All settings must be passed via environment variables or command-line options.
Settings Options
Model Configuration
Control which LLM model to use via command-line options.
–model
Type: string
Default: "gpt-4o"
Which LLM model to use.
agenix --model gpt-4o
Supported models:
OpenAI:
gpt-4o,gpt-4,gpt-3.5-turboAnthropic:
claude-3-5-sonnet-20241022,claude-3-opus-20240229
–api-key
Type: string Default: null (reads from environment)
API key for authentication. Prefer environment variables for security.
agenix --api-key "sk-..."
⚠️ Security Warning: Don’t commit API keys to version control.
–base-url
Type: string Default: null (uses provider default)
Custom API endpoint for OpenAI-compatible providers.
agenix --base-url "https://api.openai.com/v1"
Agent Configuration
–max-turns
Type: integer Default: 100
Maximum conversation turns per prompt.
agenix --max-turns 100
Lower values reduce costs but may stop before completing complex tasks.
–working-dir
Type: string
Default: "."
Working directory for file operations.
agenix --working-dir "/path/to/project"
–system-prompt
Type: string Default: null (uses built-in prompt)
Custom system prompt to override defaults.
agenix --system-prompt "You are a Python expert..."
Session Configuration
–session
Type: string Default: null (creates new session)
Session ID to load.
agenix --session "20240101_120000"
Environment Variables
Environment variables are the primary way to configure Agenix.
Authentication
OPENAI_API_KEY OpenAI API key.
export OPENAI_API_KEY="sk-..."
ANTHROPIC_API_KEY Anthropic API key for Claude models.
export ANTHROPIC_API_KEY="sk-ant-..."
OPENAI_API_BASE or OPENAI_BASE_URL Custom API endpoint.
export OPENAI_API_BASE="https://api.openai.com/v1"
Examples
Development Setup
export OPENAI_API_KEY="sk-..."
agenix --model gpt-4o --max-turns 50
Production Setup
export OPENAI_API_KEY="sk-..."
agenix --model gpt-4 --max-turns 20
Custom Provider
export OPENAI_API_BASE="https://custom-api.example.com/v1"
export OPENAI_API_KEY="custom-key"
agenix --model custom-model --max-turns 100
Project-Specific Configuration
# Project A
cd ~/projects/projectA
export OPENAI_API_KEY="sk-..."
agenix --model gpt-4 --system-prompt "You are a Python expert"
# Project B
cd ~/projects/projectB
export OPENAI_API_KEY="sk-..."
agenix --model claude-3-5-sonnet-20241022 --system-prompt "You are a TypeScript expert"
Priority Order
Settings are applied in this order (later overrides earlier):
Built-in defaults
Environment variables
Command-line arguments
Example:
# Environment has: OPENAI_API_KEY="sk-123"
# Command-line has: --model gpt-4
# Result: Uses sk-123 (env) and gpt-4 (CLI)
Configuration Tips
Security
Never commit API keys: Use environment variables
Use shell configuration: Add exports to
.bashrcor.zshrc
# ~/.bashrc
export OPENAI_API_KEY="sk-..."
Performance
Lower max_turns: Reduce for simple tasks
Choose right model: Use
gpt-4ofor speed,gpt-4or Claude for complex reasoning
Organization
Use shell scripts: Create project-specific scripts
#!/bin/bash
# ~/projects/myapp/run-agenix.sh
export OPENAI_API_KEY="sk-..."
cd ~/projects/myapp
agenix --model gpt-4 --system-prompt "You are a Python expert" "$@"
Troubleshooting
API Key Not Found
Check environment variables are set:
echo $OPENAI_API_KEY
Wrong Model Used
Check which model is being used:
agenix --model gpt-4o "test" # Explicitly set model
Session Not Saving
Sessions auto-save to ~/.agenix/sessions/. Check the directory exists:
ls ~/.agenix/sessions/
Next Steps
CLI Reference - Command-line usage
SDK Documentation - Programmatic usage
Skills Guide - Skill system
Extensions Guide - Extension development