mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-01-09 15:17:59 -05:00
<!-- Clearly explain the need for these changes: --> Update and adds a basic credential field for use in integrations like reddit ### Changes 🏗️ <!-- Concisely describe all of the changes made in this pull request: --> - Reddit - Drops the Username and Password for reddit from the .env - Updates Reddit block with modern provider and credential system - moves clientid and secret to reading from `Settings().secrets` rather than input on the block - moves user agent to `Settings().config` - SMTP - update the block to support user password and modern credentials - Add `UserPasswordCredentials` - Default API key expiry to None explicitly to help type cohesion - add `UserPasswordCredentials` with a weird form of `bearer` which we ideally remove because `basic` is a more appropriate name. This is dependent on `Webhook _base` allowing a subset of `Credentials` - Update `Credentials` and `CredentialsType` - Fix various `OAuth2Credentials | APIKeyCredentials` -> `Credentials` mismatches between base and derived classes - Replace `router/@post(create_api_key_credentials)` with `create_credentials` which now takes a credential and is discriminated by `type` provided by the credential - UI/Frontend - Updated various pages to have saved credential types, icons, and text for User Pass Credentials - Update credential input to have an input/modals/selects for user/pass combos - Update the types to support having user/pass credentials too (we should make this more centralized) - Update Credential Providres to support user_password - Update `client.ts` to support the new streamlined credential creation method and endpoint - DX - Sort the provider names **again** TODO: - [x] Reactivate Conditionally Disabling Reddit ~~- [ ] Look into moving Webhooks base to allow subset of `Credentials` rather than requiring all webhooks to support the input of all valid `Credentials` types~~ Out of scope - [x] Figure out the `singleCredential` calculator in `credentials-input.tsx` so that it also respects User Pass credentials and isn't a logic mess ### Checklist 📋 #### For code changes: - [x] I have clearly listed my changes in the PR description - [x] I have made a test plan - [x] I have tested my changes according to the test plan: <!-- Put your test plan here: --> - [x] Test with agents --------- Co-authored-by: Zamil Majdy <zamil.majdy@agpt.co>
153 lines
4.5 KiB
Plaintext
153 lines
4.5 KiB
Plaintext
DB_USER=postgres
|
|
DB_PASS=your-super-secret-and-long-postgres-password
|
|
DB_NAME=postgres
|
|
DB_PORT=5432
|
|
DATABASE_URL="postgresql://${DB_USER}:${DB_PASS}@localhost:${DB_PORT}/${DB_NAME}?connect_timeout=60&schema=platform"
|
|
PRISMA_SCHEMA="postgres/schema.prisma"
|
|
|
|
BACKEND_CORS_ALLOW_ORIGINS=["http://localhost:3000"]
|
|
|
|
# generate using `from cryptography.fernet import Fernet;Fernet.generate_key().decode()`
|
|
ENCRYPTION_KEY='dvziYgz0KSK8FENhju0ZYi8-fRTfAdlz6YLhdB_jhNw='
|
|
|
|
REDIS_HOST=localhost
|
|
REDIS_PORT=6379
|
|
REDIS_PASSWORD=password
|
|
|
|
ENABLE_CREDIT=false
|
|
STRIPE_API_KEY=
|
|
STRIPE_WEBHOOK_SECRET=
|
|
|
|
# What environment things should be logged under: local dev or prod
|
|
APP_ENV=local
|
|
# What environment to behave as: "local" or "cloud"
|
|
BEHAVE_AS=local
|
|
PYRO_HOST=localhost
|
|
SENTRY_DSN=
|
|
|
|
## User auth with Supabase is required for any of the 3rd party integrations with auth to work.
|
|
ENABLE_AUTH=true
|
|
SUPABASE_URL=http://localhost:8000
|
|
SUPABASE_SERVICE_ROLE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyAgCiAgICAicm9sZSI6ICJzZXJ2aWNlX3JvbGUiLAogICAgImlzcyI6ICJzdXBhYmFzZS1kZW1vIiwKICAgICJpYXQiOiAxNjQxNzY5MjAwLAogICAgImV4cCI6IDE3OTk1MzU2MDAKfQ.DaYlNEoUrrEn2Ig7tqibS-PHK5vgusbcbo7X36XVt4Q
|
|
SUPABASE_JWT_SECRET=your-super-secret-jwt-token-with-at-least-32-characters-long
|
|
|
|
## For local development, you may need to set FRONTEND_BASE_URL for the OAuth flow
|
|
## for integrations to work. Defaults to the value of PLATFORM_BASE_URL if not set.
|
|
# FRONTEND_BASE_URL=http://localhost:3000
|
|
|
|
## PLATFORM_BASE_URL must be set to a *publicly accessible* URL pointing to your backend
|
|
## to use the platform's webhook-related functionality.
|
|
## If you are developing locally, you can use something like ngrok to get a publc URL
|
|
## and tunnel it to your locally running backend.
|
|
PLATFORM_BASE_URL=http://localhost:3000
|
|
|
|
## == INTEGRATION CREDENTIALS == ##
|
|
# Each set of server side credentials is required for the corresponding 3rd party
|
|
# integration to work.
|
|
|
|
# For the OAuth callback URL, use <your_frontend_url>/auth/integrations/oauth_callback,
|
|
# e.g. http://localhost:3000/auth/integrations/oauth_callback
|
|
|
|
# GitHub OAuth App server credentials - https://github.com/settings/developers
|
|
GITHUB_CLIENT_ID=
|
|
GITHUB_CLIENT_SECRET=
|
|
|
|
# Google OAuth App server credentials - https://console.cloud.google.com/apis/credentials, and enable gmail api and set scopes
|
|
# https://console.cloud.google.com/apis/credentials/consent ?project=<your_project_id>
|
|
|
|
# You'll need to add/enable the following scopes (minimum):
|
|
# https://console.developers.google.com/apis/api/gmail.googleapis.com/overview ?project=<your_project_id>
|
|
# https://console.cloud.google.com/apis/library/sheets.googleapis.com/ ?project=<your_project_id>
|
|
GOOGLE_CLIENT_ID=
|
|
GOOGLE_CLIENT_SECRET=
|
|
|
|
# Twitter (X) OAuth 2.0 with PKCE Configuration
|
|
# 1. Create a Twitter Developer Account:
|
|
# - Visit https://developer.x.com/en and sign up
|
|
# 2. Set up your application:
|
|
# - Navigate to Developer Portal > Projects > Create Project
|
|
# - Add a new app to your project
|
|
# 3. Configure app settings:
|
|
# - App Permissions: Read + Write + Direct Messages
|
|
# - App Type: Web App, Automated App or Bot
|
|
# - OAuth 2.0 Callback URL: http://localhost:3000/auth/integrations/oauth_callback
|
|
# - Save your Client ID and Client Secret below
|
|
TWITTER_CLIENT_ID=
|
|
TWITTER_CLIENT_SECRET=
|
|
|
|
# Linear App
|
|
# Make a new workspace for your OAuth APP -- trust me
|
|
# https://linear.app/settings/api/applications/new
|
|
# Callback URL: http://localhost:3000/auth/integrations/oauth_callback
|
|
LINEAR_CLIENT_ID=
|
|
LINEAR_CLIENT_SECRET=
|
|
|
|
## ===== OPTIONAL API KEYS ===== ##
|
|
|
|
# LLM
|
|
OPENAI_API_KEY=
|
|
ANTHROPIC_API_KEY=
|
|
GROQ_API_KEY=
|
|
OPEN_ROUTER_API_KEY=
|
|
|
|
# Reddit
|
|
# Go to https://www.reddit.com/prefs/apps and create a new app
|
|
# Choose "script" for the type
|
|
# Fill in the redirect uri as <your_frontend_url>/auth/integrations/oauth_callback, e.g. http://localhost:3000/auth/integrations/oauth_callback
|
|
REDDIT_CLIENT_ID=
|
|
REDDIT_CLIENT_SECRET=
|
|
REDDIT_USER_AGENT="AutoGPT:1.0 (by /u/autogpt)"
|
|
|
|
# Discord
|
|
DISCORD_BOT_TOKEN=
|
|
|
|
# SMTP/Email
|
|
SMTP_SERVER=
|
|
SMTP_PORT=
|
|
SMTP_USERNAME=
|
|
SMTP_PASSWORD=
|
|
|
|
# D-ID
|
|
DID_API_KEY=
|
|
|
|
# Open Weather Map
|
|
OPENWEATHERMAP_API_KEY=
|
|
|
|
# SMTP
|
|
SMTP_SERVER=
|
|
SMTP_PORT=
|
|
SMTP_USERNAME=
|
|
SMTP_PASSWORD=
|
|
|
|
# Medium
|
|
MEDIUM_API_KEY=
|
|
MEDIUM_AUTHOR_ID=
|
|
|
|
# Google Maps
|
|
GOOGLE_MAPS_API_KEY=
|
|
|
|
# Replicate
|
|
REPLICATE_API_KEY=
|
|
|
|
# Ideogram
|
|
IDEOGRAM_API_KEY=
|
|
|
|
# Fal
|
|
FAL_API_KEY=
|
|
|
|
# Exa
|
|
EXA_API_KEY=
|
|
|
|
# E2B
|
|
E2B_API_KEY=
|
|
|
|
# Nvidia
|
|
NVIDIA_API_KEY=
|
|
|
|
# Logging Configuration
|
|
LOG_LEVEL=INFO
|
|
ENABLE_CLOUD_LOGGING=false
|
|
ENABLE_FILE_LOGGING=false
|
|
# Use to manually set the log directory
|
|
# LOG_DIR=./logs
|