Skip to main content

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

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 in OPENAI_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 in rate-limiter.ts):

Troubleshooting

Common Issues

  • Verify OPENAI_API_KEY is valid
  • Check API quota and billing
  • Ensure network access to OpenAI endpoints
  • Verify GATEWAY_URL is reachable
  • Check GATEWAY_API_KEY is valid
  • Ensure gateway service is running
  • Verify AWS credentials are correct
  • Check bucket exists and is accessible
  • Ensure IAM permissions are configured
  • Ensure WHATSAPP_VERIFY_TOKEN matches 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