Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/gateway/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export function buildEnvVars(env: MoltbotEnv): Record<string, string> {
if (env.SLACK_APP_TOKEN) envVars.SLACK_APP_TOKEN = env.SLACK_APP_TOKEN;
if (env.CDP_SECRET) envVars.CDP_SECRET = env.CDP_SECRET;
if (env.WORKER_URL) envVars.WORKER_URL = env.WORKER_URL;
if (env.BRAVE_API_KEY) envVars.BRAVE_API_KEY = env.BRAVE_API_KEY;

return envVars;
}
1 change: 1 addition & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export interface MoltbotEnv {
DISCORD_DM_POLICY?: string;
SLACK_BOT_TOKEN?: string;
SLACK_APP_TOKEN?: string;
BRAVE_API_KEY?: string;
// Cloudflare Access configuration for admin routes
CF_ACCESS_TEAM_DOMAIN?: string; // e.g., 'myteam.cloudflareaccess.com'
CF_ACCESS_AUD?: string; // Application Audience (AUD) tag
Expand Down
13 changes: 13 additions & 0 deletions start-moltbot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ config.agents.defaults = config.agents.defaults || {};
config.agents.defaults.model = config.agents.defaults.model || {};
config.gateway = config.gateway || {};
config.channels = config.channels || {};
config.tools = config.tools || {};

// Clean up any broken anthropic provider config from previous runs
// (older versions didn't include required 'name' field)
Expand Down Expand Up @@ -191,6 +192,18 @@ if (process.env.TELEGRAM_BOT_TOKEN) {
config.channels.telegram.dmPolicy = process.env.TELEGRAM_DM_POLICY || 'pairing';
}

// web search via Brave
if (process.env.BRAVE_API_KEY) {
config.tools.web = config.tools.web || {};
config.tools.web.search = config.tools.web.search || {};
config.tools.web.search.enabled = true;
config.tools.web.search.provider = 'brave';
config.tools.web.search.maxResults = 5;
config.tools.web.search.timeoutSeconds = 20;
config.tools.web.search.cacheTtlMinutes = 15;
config.tools.web.search.apiKey = process.env.BRAVE_API_KEY;
}

// Discord configuration
if (process.env.DISCORD_BOT_TOKEN) {
config.channels.discord = config.channels.discord || {};
Expand Down