Setup
Index ▾
- 01. Concepts
- 02. Architecture
- 03. State & Storage
- 04. Tools
- 05. BigQuery
- 06. Cloud Storage
- 07. Compute & Containers
- 08. Cloud Run
- 09. Pub/Sub
- 10. Databases
- 11. Observability
- 12. Access & Billing
- 13. Secret Manager
- 14. Networking
- 15. Scheduling & Tasks
- 16. Build & Artifacts
- 17. Guardrails
- 18. Setup
- 19. Deploy to Cloud Run
Setup
enoki needs two Google identities configured — one for inference (its own service account) and one per user for data access — plus a Slack app. This page is the short path to a running instance.
Prerequisites
- A paid Slack plan (the assistant surface isn’t available on free plans; guests can’t use the app).
- A Google Cloud project with billing enabled, and the
gcloudCLI. - Python 3.11+ and a virtual environment.
1. Inference identity (Vertex AI)
Inference runs as enoki’s own credentials via Application Default Credentials.
gcloud services enable aiplatform.googleapis.com
gcloud auth application-default login Then set, in .env:
GOOGLE_CLOUD_PROJECT=your-project-id
# optional:
GOOGLE_CLOUD_LOCATION=global
VERTEX_MODEL=gemini-3.1-flash-lite In production this is the service account attached to the host (Cloud Run, GCE, GKE) —
no gcloud login step.
2. Data-access identity (per-user Google OAuth)
Create a Web application OAuth client in the Google Cloud console, and set its authorized
redirect URI to your callback. Then in .env:
GOOGLE_OAUTH_CLIENT_ID=...
GOOGLE_OAUTH_CLIENT_SECRET=...
GOOGLE_OAUTH_REDIRECT_URI=https://your-host/google/oauth/callback
# space-separated data scopes; openid + email are added automatically
GOOGLE_OAUTH_SCOPES=https://www.googleapis.com/auth/cloud-platform
# Fernet key encrypting stored refresh tokens:
GOOGLE_TOKEN_ENC_KEY=... Generate the encryption key with:
python -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())" While the OAuth client is in Testing mode, Google expires refresh tokens after 7 days — publish the consent screen to remove that cap.
3. Slack app
Install the app from its manifest, then run one of the two entry points:
python app.py # Socket Mode — dev, single workspace (no Google routes)
python app_oauth.py # HTTP/OAuth mode — serves the Google connect flow Use app_oauth.py for the per-user Google connect flow; app.py is the quickest way to
try inference and read tools in a single workspace.
4. Connect and go
In Slack, open enoki’s App Home and click Connect Google Cloud. Approve the consent screen once. From then on, ask enoki about your cloud — reads run under your identity, and writes wait for your approval.
Next: Deploy to Cloud Run — take it to production.