Environment Configuration
This guide details the environment variables used in the Zytron framework for configuration and customization of your agent-based applications.
Configuration Setup
Create a .env
file in your project's root directory to configure the Zytron framework. This file will contain all necessary environment variables for customizing your agent's behavior, logging, and analytics.
Environment Variables
Core Variables
WORKSPACE_DIR
Purpose: Defines the directory where all agent states and execution logs are stored
Type: String (path)
Default:
./workspace
Example:
Usage:
Stores JSON files containing agent states
Maintains execution history
Keeps track of agent interactions
Preserves conversation logs
ZYTRON_AUTOUPDATE_ON
Purpose: Controls automatic updates of the Zytron framework
Type: Boolean
Default:
false
Example:
Features:
Automatically updates to the latest stable version
Ensures you have the newest features
Maintains compatibility with the latest improvements
Handles dependency updates
Considerations:
Set to
false
if you need version stabilityRecommended
true
for development environmentsConsider system requirements for auto-updates
May require restart after updates
Telemetry Configuration
USE_TELEMETRY
Purpose: Controls whether telemetry data is collected
Type: Boolean
Default:
false
Example:
Data Collected:
Agent performance metrics
Execution time statistics
Memory usage
Error rates
System health indicators
Analytics Integration
ZYTRON_API_KEY
Purpose: Authentication key for the Zytron Analytics Suite
Type: String
Required: Yes, for analytics features
Example:
Features:
Real-time agent execution tracking
Usage analytics
Performance monitoring
Cost tracking
Custom metrics
Getting Started
Create a new
.env
file:Add your configuration:
Obtain your API key
Visit OpenAgents AI
Create an account or log in
Navigate to the API section
Generate your unique API key
Best Practices
Security
Never commit your
.env
file to version controlAdd
.env
to your.gitignore
fileKeep your API keys secure and rotate them periodically
Workspace Organization
Use descriptive workspace directory names
Implement regular cleanup of old logs
Monitor workspace size to prevent disk space issues
Telemetry Management
Enable telemetry in development for debugging
Consider privacy implications in production
Review collected data periodically
Auto-Update Management
Test updates in development before enabling in production
Keep backups before enabling auto-updates
Monitor system resources during updates
Schedule updates during low-traffic periods
Examples
Basic Development Setup
Production Setup
Testing Environment
Troubleshooting
Common issues and solutions:
Workspace Access Issues
Ensure proper file permissions
Verify the directory exists
Check disk space availability
API Key Problems
Confirm key is properly formatted
Verify key hasn't expired
Check for proper environment variable loading
Telemetry Issues
Confirm network connectivity
Verify firewall settings
Check for proper boolean values
Auto-Update Issues
Check internet connectivity
Verify sufficient disk space
Ensure proper permissions for updates
Check system compatibility requirements
Last updated