Agent-TS Configuration
Agent-TS is configured through environment variables. Copy.env.example to .env and configure the required values.
Environment Variables
Required Variables
Optional Variables
AWS S3 Configuration
Required for KYC document storage:Example Configuration
Configuration by Environment
- Development
- Production
- Docker
OpenAI Configuration
Model Selection
The agent supports various OpenAI models:Assistant Management
On first run, the agent creates an OpenAI Assistant with the configured tools. The assistant ID is logged and can be set inOPENAI_ASSISTANT_ID for subsequent runs to reuse the same assistant.
S3 Bucket Configuration
Bucket Policy
The S3 bucket should be private with appropriate IAM permissions:CORS Configuration
For pre-signed URL access:Rate Limiting
Default rate limits (configurable inrate-limiter.ts):
Troubleshooting
Common Issues
OpenAI API errors
OpenAI API errors
- Verify
OPENAI_API_KEYis valid - Check API quota and billing
- Ensure network access to OpenAI endpoints
Gateway connection failures
Gateway connection failures
- Verify
GATEWAY_URLis reachable - Check
GATEWAY_API_KEYis valid - Ensure gateway service is running
S3 upload failures
S3 upload failures
- Verify AWS credentials are correct
- Check bucket exists and is accessible
- Ensure IAM permissions are configured
WhatsApp webhook not verified
WhatsApp webhook not verified
- Ensure
WHATSAPP_VERIFY_TOKENmatches Meta configuration - Check endpoint is publicly accessible (HTTPS)
- Verify URL in Meta Developer Console
Next Steps
Tools Reference
Available tool definitions
Webhooks
WhatsApp integration setup