Linger is An Open-Source Personal Agent That Runs Fully on Your PC. We aim to break Big Tech’s grip on AI by bringing powerful local AI to everyday computers through efficient model–harness co-design, so everyone can run their own.
feat(web-search): add Exa and show backends like app connectors
LeoXing6479ae3962b4
diff --git a/apps/teamhub-cli/src/__snapshots__/cli.help-snapshot.test.ts.snap b/apps/teamhub-cli/src/__snapshots__/cli.help-snapshot.test.ts.snapindex 06cdaaff..83a52d06 100644--- a/apps/teamhub-cli/src/__snapshots__/cli.help-snapshot.test.ts.snap+++ b/apps/teamhub-cli/src/__snapshots__/cli.help-snapshot.test.ts.snap@@ -3210,11 +3210,11 @@ LEARN MORE},"web connect": {"help": "exit 0-teamhub web connect <tavily|brave|firecrawl|you>+teamhub web connect <tavily|brave|firecrawl|exa|you>Ask the user for a web search backend's API key: posts a key card in this chat unless the backend is already ready.Arguments:- <backend> tavily, brave, firecrawl or you.+ <backend> tavily, brave, firecrawl, exa or you.Options:--json Return machine-readable JSON.@@ -3224,7 +3224,7 @@ Options:When it posts the card, end your turn. The card's result wakes you when the user adds a key or declines. Never ask for an API key in a message.","schema": "exit 0-{"command":["web","connect"],"description":"Ask the user for a web search backend's API key: posts a key card in this chat unless the backend is already ready.","read_only":true,"input_schema":{"type":"object","properties":{"backend":{"enum":["tavily","brave","firecrawl","you"]}},"required":["backend"],"additionalProperties":false},"output_schema":{"type":"object","properties":{"status":{"enum":["ready","connection_requested"]},"backend":{"type":"object"},"message_id":{"type":"string"},"interaction_id":{"type":"string"}},"required":["status"]},"cli":{"usage":["teamhub web connect <tavily|brave|firecrawl|you>"],"arguments":["<backend> tavily, brave, firecrawl or you."],"options":{"--json":{"description":"Return machine-readable JSON.","boolean":true},"--help":{"description":"Show this offline command reference.","boolean":true},"-h":{"description":"Show help.","boolean":true},"--schema":{"description":"Show offline input and output schemas.","boolean":true}},"notes":["When it posts the card, end your turn. The card's result wakes you when the user adds a key or declines. Never ask for an API key in a message."]}}+{"command":["web","connect"],"description":"Ask the user for a web search backend's API key: posts a key card in this chat unless the backend is already ready.","read_only":true,"input_schema":{"type":"object","properties":{"backend":{"enum":["tavily","brave","firecrawl","exa","you"]}},"required":["backend"],"additionalProperties":false},"output_schema":{"type":"object","properties":{"status":{"enum":["ready","connection_requested"]},"backend":{"type":"object"},"message_id":{"type":"string"},"interaction_id":{"type":"string"}},"required":["status"]},"cli":{"usage":["teamhub web connect <tavily|brave|firecrawl|exa|you>"],"arguments":["<backend> tavily, brave, firecrawl, exa or you."],"options":{"--json":{"description":"Return machine-readable JSON.","boolean":true},"--help":{"description":"Show this offline command reference.","boolean":true},"-h":{"description":"Show help.","boolean":true},"--schema":{"description":"Show offline input and output schemas.","boolean":true}},"notes":["When it posts the card, end your turn. The card's result wakes you when the user adds a key or declines. Never ask for an API key in a message."]}}",},"web list": {@@ -3233,26 +3233,26 @@ teamhub web list [--backend <backend>]List the web search backends with what each supports, whether it is ready, and its quota.Options:- --backend <value> Show only this backend: tavily, brave, firecrawl, you, duckduckgo or direct.+ --backend <value> Show only this backend: tavily, brave, firecrawl, exa, you, duckduckgo or direct.--json Return machine-readable JSON.--help Show this offline command reference.-h Show help.--schema Show offline input and output schemas.","schema": "exit 0-{"command":["web","list"],"description":"List the web search backends with what each supports, whether it is ready, and its quota.","read_only":true,"input_schema":{"type":"object","properties":{"backend":{"enum":["tavily","brave","firecrawl","you","duckduckgo","direct"]}},"additionalProperties":false},"output_schema":{"type":"object","properties":{"default_search":{"type":"string"},"chosen_default_search":{"type":"string"},"default_open":{"type":"string"},"can_save_keys":{"type":"boolean"},"backends":{"type":"array","items":{"type":"object"}}},"required":["default_search","default_open","backends"]},"cli":{"usage":["teamhub web list [--backend <backend>]"],"arguments":[],"options":{"--backend":{"description":"Show only this backend: tavily, brave, firecrawl, you, duckduckgo or direct."},"--json":{"description":"Return machine-readable JSON.","boolean":true},"--help":{"description":"Show this offline command reference.","boolean":true},"-h":{"description":"Show help.","boolean":true},"--schema":{"description":"Show offline input and output schemas.","boolean":true}},"notes":[]}}+{"command":["web","list"],"description":"List the web search backends with what each supports, whether it is ready, and its quota.","read_only":true,"input_schema":{"type":"object","properties":{"backend":{"enum":["tavily","brave","firecrawl","exa","you","duckduckgo","direct"]}},"additionalProperties":false},"output_schema":{"type":"object","properties":{"default_search":{"type":"string"},"chosen_default_search":{"type":"string"},"default_open":{"type":"string"},"can_save_keys":{"type":"boolean"},"backends":{"type":"array","items":{"type":"object"}}},"required":["default_search","default_open","backends"]},"cli":{"usage":["teamhub web list [--backend <backend>]"],"arguments":[],"options":{"--backend":{"description":"Show only this backend: tavily, brave, firecrawl, exa, you, duckduckgo or direct."},"--json":{"description":"Return machine-readable JSON.","boolean":true},"--help":{"description":"Show this offline command reference.","boolean":true},"-h":{"description":"Show help.","boolean":true},"--schema":{"description":"Show offline input and output schemas.","boolean":true}},"notes":[]}}",},"web open": {"help": "exit 0-teamhub web open <url> [--backend direct|tavily|firecrawl|you] [--output <file>]+teamhub web open <url> [--backend direct|tavily|firecrawl|exa|you] [--output <file>]Read one web page as Markdown, from this computer or through a provider.Arguments:<url> An absolute http or https URL.Options:- --backend <value> direct (default) fetches the page from this computer; tavily, firecrawl or you read it through the provider, which helps with pages that need JavaScript or block plain requests.+ --backend <value> direct (default) fetches the page from this computer; tavily, firecrawl, exa or you read it through the provider, which helps with pages that need JavaScript or block plain requests.--output <value> Save the Markdown to this new file instead of printing it; never overwrites.--json Return machine-readable JSON.--help Show this offline command reference.@@ -3264,19 +3264,19 @@ teamhub web open https://www.postgresql.org/about/news/teamhub web open https://example.com/report --backend firecrawl --output report.md","schema": "exit 0-{"command":["web","open"],"description":"Read one web page as Markdown, from this computer or through a provider.","read_only":true,"input_schema":{"type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":2048},"backend":{"enum":["tavily","firecrawl","you","direct"]},"output":{"type":"string"}},"required":["url"],"additionalProperties":false},"output_schema":{"type":"object","properties":{"url":{"type":"string"},"title":{"type":"string"},"markdown":{"type":"string","description":"The page as Markdown; absent when saved with --output."},"path":{"type":"string","description":"The file written with --output."},"truncated":{"type":"boolean","description":"True when the page was longer than 20,000 characters."}},"required":["url","truncated"]},"cli":{"usage":["teamhub web open <url> [--backend direct|tavily|firecrawl|you] [--output <file>]"],"arguments":["<url> An absolute http or https URL."],"options":{"--backend":{"description":"direct (default) fetches the page from this computer; tavily, firecrawl or you read it through the provider, which helps with pages that need JavaScript or block plain requests."},"--output":{"description":"Save the Markdown to this new file instead of printing it; never overwrites."},"--json":{"description":"Return machine-readable JSON.","boolean":true},"--help":{"description":"Show this offline command reference.","boolean":true},"-h":{"description":"Show help.","boolean":true},"--schema":{"description":"Show offline input and output schemas.","boolean":true}},"notes":["The Markdown is cut at 20,000 characters; truncated says when it was."]}}+{"command":["web","open"],"description":"Read one web page as Markdown, from this computer or through a provider.","read_only":true,"input_schema":{"type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":2048},"backend":{"enum":["tavily","firecrawl","exa","you","direct"]},"output":{"type":"string"}},"required":["url"],"additionalProperties":false},"output_schema":{"type":"object","properties":{"url":{"type":"string"},"title":{"type":"string"},"markdown":{"type":"string","description":"The page as Markdown; absent when saved with --output."},"path":{"type":"string","description":"The file written with --output."},"truncated":{"type":"boolean","description":"True when the page was longer than 20,000 characters."}},"required":["url","truncated"]},"cli":{"usage":["teamhub web open <url> [--backend direct|tavily|firecrawl|exa|you] [--output <file>]"],"arguments":["<url> An absolute http or https URL."],"options":{"--backend":{"description":"direct (default) fetches the page from this computer; tavily, firecrawl, exa or you read it through the provider, which helps with pages that need JavaScript or block plain requests."},"--output":{"description":"Save the Markdown to this new file instead of printing it; never overwrites."},"--json":{"description":"Return machine-readable JSON.","boolean":true},"--help":{"description":"Show this offline command reference.","boolean":true},"-h":{"description":"Show help.","boolean":true},"--schema":{"description":"Show offline input and output schemas.","boolean":true}},"notes":["The Markdown is cut at 20,000 characters; truncated says when it was."]}}",},"web search": {"help": "exit 0-teamhub web search <query> [--backend tavily|brave|firecrawl|you|duckduckgo] [--limit 1-20] [--recency day|week|month|year] [--site <domain>]...+teamhub web search <query> [--backend tavily|brave|firecrawl|exa|you|duckduckgo] [--limit 1-20] [--recency day|week|month|year] [--site <domain>]...Search the web through a provider with the deployment's saved API key.Arguments:<query> What to search for; 1-400 characters.Options:- --backend <value> tavily, brave, firecrawl, you or duckduckgo. Without it the user's default runs, else the first backend with a key, else duckduckgo, which needs none.+ --backend <value> tavily, brave, firecrawl, exa, you or duckduckgo. Without it the user's default runs, else the first backend with a key, else duckduckgo, which needs none.--limit <value> Results to return; 1-20 up to the backend's max_limit, default 10.--recency <value> Only results from the past day, week, month or year.--site <value> Only results from this domain; repeat up to the backend's max_sites (teamhub web list).@@ -3290,7 +3290,7 @@ teamhub web search "rust 2026 edition release date"teamhub web search "postgres 19 features" --recency month --site postgresql.org","schema": "exit 0-{"command":["web","search"],"description":"Search the web through a provider with the deployment's saved API key.","read_only":true,"input_schema":{"type":"object","properties":{"query":{"type":"string","minLength":1,"maxLength":400},"backend":{"enum":["tavily","brave","firecrawl","you","duckduckgo"]},"limit":{"type":"integer","minimum":1,"maximum":20},"recency":{"enum":["day","week","month","year"]},"sites":{"type":"array","maxItems":10,"items":{"type":"string","minLength":3,"maxLength":253}}},"required":["query"],"additionalProperties":false},"output_schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"url":{"type":"string"},"snippet":{"type":"string"},"published_at":{"type":"string"}},"required":["title","url","snippet"]}}},"required":["results"]},"cli":{"usage":["teamhub web search <query> [--backend tavily|brave|firecrawl|you|duckduckgo] [--limit 1-20] [--recency day|week|month|year] [--site <domain>]..."],"arguments":["<query> What to search for; 1-400 characters."],"options":{"--backend":{"description":"tavily, brave, firecrawl, you or duckduckgo. Without it the user's default runs, else the first backend with a key, else duckduckgo, which needs none."},"--limit":{"description":"Results to return; 1-20 up to the backend's max_limit, default 10."},"--recency":{"description":"Only results from the past day, week, month or year."},"--site":{"description":"Only results from this domain; repeat up to the backend's max_sites (teamhub web list).","repeatable":true},"--json":{"description":"Return machine-readable JSON.","boolean":true},"--help":{"description":"Show this offline command reference.","boolean":true},"-h":{"description":"Show help.","boolean":true},"--schema":{"description":"Show offline input and output schemas.","boolean":true}},"notes":["A backend never falls back to another one. When it needs an API key, TeamHub posts a card asking the user for it; end your turn and the card's result wakes you with the results."]}}+{"command":["web","search"],"description":"Search the web through a provider with the deployment's saved API key.","read_only":true,"input_schema":{"type":"object","properties":{"query":{"type":"string","minLength":1,"maxLength":400},"backend":{"enum":["tavily","brave","firecrawl","exa","you","duckduckgo"]},"limit":{"type":"integer","minimum":1,"maximum":20},"recency":{"enum":["day","week","month","year"]},"sites":{"type":"array","maxItems":10,"items":{"type":"string","minLength":3,"maxLength":253}}},"required":["query"],"additionalProperties":false},"output_schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"url":{"type":"string"},"snippet":{"type":"string"},"published_at":{"type":"string"}},"required":["title","url","snippet"]}}},"required":["results"]},"cli":{"usage":["teamhub web search <query> [--backend tavily|brave|firecrawl|exa|you|duckduckgo] [--limit 1-20] [--recency day|week|month|year] [--site <domain>]..."],"arguments":["<query> What to search for; 1-400 characters."],"options":{"--backend":{"description":"tavily, brave, firecrawl, exa, you or duckduckgo. Without it the user's default runs, else the first backend with a key, else duckduckgo, which needs none."},"--limit":{"description":"Results to return; 1-20 up to the backend's max_limit, default 10."},"--recency":{"description":"Only results from the past day, week, month or year."},"--site":{"description":"Only results from this domain; repeat up to the backend's max_sites (teamhub web list).","repeatable":true},"--json":{"description":"Return machine-readable JSON.","boolean":true},"--help":{"description":"Show this offline command reference.","boolean":true},"-h":{"description":"Show help.","boolean":true},"--schema":{"description":"Show offline input and output schemas.","boolean":true}},"notes":["A backend never falls back to another one. When it needs an API key, TeamHub posts a card asking the user for it; end your turn and the card's result wakes you with the results."]}}",},}diff --git a/apps/teamhub-cli/src/cli.openapi.test.ts b/apps/teamhub-cli/src/cli.openapi.test.tsindex 0708ee41..d2aaa295 100644--- a/apps/teamhub-cli/src/cli.openapi.test.ts+++ b/apps/teamhub-cli/src/cli.openapi.test.ts@@ -525,6 +525,7 @@ async function respond(request: Request): Promise<Response> {{id: "you",name: "You.com",+ description: "Web search API for AI agents and LLMs.",tier: "free",tier_text: "Free without a key: limited, lower quality.",commands: ["search", "open"],diff --git a/apps/teamhub-cli/src/web-commands.ts b/apps/teamhub-cli/src/web-commands.tsindex d515de51..e9d50b1e 100644--- a/apps/teamhub-cli/src/web-commands.ts+++ b/apps/teamhub-cli/src/web-commands.ts@@ -9,14 +9,15 @@ import { CliError, ConnectorError } from "./errors.js";import { teamHubData } from "./http-client.js";type Json = Record<string, unknown>;-const keyBackends = ["tavily", "brave", "firecrawl", "you"] as const;+const keyBackends = ["tavily", "brave", "firecrawl", "exa", "you"] as const;const searchBackends = [...keyBackends, "duckduckgo"] as const;-const openBackends = ["tavily", "firecrawl", "you", "direct"] as const;+const openBackends = ["tavily", "firecrawl", "exa", "you", "direct"] as const;const recencies = ["day", "week", "month", "year"] as const;const names: Record<string, string> = {tavily: "Tavily",brave: "Brave Search",firecrawl: "Firecrawl",+ exa: "Exa",you: "You.com",duckduckgo: "DuckDuckGo",direct: "Direct",@@ -156,12 +157,12 @@ const webSearch: CommandDefinition = {"Search the web through a provider with the deployment's saved API key.",readOnly: true,usage: [- "teamhub web search <query> [--backend tavily|brave|firecrawl|you|duckduckgo] [--limit 1-20] [--recency day|week|month|year] [--site <domain>]...",+ "teamhub web search <query> [--backend tavily|brave|firecrawl|exa|you|duckduckgo] [--limit 1-20] [--recency day|week|month|year] [--site <domain>]...",],arguments: ["<query> What to search for; 1-400 characters."],options: {"--backend": flag(- "tavily, brave, firecrawl, you or duckduckgo. Without it the user's default runs, else the first backend with a key, else duckduckgo, which needs none.",+ "tavily, brave, firecrawl, exa, you or duckduckgo. Without it the user's default runs, else the first backend with a key, else duckduckgo, which needs none.",),"--limit": flag("Results to return; 1-20 up to the backend's max_limit, default 10.",@@ -270,12 +271,12 @@ const webOpen: CommandDefinition = {"Read one web page as Markdown, from this computer or through a provider.",readOnly: true,usage: [- "teamhub web open <url> [--backend direct|tavily|firecrawl|you] [--output <file>]",+ "teamhub web open <url> [--backend direct|tavily|firecrawl|exa|you] [--output <file>]",],arguments: ["<url> An absolute http or https URL."],options: {"--backend": flag(- "direct (default) fetches the page from this computer; tavily, firecrawl or you read it through the provider, which helps with pages that need JavaScript or block plain requests.",+ "direct (default) fetches the page from this computer; tavily, firecrawl, exa or you read it through the provider, which helps with pages that need JavaScript or block plain requests.",),"--output": flag("Save the Markdown to this new file instead of printing it; never overwrites.",@@ -393,7 +394,7 @@ const webList: CommandDefinition = {usage: ["teamhub web list [--backend <backend>]"],options: {"--backend": flag(- "Show only this backend: tavily, brave, firecrawl, you, duckduckgo or direct.",+ "Show only this backend: tavily, brave, firecrawl, exa, you, duckduckgo or direct.",),},inputSchema: {@@ -470,8 +471,8 @@ const webConnect: CommandDefinition = {// Like apps connect it only requests a card; TeamHub reuses a pending one,// so a repeated call needs no receipt.readOnly: true,- usage: ["teamhub web connect <tavily|brave|firecrawl|you>"],- arguments: ["<backend> tavily, brave, firecrawl or you."],+ usage: ["teamhub web connect <tavily|brave|firecrawl|exa|you>"],+ arguments: ["<backend> tavily, brave, firecrawl, exa or you."],options: {},notes: ["When it posts the card, end your turn. The card's result wakes you when the user adds a key or declines. Never ask for an API key in a message.",diff --git a/apps/teamhub/internal/typedcard/decision_search_key.go b/apps/teamhub/internal/typedcard/decision_search_key.goindex eca4255c..b6a3bd4e 100644--- a/apps/teamhub/internal/typedcard/decision_search_key.go+++ b/apps/teamhub/internal/typedcard/decision_search_key.go@@ -7,14 +7,17 @@ import ("errors""slices""strconv"+ "strings""github.com/jackc/pgx/v5""github.com/simplexai-labs/linger/apps/teamhub/internal/messagecreation""github.com/simplexai-labs/linger/apps/teamhub/internal/store"+ "github.com/simplexai-labs/linger/apps/teamhub/internal/websearch")-// searchKeyBackends are the web search backends a key card may show.-var searchKeyBackends = []string{"tavily", "brave", "firecrawl", "you"}+// searchKeyBackend reports whether a key card may show the backend: one that+// takes an API key.+func searchKeyBackend(backend string) bool { return websearch.KeyBackend(websearch.Backend(backend)) }// SearchKeyDecision asks a Human for a web search API key. Backend is the one// the card shows: the backend the Agent's command named, or, when it named@@ -53,7 +56,7 @@ type searchKeyView struct {func (command SearchKeyDecision) draft() (decisionDraft, error) {prompt, err := normalizeConnectionPrompt(command.Prompt)- if err != nil || !slices.Contains(searchKeyBackends, command.Backend) ||+ if err != nil || !searchKeyBackend(command.Backend) ||!slices.Contains([]string{"missing", "rejected", "free_limit"}, command.Reason) {return decisionDraft{}, ErrInvalid}@@ -180,7 +183,7 @@ type SearchKeyReplay struct {// key was added from also records its replay. The key belongs to the// deployment, so it answers the cards of every tenant.func (s *Service) SettleSearchKeys(ctx context.Context, backend string, replay *SearchKeyReplay) error {- if !slices.Contains(searchKeyBackends, backend) {+ if !searchKeyBackend(backend) {return ErrInvalid}rows, err := s.pool.Query(ctx, `SELECT id FROM decisions WHERE kind='search_key' AND status='pending' ORDER BY id`)@@ -222,11 +225,13 @@ type searchKeyPayload struct {ErrorCode string `json:"error_code,omitempty"`}-var searchKeyNames = map[string]struct{ name, key string }{- "tavily": {"Tavily", "a Tavily API key"},- "brave": {"Brave Search", "a Brave Search key"},- "firecrawl": {"Firecrawl", "a Firecrawl API key"},- "you": {"You.com", "a You.com API key"},+// searchKeyName is a backend's API key with its article, as the notice says it.+func searchKeyName(backend string) string {+ name := websearch.DisplayName(websearch.Backend(backend))+ if strings.ContainsAny(name[:1], "AEIOU") {+ return "an " + name + " API key"+ }+ return "a " + name + " API key"}// searchKeyNoticeText tells the waiting Agent how its key card ended. The@@ -267,10 +272,10 @@ func searchKeyNoticeText(decisionID string, decision decisionRecord, answer deci}configured := answer.Backendpayload = searchKeyPayload{Decision: "configured", Backend: configured, Results: replay.Results, Page: replay.Page, ErrorCode: replay.ErrorCode}- text = who + " added " + searchKeyNames[configured].key+ text = who + " added " + searchKeyName(configured)if requested != "" && requested != configured {payload.RequestedBackend = requested- text += " instead of " + searchKeyNames[requested].name+ text += " instead of " + websearch.DisplayName(websearch.Backend(requested))}action := "search for " + strconv.Quote(request.Query)if request.Command == "open" {diff --git a/apps/teamhub/internal/typedcard/decision_search_key_test.go b/apps/teamhub/internal/typedcard/decision_search_key_test.goindex 5dd70418..82cdc505 100644--- a/apps/teamhub/internal/typedcard/decision_search_key_test.go+++ b/apps/teamhub/internal/typedcard/decision_search_key_test.go@@ -77,12 +77,14 @@ func TestSearchKeyNoticesCarryTheConfiguredBackend(t *testing.T) {"Human interaction decision_1 resolved: The user added a Tavily API key. Run the command again.\n" +`payload={"decision":"configured","backend":"tavily"}`},{"other backend", "answered", view("tavily"), tavilySearch, `{"decision":"configured","backend":"brave"}`, "", pgtype.Text{},- "Human interaction decision_1 resolved: The user added a Brave Search key instead of Tavily. Run the command again with --backend brave.\n" ++ "Human interaction decision_1 resolved: The user added a Brave Search API key instead of Tavily. Run the command again with --backend brave.\n" +`payload={"decision":"configured","backend":"brave","requested_backend":"tavily"}`},{"no backend named", "answered", view("tavily"), implicitSearch, `{"decision":"configured","backend":"tavily"}`, "", pgtype.Text{},"The user added a Tavily API key. Run the command again with --backend tavily.\n" + `payload={"decision":"configured","backend":"tavily"}`},{"connect", "answered", view("firecrawl"), []byte(`{}`), `{"decision":"configured","backend":"firecrawl"}`, "", pgtype.Text{},"The user added a Firecrawl API key. Run the command again.\n"},+ {"vowel name", "answered", view("exa"), []byte(`{}`), `{"decision":"configured","backend":"exa"}`, "", pgtype.Text{},+ "The user added an Exa API key. Run the command again.\n"},{"declined", "denied", view("tavily"), tavilySearch, `{"decision":"deny"}`, "", pgtype.Text{},"Human interaction decision_1 resolved: The user declined to add a web search key. Don't retry; tell the user web search needs a key in Connectors.\n" +`payload={"decision":"deny"}`},@@ -90,7 +92,7 @@ func TestSearchKeyNoticesCarryTheConfiguredBackend(t *testing.T) {"The Sponsor declined to add a web search key. Don't retry; say in your final reply"},{"replayed search", "answered", view("tavily"), tavilySearch, `{"decision":"configured","backend":"brave"}`,`{"outcome":"","data":{"results":[{"title":"T","url":"https://t.example","snippet":"s"}]}}`, pgtype.Text{},- `The user added a Brave Search key instead of Tavily. Results of your search for "rust 2026" are in the payload below; don't run it again.` + "\n" ++ `The user added a Brave Search API key instead of Tavily. Results of your search for "rust 2026" are in the payload below; don't run it again.` + "\n" +`payload={"decision":"configured","backend":"brave","requested_backend":"tavily","results":[{"title":"T","url":"https://t.example","snippet":"s"}]}`},{"replayed open", "answered", view("tavily"), open, `{"decision":"configured","backend":"tavily"}`,`{"outcome":"","data":{"page":{"url":"https://a.example/x","markdown":"# A","truncated":false}}}`, task,diff --git a/apps/teamhub/internal/websearch/exa.go b/apps/teamhub/internal/websearch/exa.gonew file mode 100644index 00000000..35c8c443--- /dev/null+++ b/apps/teamhub/internal/websearch/exa.go@@ -0,0 +1,87 @@+package websearch++import (+ "context"+ "encoding/json"+ "net/http"+ "strings"+ "time"+)++func exaHeader(key string) map[string]string { return map[string]string{"x-api-key": key} }++// exaRecency is how far back each recency reaches; Exa filters by a start+// date instead of a named range.+var exaRecency = map[string]time.Duration{+ "day": 24 * time.Hour, "week": 7 * 24 * time.Hour, "month": 30 * 24 * time.Hour, "year": 365 * 24 * time.Hour,+}++// exaSearch asks Exa for results with highlights, which serve as snippets.+func (p *providers) exaSearch(ctx context.Context, key string, request Request) (Outcome, error) {+ body := map[string]any{+ "query": request.Query, "type": "auto", "numResults": request.Limit,+ "contents": map[string]any{"highlights": map[string]any{"maxCharacters": maxSnippetRunes}},+ }+ if span, ok := exaRecency[request.Recency]; ok {+ body["startPublishedDate"] = time.Now().UTC().Add(-span).Format(time.RFC3339)+ }+ if len(request.Sites) > 0 {+ body["includeDomains"] = request.Sites+ }+ a, err := p.call(ctx, http.MethodPost, p.endpoints.Exa+"/search", exaHeader(key), body)+ if err != nil {+ return Outcome{}, err+ }+ if err := classify(Exa, CommandSearch, a); err != nil {+ return Outcome{}, err+ }+ var decoded struct {+ Results []struct {+ Title string `json:"title"`+ URL string `json:"url"`+ PublishedDate string `json:"publishedDate"`+ Highlights []string `json:"highlights"`+ } `json:"results"`+ }+ if json.Unmarshal(a.body, &decoded) != nil {+ return Outcome{}, &Failure{Code: CodeProviderUnavailable}+ }+ results := make([]Result, 0, len(decoded.Results))+ for _, item := range decoded.Results {+ results = appendResult(results, item.Title, item.URL, strings.Join(item.Highlights, " "), item.PublishedDate)+ }+ return Outcome{Results: limitResults(results, request.Limit)}, nil+}++// exaContents reads one page as Markdown with its links kept. Exa reports a+// page it could not fetch in statuses with 200, so that is checked too. One+// character past MaxMarkdown is asked for so a cut page is marked truncated.+func (p *providers) exaContents(ctx context.Context, key, pageURL string) (Outcome, error) {+ a, err := p.call(ctx, http.MethodPost, p.endpoints.Exa+"/contents", exaHeader(key), map[string]any{+ "urls": []string{pageURL}, "text": map[string]any{"maxCharacters": MaxMarkdown + 1, "linkStyle": "full"},+ })+ if err != nil {+ return Outcome{}, err+ }+ if err := classify(Exa, CommandOpen, a); err != nil {+ return Outcome{}, err+ }+ var decoded struct {+ Results []struct {+ URL string `json:"url"`+ Title string `json:"title"`+ Text string `json:"text"`+ } `json:"results"`+ Statuses []struct {+ Status string `json:"status"`+ } `json:"statuses"`+ }+ if json.Unmarshal(a.body, &decoded) != nil {+ return Outcome{}, &Failure{Code: CodeProviderUnavailable}+ }+ if len(decoded.Results) == 0 || len(decoded.Statuses) > 0 && decoded.Statuses[0].Status == "error" {+ return Outcome{}, &Failure{Code: CodePageUnreadable}+ }+ item := decoded.Results[0]+ return pageOutcome(pageURL, item.URL, item.Title, item.Text)+}diff --git a/apps/teamhub/internal/websearch/exa_test.go b/apps/teamhub/internal/websearch/exa_test.gonew file mode 100644index 00000000..89d01da4--- /dev/null+++ b/apps/teamhub/internal/websearch/exa_test.go@@ -0,0 +1,102 @@+package websearch++import (+ "errors"+ "net/http"+ "strings"+ "testing"+ "time"+)++func TestExaSearchSendsItsRequestAndReadsHighlights(t *testing.T) {+ fake := newFakeProviders(t, func(w http.ResponseWriter, r seen) {+ if r.path != "/exa/search" {+ t.Errorf("unexpected %s", r.path)+ }+ writeJSON(w, 200, `{"results":[{"title":"E","url":"https://e.example/a","publishedDate":"2026-11-02T00:00:00.000Z",+ "highlights":["first part.","second part."]},{"title":"bad","url":"ftp://e.example"}],"costDollars":{"total":0.008}}`)+ })+ s, keys := newTestService(t, fake)+ saveRaw(t, s, keys, Exa, "exa-secret", "unverified")+ request, err := Normalize(Request{Command: CommandSearch, Backend: Exa, Query: "q", Limit: 4, Recency: "week",+ Sites: []string{"a.example", "b.example"}})+ if err != nil {+ t.Fatal(err)+ }+ outcome, err := s.Run(t.Context(), request)+ want := Result{Title: "E", URL: "https://e.example/a", Snippet: "first part. second part.", PublishedAt: "2026-11-02T00:00:00.000Z"}+ if err != nil || outcome.Backend != Exa || len(outcome.Results) != 1 || outcome.Results[0] != want {+ t.Fatalf("Run = %+v, %v", outcome, err)+ }+ body := fake.seen()[0].body+ since, err := time.Parse(time.RFC3339, body["startPublishedDate"].(string))+ if fake.seen()[0].apiKey != "exa-secret" || body["numResults"] != float64(4) || body["type"] != "auto" ||+ len(body["includeDomains"].([]any)) != 2 || err != nil || time.Since(since) < 6*24*time.Hour || time.Since(since) > 8*24*time.Hour ||+ body["contents"].(map[string]any)["highlights"] == nil {+ t.Fatalf("exa request = %+v", body)+ }+ // A successful call proves a key Exa has no endpoint to check.+ if keys.rows[string(Exa)].State != "verified" {+ t.Fatalf("state after a call = %q", keys.rows[string(Exa)].State)+ }+}++func TestExaContentsReadsThePageOrReportsItUnreadable(t *testing.T) {+ long := strings.Repeat("x", MaxMarkdown+1)+ fake := newFakeProviders(t, func(w http.ResponseWriter, r seen) {+ switch r.body["urls"].([]any)[0] {+ case "https://e.example/long":+ if r.body["text"].(map[string]any)["maxCharacters"] != float64(MaxMarkdown+1) {+ t.Errorf("contents body = %+v", r.body)+ }+ writeJSON(w, 200, `{"results":[{"url":"https://e.example/long","title":"Long","text":"`+long+`"}],+ "statuses":[{"id":"https://e.example/long","status":"success","source":"crawled"}]}`)+ default:+ writeJSON(w, 200, `{"results":[],"statuses":[{"id":"https://e.example/gone","status":"error","error":{"tag":"CRAWL_NOT_FOUND","httpStatusCode":404}}]}`)+ }+ })+ s, keys := newTestService(t, fake)+ saveRaw(t, s, keys, Exa, "exa-secret", "verified")+ open := func(link string) (Outcome, error) {+ request, err := Normalize(Request{Command: CommandOpen, Backend: Exa, URL: link})+ if err != nil {+ t.Fatal(err)+ }+ return s.Run(t.Context(), request)+ }+ outcome, err := open("https://e.example/long")+ if err != nil || outcome.Page.Title != "Long" || !outcome.Page.Truncated || len(outcome.Page.Markdown) != MaxMarkdown {+ t.Fatalf("long page = %v", err)+ }+ var failure *Failure+ if _, err := open("https://e.example/gone"); !errors.As(err, &failure) || failure.Code != CodePageUnreadable {+ t.Fatalf("gone page = %#v", err)+ }+}++func TestExaKeyIsSavedUnverifiedAndRefusedOn401(t *testing.T) {+ fake := newFakeProviders(t, func(w http.ResponseWriter, r seen) {+ writeJSON(w, 401, `{"requestId":"r","error":"Invalid API key","tag":"INVALID_API_KEY"}`)+ })+ s, keys := newTestService(t, fake)+ view, err := s.SaveKey(t.Context(), Exa, "exa-secret")+ if err != nil || view.KeyState != "unverified" || view.OfficialKeyCheck || view.Description == "" || len(fake.seen()) != 0 {+ t.Fatalf("SaveKey = %+v, %v, calls %d", view, err, len(fake.seen()))+ }+ list, err := s.List(t.Context(), true)+ if err != nil || len(fake.seen()) != 0 {+ t.Fatalf("List called a provider: %v", err)+ }+ for _, v := range list.Backends {+ if v.ID == Exa && (v.Status != "ready" || v.Quota.Reason != "not_reported") {+ t.Fatalf("exa = %+v", v)+ }+ }+ request := search("q")+ request.Backend = Exa+ _, err = s.Run(t.Context(), request)+ var failure *Failure+ if !errors.As(err, &failure) || failure.Code != CodeKeyRejected || keys.rows[string(Exa)].State != "rejected" {+ t.Fatalf("Run = %#v, state %q", err, keys.rows[string(Exa)].State)+ }+}diff --git a/apps/teamhub/internal/websearch/providers.go b/apps/teamhub/internal/websearch/providers.goindex 5454cbc5..9a35d666 100644--- a/apps/teamhub/internal/websearch/providers.go+++ b/apps/teamhub/internal/websearch/providers.go@@ -26,6 +26,7 @@ const (DefaultYouIndexURL = "https://ydc-index.io"DefaultYouMCPURL = "https://api.you.com/mcp/free"DefaultDuckDuckGo = "https://html.duckduckgo.com"+ DefaultExaURL = "https://api.exa.ai")// Call budgets. A page read waits longer because the provider fetches and@@ -41,8 +42,8 @@ const (// API. Client replaces the default client, which never follows a redirect so// a key never reaches another host.type Endpoints struct {- Tavily, Brave, Firecrawl, YouAPI, YouIndex, YouMCP, DuckDuckGo string- Client *http.Client+ Tavily, Brave, Firecrawl, Exa, YouAPI, YouIndex, YouMCP, DuckDuckGo string+ Client *http.Client}type providers struct {@@ -58,7 +59,7 @@ func newProviders(endpoints Endpoints) *providers {{&endpoints.Tavily, DefaultTavilyURL}, {&endpoints.Brave, DefaultBraveURL},{&endpoints.Firecrawl, DefaultFirecrawlURL}, {&endpoints.YouAPI, DefaultYouAPIURL},{&endpoints.YouIndex, DefaultYouIndexURL}, {&endpoints.YouMCP, DefaultYouMCPURL},- {&endpoints.DuckDuckGo, DefaultDuckDuckGo},+ {&endpoints.DuckDuckGo, DefaultDuckDuckGo}, {&endpoints.Exa, DefaultExaURL},} {if *field.value == "" {*field.value = field.fallback@@ -193,6 +194,10 @@ func (p *providers) run(ctx context.Context, b Backend, key string, request Requoutcome, err = p.firecrawlSearch(ctx, key, request)case b == Firecrawl:outcome, err = p.firecrawlScrape(ctx, key, request.URL)+ case b == Exa && request.Command == CommandSearch:+ outcome, err = p.exaSearch(ctx, key, request)+ case b == Exa:+ outcome, err = p.exaContents(ctx, key, request.URL)case b == You && request.Command == CommandSearch:outcome, err = p.youSearch(ctx, key, request)case b == You:diff --git a/apps/teamhub/internal/websearch/websearch.go b/apps/teamhub/internal/websearch/websearch.goindex 3d735eb5..bd0221d4 100644--- a/apps/teamhub/internal/websearch/websearch.go+++ b/apps/teamhub/internal/websearch/websearch.go@@ -33,6 +33,7 @@ const (Tavily Backend = "tavily"Brave Backend = "brave"Firecrawl Backend = "firecrawl"+ Exa Backend = "exa"You Backend = "you"DuckDuckGo Backend = "duckduckgo"Direct Backend = "direct"@@ -40,7 +41,7 @@ const (// keyOrder is TeamHub's default order: a search without a backend uses the// first one with a usable key, then DuckDuckGo.-var keyOrder = []Backend{Tavily, Brave, Firecrawl, You}+var keyOrder = []Backend{Tavily, Brave, Firecrawl, Exa, You}// searchOrder is every backend that searches, in the order lists show them.var searchOrder = append(slices.Clone(keyOrder), DuckDuckGo)@@ -86,7 +87,9 @@ const ()type definition struct {- name string+ name string+ // description is the provider's own one-line pitch, for its card.+ description stringcommands []stringfilters []stringmaxLimit int@@ -98,24 +101,35 @@ type definition struct {}// definitions is the static text and capability of each backend. Firecrawl-// and You.com take no site filter because their APIs document none.+// and You.com take no site filter because their APIs document none. Brave and+// Exa have no endpoint that checks a key or reports what is left on it.var definitions = map[Backend]definition{- Tavily: {name: "Tavily", commands: []string{CommandSearch, CommandOpen}, filters: []string{FilterRecency, FilterSite},+ Tavily: {name: "Tavily", description: "The real-time search engine for AI agents.",+ commands: []string{CommandSearch, CommandOpen}, filters: []string{FilterRecency, FilterSite},maxLimit: 20, maxSites: 10, officialCheck: true,freeTier: "1,000 free API credits every month.", keyURL: "https://app.tavily.com/home"},- Brave: {name: "Brave Search", commands: []string{CommandSearch}, filters: []string{FilterRecency, FilterSite},+ Brave: {name: "Brave Search", description: "Enterprise-grade web search API with an index of 40+ billion pages.",+ commands: []string{CommandSearch}, filters: []string{FilterRecency, FilterSite},maxLimit: 20, maxSites: 1,freeTier: "$5 of free credit every month; sign-up needs a credit card.", keyURL: "https://api-dashboard.search.brave.com/app/keys"},- Firecrawl: {name: "Firecrawl", commands: []string{CommandSearch, CommandOpen}, filters: []string{FilterRecency},+ Firecrawl: {name: "Firecrawl", description: "Web data API for AI agents.",+ commands: []string{CommandSearch, CommandOpen}, filters: []string{FilterRecency},maxLimit: 20, officialCheck: true,freeTier: "1,000 free credits every month.", keyURL: "https://www.firecrawl.dev/app/api-keys"},- You: {name: "You.com", commands: []string{CommandSearch, CommandOpen}, filters: []string{FilterRecency},+ Exa: {name: "Exa", description: "Search API for AI agents that need real-time web data.",+ commands: []string{CommandSearch, CommandOpen}, filters: []string{FilterRecency, FilterSite},+ maxLimit: 20, maxSites: 10,+ freeTier: "$10 of free credit every month; no card needed.", keyURL: "https://dashboard.exa.ai/api-keys"},+ You: {name: "You.com", description: "Web search API for AI agents and LLMs.",+ commands: []string{CommandSearch, CommandOpen}, filters: []string{FilterRecency},maxLimit: 20, keyless: true, officialCheck: true,freeTier: "Works without a key, limited; a key gives full quality and higher limits.", keyURL: "https://you.com/platform"},// DuckDuckGo's results page holds about ten results and takes one site.- DuckDuckGo: {name: "DuckDuckGo", commands: []string{CommandSearch}, filters: []string{FilterRecency, FilterSite},+ DuckDuckGo: {name: "DuckDuckGo", description: "Private search from the Internet privacy company.",+ commands: []string{CommandSearch}, filters: []string{FilterRecency, FilterSite},maxLimit: 10, maxSites: 1, keyless: true},- Direct: {name: "Direct", commands: []string{CommandOpen}, keyless: true},+ Direct: {name: "Direct", description: "Reads pages from the Agent's own computer.",+ commands: []string{CommandOpen}, keyless: true},}// The free tier lines; TeamHub counts nothing for either.@@ -227,6 +241,7 @@ type Quota struct {type BackendView struct {ID Backend `json:"id"`Name string `json:"name"`+ Description string `json:"description"`Tier string `json:"tier"`TierText string `json:"tier_text,omitempty"`Commands []string `json:"commands"`@@ -410,7 +425,7 @@ func (s *Service) List(ctx context.Context, withQuota bool) (List, error) {views[i].Quota = Quota{}continue}- if !ring.usable(b) || b == Brave {+ if !ring.usable(b) || !definitions[b].officialCheck {continue}wg.Add(1)@@ -431,7 +446,7 @@ func (s *Service) List(ctx context.Context, withQuota bool) (List, error) {func (s *Service) view(ring keyring, b Backend) BackendView {def := definitions[b]view := BackendView{- ID: b, Name: def.name, Tier: TierKey, Commands: def.commands, Filters: def.filters,+ ID: b, Name: def.name, Description: def.description, Tier: TierKey, Commands: def.commands, Filters: def.filters,MaxLimit: def.maxLimit, MaxSites: def.maxSites, Keyless: def.keyless, OfficialKeyCheck: def.officialCheck,FreeTier: def.freeTier, KeyURL: def.keyURL, Status: ring.status(b), KeyState: "none",Quota: Quota{From: "unavailable", Reason: "no_key"},@@ -453,6 +468,8 @@ func (s *Service) view(ring keyring, b Backend) BackendView {view.Quota.Reason = "key_rejected"case b == Brave && ring.usable(Brave):view.Quota = braveStoredQuota(ring[Brave].row)+ case ring.usable(b) && !def.officialCheck:+ view.Quota.Reason = "not_reported"}return view}diff --git a/apps/teamhub/internal/websearch/websearch_test.go b/apps/teamhub/internal/websearch/websearch_test.goindex 62237917..669ff50e 100644--- a/apps/teamhub/internal/websearch/websearch_test.go+++ b/apps/teamhub/internal/websearch/websearch_test.go@@ -155,7 +155,7 @@ func newFakeProviders(t *testing.T, handle func(w http.ResponseWriter, r seen))func (f *fakeProviders) endpoints() Endpoints {return Endpoints{Tavily: f.server.URL + "/tavily", Brave: f.server.URL + "/brave", Firecrawl: f.server.URL + "/firecrawl",YouAPI: f.server.URL + "/youapi", YouIndex: f.server.URL + "/youindex", YouMCP: f.server.URL + "/mcp/free",- DuckDuckGo: f.server.URL + "/ddg", Client: f.server.Client()}+ DuckDuckGo: f.server.URL + "/ddg", Exa: f.server.URL + "/exa", Client: f.server.Client()}}func (f *fakeProviders) seen() []seen {@@ -644,7 +644,7 @@ func TestListReportsTiersStatesAndLiveQuota(t *testing.T) {saveRaw(t, s, keys, Tavily, "provider-secret", "rejected")saveRaw(t, s, keys, Brave, "provider-secret", "unverified")list, err := s.List(t.Context(), true)- if err != nil || list.DefaultSearch != Brave || list.DefaultOpen != Direct || !list.CanSaveKeys || len(list.Backends) != 6 {+ if err != nil || list.DefaultSearch != Brave || list.DefaultOpen != Direct || !list.CanSaveKeys || len(list.Backends) != 7 {t.Fatalf("List = %+v, %v", list, err)}byID := map[Backend]BackendView{}@@ -690,7 +690,7 @@ func TestListWithoutQuotaCallsNoProvider(t *testing.T) {saveRaw(t, s, keys, You, "provider-secret", "verified")saveRaw(t, s, keys, Tavily, "provider-secret", "verified")list, err := s.List(t.Context(), false)- if err != nil || len(list.Backends) != 6 || len(fake.seen()) != 0 {+ if err != nil || len(list.Backends) != 7 || len(fake.seen()) != 0 {t.Fatalf("List = %+v, %v, calls %d", list, err, len(fake.seen()))}for _, view := range list.Backends {diff --git a/apps/teamhub/migrations/00885_web_search.sql b/apps/teamhub/migrations/00885_web_search.sqlindex a438ae09..2d1b703b 100644--- a/apps/teamhub/migrations/00885_web_search.sql+++ b/apps/teamhub/migrations/00885_web_search.sql@@ -4,12 +4,12 @@-- Human and Agent on the deployment, and TeamHub reads the row at each call,-- so a save applies on every replica at once. state is what the provider last-- said about the key: verified by its official check or a successful call,--- unverified while a provider without an official check (Brave) has answered+-- unverified while a provider without an official check (Brave, Exa) has answered-- no call yet, rejected once it refused the key. The quota columns keep the-- last rate-limit headers of a provider that reports quota only on its-- responses; a save clears them.CREATE TABLE web_search_keys (- backend text PRIMARY KEY CHECK (backend IN ('you', 'tavily', 'brave', 'firecrawl')),+ backend text PRIMARY KEY CHECK (backend IN ('you', 'tavily', 'brave', 'firecrawl', 'exa')),api_key_ciphertext bytea NOT NULL,state text NOT NULL CHECK (state IN ('verified', 'unverified', 'rejected')),quota_remaining double precision,@@ -23,7 +23,7 @@ CREATE TABLE web_search_keys (-- row or a value, a search uses the first usable backend in TeamHub's order.CREATE TABLE web_search_settings (singleton boolean PRIMARY KEY DEFAULT true CHECK (singleton),- default_backend text CHECK (default_backend IN ('you', 'tavily', 'brave', 'firecrawl')),+ default_backend text CHECK (default_backend IN ('you', 'tavily', 'brave', 'firecrawl', 'exa', 'duckduckgo')),updated_at timestamp with time zone DEFAULT now() NOT NULL);diff --git a/apps/teamhub/tests/integration/web_search_test.go b/apps/teamhub/tests/integration/web_search_test.goindex 968eed17..705afdc1 100644--- a/apps/teamhub/tests/integration/web_search_test.go+++ b/apps/teamhub/tests/integration/web_search_test.go@@ -119,8 +119,8 @@ func TestWebSearchAsksForAKeyAndReplaysTheSearchWithIt(t *testing.T) {code, _, listed := env.request(alice, http.MethodGet, "/v0/web-search/backends", nil, "")var list websearch.Listdecode(t, listed, &list)- if code != http.StatusOK || list.DefaultSearch != websearch.DuckDuckGo || !list.CanSaveKeys || len(list.Backends) != 6 ||- list.Backends[3].ID != websearch.You || list.Backends[3].Tier != websearch.TierFree {+ if code != http.StatusOK || list.DefaultSearch != websearch.DuckDuckGo || !list.CanSaveKeys || len(list.Backends) != 7 ||+ list.Backends[4].ID != websearch.You || list.Backends[4].Tier != websearch.TierFree {t.Fatalf("backends: %d %s", code, listed)}code, _, listed = env.request(alice, http.MethodGet, "/v0/web-search/backends?include_quota=false", nil, "")@@ -150,7 +150,7 @@ func TestWebSearchAsksForAKeyAndReplaysTheSearchWithIt(t *testing.T) {t.Fatalf("key from the card: %d %s", code, body)}assertBrowserCardHandoff(t, env, cardID, cardMessage, "answered", `"backend": "brave"`,- `The user added a Brave Search key. Results of your search for "rust releases" are in the payload below`)+ `The user added a Brave Search API key. Results of your search for "rust releases" are in the payload below`)assertBrowserCardHandoff(t, env, cardID, cardMessage, "answered", `"decision": "configured"`, `"url":"https://rust.example/news"`)status, body = search(map[string]any{"query": "rust", "backend": "tavily"})@@ -172,4 +172,14 @@ func TestWebSearchAsksForAKeyAndReplaysTheSearchWithIt(t *testing.T) {if status, body = search(map[string]any{"query": "rust", "backend": "brave", "sites": []string{"a.example", "b.example"}}); status != http.StatusBadRequest {t.Fatalf("two sites on Brave: %d %s", status, body)}++ // The keyless DuckDuckGo can be the chosen default, and an Exa key, which+ // Exa has no endpoint to check, is saved unverified without a call.+ code, _, chosen := env.request(alice, http.MethodPut, "/v0/web-search/default", map[string]any{"backend": "duckduckgo"}, "")+ if code != http.StatusOK || !strings.Contains(string(chosen), `"chosen_default_search":"duckduckgo"`) {+ t.Fatalf("DuckDuckGo as the default: %d %s", code, chosen)+ }+ if code, body := saveKey("exa", "exa-key", ""); code != http.StatusOK || !strings.Contains(string(body), `"key_state":"unverified"`) {+ t.Fatalf("Exa key from Connectors: %d %s", code, body)+ }}diff --git a/apps/web/src/features/apps/web-search-connectors.test.tsx b/apps/web/src/features/apps/web-search-connectors.test.tsxindex 876f485c..591b9bf2 100644--- a/apps/web/src/features/apps/web-search-connectors.test.tsx+++ b/apps/web/src/features/apps/web-search-connectors.test.tsx@@ -26,21 +26,28 @@ describe("Web search connectors", () => {"Tavily","Brave Search","Firecrawl",+ "Exa","DuckDuckGo",]);- expect(card(section, "DuckDuckGo")).toHaveTextContent("Default");+ // Like an app card: the free tiers show a status line, a backend that+ // needs a key shows the provider's description and Connect.expect(card(section, "DuckDuckGo")).toHaveTextContent(- "Search · No key needed",+ "DuckDuckGoDefaultFree, limited",);- expect(card(section, "DuckDuckGo")).toHaveTextContent("Free, limited");+ expect(+ within(card(section, "DuckDuckGo")).queryByRole("button", {+ name: "Connect DuckDuckGo",+ }),+ ).toBeNull();// You.com works without a key and still takes one.expect(card(section, "You.com")).toHaveTextContent("Free, limited");- expect(card(section, "You.com")).toHaveTextContent(- "Search · 100 searches a day without a key",- );- expect(card(section, "Tavily")).toHaveTextContent("Not set");+ expect(+ within(card(section, "You.com")).getByRole("button", {+ name: "Connect You.com",+ }),+ ).toBeVisible();expect(card(section, "Tavily")).toHaveTextContent(- "Search · Read pages · 1,000 credits a month",+ "The real-time search engine for AI agents.",);fireEvent.click(@@ -52,9 +59,14 @@ describe("Web search connectors", () => {screen.queryByRole("region", { name: "Application connections" }),).toBeNull();expect(screen.queryByRole("heading", { level: 2 })).toBeNull();- expect(- cardNames(screen.getByRole("region", { name: "Web search" })),- ).toHaveLength(5);+ const searchOnly = screen.getByRole("region", { name: "Web search" });+ expect(cardNames(searchOnly)).toHaveLength(6);+ fireEvent.click(+ within(card(searchOnly, "Exa")).getByRole("button", {+ name: "Connect Exa",+ }),+ );+ expect(await screen.findByRole("dialog", { name: "Exa" })).toBeVisible();});it("shows each provider's live quota on its card", async () => {@@ -91,9 +103,8 @@ describe("Web search connectors", () => {const section = await screen.findByRole("region", { name: "Web search" });expect(card(section, "Tavily")).toHaveTextContent(- "812 / 1,000 credits left",+ "Connected · 812 / 1,000 credits left",);- expect(card(section, "Tavily")).toHaveTextContent("Active");expect(card(section, "Brave Search")).toHaveTextContent("986 / 1,000 requests left, as of the last search 2 hours ago",);@@ -136,8 +147,9 @@ describe("Web search connectors", () => {fireEvent.click(within(section).getByRole("button", { name: "Tavily" }));const dialog = await screen.findByRole("dialog", { name: "Tavily" });expect(dialog).toHaveTextContent(- "Searches the web and reads pages for your Agents.",+ "The real-time search engine for AI agents.",);+ expect(dialog).toHaveTextContent("DoesSearches the web and reads pages");expect(within(dialog).getByRole("link", { name: /app\.tavily\.com\/home/ }),).toHaveAttribute("href", "https://app.tavily.com/home");@@ -160,9 +172,8 @@ describe("Web search connectors", () => {within(dialog).getByRole("button", { name: "Make default" }),).toBeVisible();expect(card(section, "Tavily")).toHaveTextContent(- "1,000 / 1,000 credits left",+ "Connected · 1,000 / 1,000 credits left",);- expect(card(section, "Tavily")).toHaveTextContent("Active");expect(composioKey).not.toHaveBeenCalled();expect(screen.queryByRole("dialog", { name: /Connect/ }),@@ -225,7 +236,11 @@ describe("Web search connectors", () => {"clear default","remove tavily",]);- expect(card(section, "Tavily")).toHaveTextContent("Not set");+ expect(+ within(card(section, "Tavily")).getByRole("button", {+ name: "Connect Tavily",+ }),+ ).toBeVisible();});it("keeps backends with a saved key or a free tier under Connected only", async () => {diff --git a/apps/web/src/features/apps/web-search-connectors.tsx b/apps/web/src/features/apps/web-search-connectors.tsxindex b2540b42..15b2bb87 100644--- a/apps/web/src/features/apps/web-search-connectors.tsx+++ b/apps/web/src/features/apps/web-search-connectors.tsx@@ -9,7 +9,6 @@ import { useState } from "react";import { Button } from "@/components/ui/button";import { Icon } from "@/components/ui/icon";import { ModalDialog } from "@/components/ui/modal-dialog";-import { StatusPill } from "@/components/ui/status-pill";import { teamHubData, teamHubDone } from "@/features/teamhub/teamhub-api";import { useTeamHubRuntime } from "@/features/teamhub/teamhub-runtime";import type {@@ -20,7 +19,6 @@ import type {} from "@/features/teamhub/teamhub-types";import {isWebSearchKeyBackend,- webSearchBackendSummary,webSearchQueryKey,} from "@/features/web-search/web-search-backends";import { WebSearchKeyForm } from "@/features/web-search/web-search-key-form";@@ -130,6 +128,11 @@ export function WebSearchSection({);}+/**+ * A backend card in the app cards' shape: the provider's own description+ * until it is usable, then a status dot and line, and Connect while a key+ * can still be added.+ */function WebSearchBackendCard({backend,isDefault,@@ -139,10 +142,13 @@ function WebSearchBackendCard({isDefault: boolean;onOpen: () => void;}) {- const status = backendStatus(backend);- const line = usageLine(backend) ?? webSearchBackendSummary(backend);+ const state = connectionState(backend);+ const line = state?.label ?? backend.description;+ const canConnect =+ isWebSearchKeyBackend(backend) &&+ (backend.key_state === "none" || state?.tone === "danger");return (- <article className="flex items-center gap-3 rounded-xl border border-border bg-card px-4 py-3 transition-colors duration-150 hover:bg-accent/40 motion-reduce:transition-none">+ <article className="flex flex-wrap items-center gap-x-3 gap-y-2 rounded-xl border border-border bg-card px-4 py-3 transition-colors duration-150 hover:bg-accent/40 motion-reduce:transition-none"><buttonaria-label={backend.name}className="flex min-w-0 flex-1 items-center gap-3 rounded-md text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"@@ -161,15 +167,35 @@ function WebSearchBackendCard({</span>) : null}</span>- <span- className="mt-0.5 block truncate text-xs text-muted-foreground"- title={line}- >- {line}+ <span className="mt-0.5 flex min-w-0 items-center gap-1.5 text-xs text-muted-foreground">+ {state ? (+ <span+ aria-hidden+ className={cn(+ "size-1.5 shrink-0 rounded-full",+ state.tone === "danger"+ ? "bg-[var(--app-status-danger-text)]"+ : "bg-[var(--app-status-success-text)]",+ )}+ />+ ) : null}+ <span className="truncate" title={line}>+ {line}+ </span></span></span></button>- <StatusPill tone={status.tone}>{status.label}</StatusPill>+ {canConnect ? (+ <Button+ aria-label={`Connect ${backend.name}`}+ className="px-2.5"+ onClick={onOpen}+ size="compact"+ tone="secondary"+ >+ Connect+ </Button>+ ) : null}</article>);}@@ -188,13 +214,18 @@ function WebSearchBackendDialog({<ModalDialogclassName="app-key-dialog"closeOnBackdrop- description={backendDescription(backend)}+ description={backend.description}onClose={onClose}size="md"title={backend.name}><div className="space-y-5 px-5 py-5 text-sm text-app-body"><dl className="grid grid-cols-[auto_1fr] gap-x-4 gap-y-1.5">+ <Fact label="Does">+ {backend.commands.includes("open")+ ? "Searches the web and reads pages"+ : "Searches the web"}+ </Fact>{backend.free_tier ? (<Fact label="Free tier">{backend.free_tier}</Fact>) : null}@@ -349,22 +380,25 @@ function BackendLogoTile({ backend }: { backend: TeamHubWebSearchBackend }) {);}-function backendStatus(backend: TeamHubWebSearchBackend): {- label: string;- tone: "danger" | "neutral" | "success";-} {+/**+ * The status line of a backend that has a key or a free tier; null for one+ * that still needs a key, whose card shows its description.+ */+function connectionState(+ backend: TeamHubWebSearchBackend,+): { label: string; tone: "danger" | "success" } | null {if (backend.key_state === "rejected" || backend.status === "key_rejected")return { label: "Key rejected", tone: "danger" };- if (backend.key_state !== "none") return { label: "Active", tone: "success" };+ if (backend.key_state !== "none") {+ const usage = usageLine(backend);+ return {+ label: usage ? `Connected · ${usage}` : "Connected",+ tone: "success",+ };+ }if (backend.tier === "free")return { label: "Free, limited", tone: "success" };- return { label: "Not set", tone: "neutral" };-}--function backendDescription(backend: TeamHubWebSearchBackend): string {- return backend.commands.includes("open")- ? "Searches the web and reads pages for your Agents."- : "Searches the web for your Agents.";+ return null;}function savedKeyText(backend: TeamHubWebSearchBackend): string {diff --git a/apps/web/src/features/rooms/cards/decision-search-key-view.test.tsx b/apps/web/src/features/rooms/cards/decision-search-key-view.test.tsxindex 1595d69c..c11297d7 100644--- a/apps/web/src/features/rooms/cards/decision-search-key-view.test.tsx+++ b/apps/web/src/features/rooms/cards/decision-search-key-view.test.tsx@@ -77,7 +77,7 @@ describe("Web search key card", () => {expect(within(box).getByText("Requested")).toBeVisible();expect(await within(box).findByText(- "Search · Read pages · 1,000 credits a month",+ "The real-time search engine for AI agents.",),).toBeVisible();expect(@@ -113,7 +113,7 @@ describe("Web search key card", () => {const box = await findBox();expect(within(box).getByText("Suggested")).toBeVisible();const toggle = await within(box).findByRole("button", {- name: "Other providers (3)",+ name: "Other providers (4)",});expect(toggle).toHaveAttribute("aria-expanded", "false");expect(within(box).queryByLabelText("Brave Search API key")).toBeNull();@@ -128,7 +128,7 @@ describe("Web search key card", () => {within(others).getAllByRole("listitem").map((item) => within(item).getByRole("button", { name: "Save key" })),- ).toHaveLength(3);+ ).toHaveLength(4);const you = within(others).getByText("You.com").closest("li")!;expect(you).toHaveTextContent("Free, limited");expect(within(others).queryByText("DuckDuckGo")).toBeNull();@@ -156,7 +156,7 @@ describe("Web search key card", () => {);const box = await findBox();fireEvent.click(- await within(box).findByRole("button", { name: "Other providers (3)" }),+ await within(box).findByRole("button", { name: "Other providers (4)" }),);const brave = within(box).getByText("Brave Search").closest("li")!;fireEvent.change(within(brave).getByLabelText("Brave Search API key"), {diff --git a/apps/web/src/features/rooms/cards/decision-search-key-view.tsx b/apps/web/src/features/rooms/cards/decision-search-key-view.tsxindex 0f607357..7a23c6fb 100644--- a/apps/web/src/features/rooms/cards/decision-search-key-view.tsx+++ b/apps/web/src/features/rooms/cards/decision-search-key-view.tsx@@ -20,7 +20,6 @@ import {isWebSearchKeyBackend,webSearchBackendInfoQueryOptions,webSearchBackendName,- webSearchBackendSummary,} from "@/features/web-search/web-search-backends";import {WebSearchKeyForm,@@ -108,7 +107,7 @@ export function SearchKeyDecision({return (<CardBox heading={card.title} label={label}><CardRow- detail={shown ? webSearchBackendSummary(shown) : undefined}+ detail={shown?.description}icon={<AppLogoTile name={target.name} url={webSearchBackendLogo(shownID)} />}@@ -226,7 +225,7 @@ function OtherProviders({) : null}</p><p className="truncate text-xs text-app-muted">- {webSearchBackendSummary(backend)}+ {backend.description}</p></div></div>diff --git a/apps/web/src/features/web-search/logos/exa.svg b/apps/web/src/features/web-search/logos/exa.svgnew file mode 100644index 00000000..6118166d--- /dev/null+++ b/apps/web/src/features/web-search/logos/exa.svg@@ -0,0 +1,260 @@+<?xml version="1.0" encoding="UTF-8" standalone="no"?>+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">+<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0.00 0.00 256.00 256.00" width="128" height="128">+<g stroke-width="2.00" fill="none" stroke-linecap="butt">+<path stroke="#8fa0f6" vector-effect="non-scaling-stroke" d="+ M 66.37 205.00+ C 66.27 206.60 68.32 207.77 69.68 207.82+ Q 75.04 208.03 83.01 208.10+ Q 116.20 208.41 169.00 208.49+ Q 176.68 208.50 182.51 207.77+ Q 184.80 207.48 186.76 206.42+ A 1.49 1.47 -3.2 0 0 187.42 205.69+ C 189.35 201.05 184.68 192.72 181.82 188.93+ Q 151.97 149.36 140.35 134.65+ Q 135.48 128.48 140.29 122.28+ Q 157.32 100.38 181.85 67.92+ C 185.63 62.91 187.50 58.99 187.99 53.22+ A 2.41 2.41 0.0 0 0 186.99 51.05+ C 184.38 49.21 178.64 48.69 175.75 48.72+ Q 132.25 49.17 88.95 48.79+ C 82.62 48.74 77.51 49.23 71.15 49.57+ Q 66.36 49.83 66.73 54.74+ Q 67.13 60.00 66.92 74.24+ Q 66.82 81.56 66.85 93.75+ Q 66.92 118.82 66.85 160.19+ C 66.82 175.83 67.36 188.94 66.37 205.00"+/>+<path stroke="#8fa0f6" vector-effect="non-scaling-stroke" d="+ M 91.68 59.97+ A 1.36 1.36 0.0 0 0 90.09 61.17+ C 89.62 65.90 91.31 68.43 94.49 72.76+ C 96.57 75.58 101.17 80.94 103.99 84.95+ Q 110.89 94.76 115.16 100.14+ C 118.40 104.21 122.30 110.82 124.10 113.91+ A 2.10 2.10 0.0 0 0 126.70 114.79+ Q 132.14 112.58 135.55 107.55+ Q 146.13 91.96 157.88 76.95+ C 161.55 72.26 165.79 66.33 166.13 60.61+ A 0.92 0.91 -2.3 0 0 165.08 59.65+ C 161.19 60.21 157.89 60.57 153.63 60.62+ Q 116.65 61.01 100.95 60.84+ Q 96.23 60.79 91.68 59.97"+/>+<path stroke="#8fa0f6" vector-effect="non-scaling-stroke" d="+ M 84.82 78.85+ A 1.57 1.57 0.0 0 0 82.93 79.69+ Q 81.62 82.55 81.18 86.33+ C 80.35 93.52 81.20 104.82 80.88 114.25+ C 80.76 117.79 80.92 123.25 85.76 122.86+ Q 97.99 121.87 110.69 122.42+ A 1.04 1.04 0.0 0 0 111.77 121.46+ C 112.02 118.25 111.08 116.60 108.95 113.91+ Q 96.31 97.95 93.45 93.55+ Q 89.95 88.16 85.08 79.17+ Q 84.93 78.88 84.82 78.85"+/>+<path stroke="#8fa0f6" vector-effect="non-scaling-stroke" d="+ M 84.95 178.25+ Q 85.06 178.22 85.21 177.93+ Q 89.99 168.96 93.44 163.57+ Q 96.25 159.18 108.72 143.23+ C 110.82 140.54 111.74 138.89 111.47 135.70+ A 1.04 1.04 0.0 0 0 110.39 134.75+ Q 97.77 135.38 85.60 134.48+ C 80.78 134.12 80.66 139.55 80.80 143.07+ C 81.18 152.45 80.41 163.69 81.28 170.83+ Q 81.75 174.59 83.07 177.42+ A 1.56 1.56 0.0 0 0 84.95 178.25"+/>+<path stroke="#8fa0f6" vector-effect="non-scaling-stroke" d="+ M 89.58 195.49+ A 1.46 1.46 0.0 0 0 91.31 196.94+ Q 94.07 196.42 95.75 196.39+ Q 116.28 196.03 158.75 196.30+ Q 161.62 196.32 165.15 197.19+ A 1.02 1.02 0.0 0 0 166.42 196.22+ C 166.49 192.70 163.51 187.80 161.43 185.05+ Q 147.74 167.01 133.98 147.70+ C 132.29 145.33 130.73 143.77 128.19 142.94+ A 3.38 3.37 -57.5 0 0 124.80 143.70+ Q 123.67 144.77 122.29 146.75+ Q 117.27 153.94 115.83 155.84+ C 107.32 167.03 101.16 176.45 92.04 187.02+ A 4.68 4.52 78.7 0 0 91.39 188.03+ Q 89.62 191.84 89.58 195.49"+/>+</g>+<path fill="#1f40ed" d="+ M 256.00 0.00+ L 256.00 256.00+ L 0.00 256.00+ L 0.00 0.00+ L 256.00 0.00+ Z+ M 66.37 205.00+ C 66.27 206.60 68.32 207.77 69.68 207.82+ Q 75.04 208.03 83.01 208.10+ Q 116.20 208.41 169.00 208.49+ Q 176.68 208.50 182.51 207.77+ Q 184.80 207.48 186.76 206.42+ A 1.49 1.47 -3.2 0 0 187.42 205.69+ C 189.35 201.05 184.68 192.72 181.82 188.93+ Q 151.97 149.36 140.35 134.65+ Q 135.48 128.48 140.29 122.28+ Q 157.32 100.38 181.85 67.92+ C 185.63 62.91 187.50 58.99 187.99 53.22+ A 2.41 2.41 0.0 0 0 186.99 51.05+ C 184.38 49.21 178.64 48.69 175.75 48.72+ Q 132.25 49.17 88.95 48.79+ C 82.62 48.74 77.51 49.23 71.15 49.57+ Q 66.36 49.83 66.73 54.74+ Q 67.13 60.00 66.92 74.24+ Q 66.82 81.56 66.85 93.75+ Q 66.92 118.82 66.85 160.19+ C 66.82 175.83 67.36 188.94 66.37 205.00+ Z"+/>+<path fill="#ffffff" d="+ M 69.68 207.82+ C 68.32 207.77 66.27 206.60 66.37 205.00+ C 67.36 188.94 66.82 175.83 66.85 160.19+ Q 66.92 118.82 66.85 93.75+ Q 66.82 81.56 66.92 74.24+ Q 67.13 60.00 66.73 54.74+ Q 66.36 49.83 71.15 49.57+ C 77.51 49.23 82.62 48.74 88.95 48.79+ Q 132.25 49.17 175.75 48.72+ C 178.64 48.69 184.38 49.21 186.99 51.05+ A 2.41 2.41 0.0 0 1 187.99 53.22+ C 187.50 58.99 185.63 62.91 181.85 67.92+ Q 157.32 100.38 140.29 122.28+ Q 135.48 128.48 140.35 134.65+ Q 151.97 149.36 181.82 188.93+ C 184.68 192.72 189.35 201.05 187.42 205.69+ A 1.49 1.47 -3.2 0 1 186.76 206.42+ Q 184.80 207.48 182.51 207.77+ Q 176.68 208.50 169.00 208.49+ Q 116.20 208.41 83.01 208.10+ Q 75.04 208.03 69.68 207.82+ Z+ M 91.68 59.97+ A 1.36 1.36 0.0 0 0 90.09 61.17+ C 89.62 65.90 91.31 68.43 94.49 72.76+ C 96.57 75.58 101.17 80.94 103.99 84.95+ Q 110.89 94.76 115.16 100.14+ C 118.40 104.21 122.30 110.82 124.10 113.91+ A 2.10 2.10 0.0 0 0 126.70 114.79+ Q 132.14 112.58 135.55 107.55+ Q 146.13 91.96 157.88 76.95+ C 161.55 72.26 165.79 66.33 166.13 60.61+ A 0.92 0.91 -2.3 0 0 165.08 59.65+ C 161.19 60.21 157.89 60.57 153.63 60.62+ Q 116.65 61.01 100.95 60.84+ Q 96.23 60.79 91.68 59.97+ Z+ M 84.82 78.85+ A 1.57 1.57 0.0 0 0 82.93 79.69+ Q 81.62 82.55 81.18 86.33+ C 80.35 93.52 81.20 104.82 80.88 114.25+ C 80.76 117.79 80.92 123.25 85.76 122.86+ Q 97.99 121.87 110.69 122.42+ A 1.04 1.04 0.0 0 0 111.77 121.46+ C 112.02 118.25 111.08 116.60 108.95 113.91+ Q 96.31 97.95 93.45 93.55+ Q 89.95 88.16 85.08 79.17+ Q 84.93 78.88 84.82 78.85+ Z+ M 84.95 178.25+ Q 85.06 178.22 85.21 177.93+ Q 89.99 168.96 93.44 163.57+ Q 96.25 159.18 108.72 143.23+ C 110.82 140.54 111.74 138.89 111.47 135.70+ A 1.04 1.04 0.0 0 0 110.39 134.75+ Q 97.77 135.38 85.60 134.48+ C 80.78 134.12 80.66 139.55 80.80 143.07+ C 81.18 152.45 80.41 163.69 81.28 170.83+ Q 81.75 174.59 83.07 177.42+ A 1.56 1.56 0.0 0 0 84.95 178.25+ Z+ M 89.58 195.49+ A 1.46 1.46 0.0 0 0 91.31 196.94+ Q 94.07 196.42 95.75 196.39+ Q 116.28 196.03 158.75 196.30+ Q 161.62 196.32 165.15 197.19+ A 1.02 1.02 0.0 0 0 166.42 196.22+ C 166.49 192.70 163.51 187.80 161.43 185.05+ Q 147.74 167.01 133.98 147.70+ C 132.29 145.33 130.73 143.77 128.19 142.94+ A 3.38 3.37 -57.5 0 0 124.80 143.70+ Q 123.67 144.77 122.29 146.75+ Q 117.27 153.94 115.83 155.84+ C 107.32 167.03 101.16 176.45 92.04 187.02+ A 4.68 4.52 78.7 0 0 91.39 188.03+ Q 89.62 191.84 89.58 195.49+ Z"+/>+<path fill="#1f40ed" d="+ M 91.68 59.97+ Q 96.23 60.79 100.95 60.84+ Q 116.65 61.01 153.63 60.62+ C 157.89 60.57 161.19 60.21 165.08 59.65+ A 0.92 0.91 -2.3 0 1 166.13 60.61+ C 165.79 66.33 161.55 72.26 157.88 76.95+ Q 146.13 91.96 135.55 107.55+ Q 132.14 112.58 126.70 114.79+ A 2.10 2.10 0.0 0 1 124.10 113.91+ C 122.30 110.82 118.40 104.21 115.16 100.14+ Q 110.89 94.76 103.99 84.95+ C 101.17 80.94 96.57 75.58 94.49 72.76+ C 91.31 68.43 89.62 65.90 90.09 61.17+ A 1.36 1.36 0.0 0 1 91.68 59.97+ Z"+/>+<path fill="#1f40ed" d="+ M 84.82 78.85+ Q 84.93 78.88 85.08 79.17+ Q 89.95 88.16 93.45 93.55+ Q 96.31 97.95 108.95 113.91+ C 111.08 116.60 112.02 118.25 111.77 121.46+ A 1.04 1.04 0.0 0 1 110.69 122.42+ Q 97.99 121.87 85.76 122.86+ C 80.92 123.25 80.76 117.79 80.88 114.25+ C 81.20 104.82 80.35 93.52 81.18 86.33+ Q 81.62 82.55 82.93 79.69+ A 1.57 1.57 0.0 0 1 84.82 78.85+ Z"+/>+<path fill="#1f40ed" d="+ M 84.95 178.25+ A 1.56 1.56 0.0 0 1 83.07 177.42+ Q 81.75 174.59 81.28 170.83+ C 80.41 163.69 81.18 152.45 80.80 143.07+ C 80.66 139.55 80.78 134.12 85.60 134.48+ Q 97.77 135.38 110.39 134.75+ A 1.04 1.04 0.0 0 1 111.47 135.70+ C 111.74 138.89 110.82 140.54 108.72 143.23+ Q 96.25 159.18 93.44 163.57+ Q 89.99 168.96 85.21 177.93+ Q 85.06 178.22 84.95 178.25+ Z"+/>+<path fill="#1f40ed" d="+ M 89.58 195.49+ Q 89.62 191.84 91.39 188.03+ A 4.68 4.52 78.7 0 1 92.04 187.02+ C 101.16 176.45 107.32 167.03 115.83 155.84+ Q 117.27 153.94 122.29 146.75+ Q 123.67 144.77 124.80 143.70+ A 3.38 3.37 -57.5 0 1 128.19 142.94+ C 130.73 143.77 132.29 145.33 133.98 147.70+ Q 147.74 167.01 161.43 185.05+ C 163.51 187.80 166.49 192.70 166.42 196.22+ A 1.02 1.02 0.0 0 1 165.15 197.19+ Q 161.62 196.32 158.75 196.30+ Q 116.28 196.03 95.75 196.39+ Q 94.07 196.42 91.31 196.94+ A 1.46 1.46 0.0 0 1 89.58 195.49+ Z"+/>+</svg>\ No newline at end of filediff --git a/apps/web/src/features/web-search/web-search-backends.ts b/apps/web/src/features/web-search/web-search-backends.tsindex 14825baa..d838649e 100644--- a/apps/web/src/features/web-search/web-search-backends.ts+++ b/apps/web/src/features/web-search/web-search-backends.ts@@ -2,10 +2,7 @@ import { queryOptions } from "@tanstack/react-query";import { teamHubData } from "@/features/teamhub/teamhub-api";import type { TeamHubClient } from "@/features/teamhub/teamhub-client";-import type {- TeamHubWebSearchBackend,- TeamHubWebSearchKeyBackend,-} from "@/features/teamhub/teamhub-types";+import type { TeamHubWebSearchKeyBackend } from "@/features/teamhub/teamhub-types";/** Every web search query; a saved key or default refreshes all of them. */export const webSearchQueryKey = ["teamhub", "web-search"] as const;@@ -43,6 +40,7 @@ export function webSearchBackendInfoQueryOptions(client: TeamHubClient) {const names: Record<TeamHubWebSearchKeyBackend, string> = {brave: "Brave Search",+ exa: "Exa",firecrawl: "Firecrawl",tavily: "Tavily",you: "You.com",@@ -63,24 +61,6 @@ export function isWebSearchKeyBackend<T extends { id: string }>(return backend.id in names;}-/**- * What the backend does and, after it, its free allowance; a backend that- * never takes a key says none is needed.- */-export function webSearchBackendSummary(- backend: TeamHubWebSearchBackend,-): string {- const commands = backend.commands.map((command) =>- command === "search" ? "Search" : "Read pages",- );- const allowance = isWebSearchKeyBackend(backend)- ? backend.free_tier- : backend.tier === "free"- ? "No key needed"- : undefined;- return [...commands, allowance].filter(Boolean).join(" · ");-}-/** The key page as a short label: host and path without `www.`. */export function webSearchKeySite(keyURL: string): string {const url = new URL(keyURL);diff --git a/apps/web/src/features/web-search/web-search-logos.ts b/apps/web/src/features/web-search/web-search-logos.tsindex 6c5eb21c..baf4468e 100644--- a/apps/web/src/features/web-search/web-search-logos.ts+++ b/apps/web/src/features/web-search/web-search-logos.ts@@ -2,6 +2,7 @@ import type { TeamHubWebSearchSearchBackend } from "@/features/teamhub/teamhub-timport braveLogo from "./logos/brave.svg";import duckDuckGoLogo from "./logos/duckduckgo.svg";+import exaLogo from "./logos/exa.svg";import firecrawlLogo from "./logos/firecrawl.svg";import tavilyLogo from "./logos/tavily.svg";import youLogo from "./logos/you.svg";@@ -11,6 +12,7 @@ import youLogo from "./logos/you.svg";const logos: Record<TeamHubWebSearchSearchBackend, string> = {brave: braveLogo,duckduckgo: duckDuckGoLogo,+ exa: exaLogo,firecrawl: firecrawlLogo,tavily: tavilyLogo,you: youLogo,diff --git a/apps/web/src/test/teamhub-seed.ts b/apps/web/src/test/teamhub-seed.tsindex 681e032d..169e12c6 100644--- a/apps/web/src/test/teamhub-seed.ts+++ b/apps/web/src/test/teamhub-seed.ts@@ -1753,7 +1753,7 @@ export function createExternalSourceSeed() {* is the default, You.com also works without a key, and direct opens pages.*/export function createWebSearchSeed(): TeamHubWebSearchBackendList {- const keyed: Omit<TeamHubWebSearchBackend, "id" | "name"> = {+ const keyed: Omit<TeamHubWebSearchBackend, "description" | "id" | "name"> = {commands: ["search", "open"],filters: ["recency", "site"],keyless: false,@@ -1771,6 +1771,7 @@ export function createWebSearchSeed(): TeamHubWebSearchBackendList {...keyed,commands: ["search"],free_tier: "100 searches a day without a key",+ description: "Web search API for AI agents and LLMs.",id: "you",key_url: "https://you.com/platform",keyless: true,@@ -1782,6 +1783,7 @@ export function createWebSearchSeed(): TeamHubWebSearchBackendList {},{...keyed,+ description: "The real-time search engine for AI agents.",free_tier: "1,000 credits a month",id: "tavily",key_url: "https://app.tavily.com/home",@@ -1790,6 +1792,7 @@ export function createWebSearchSeed(): TeamHubWebSearchBackendList {{...keyed,commands: ["search"],+ description: "Web search API with an index of 40+ billion pages.",free_tier: "$5 credit a month",id: "brave",key_url: "https://api-dashboard.search.brave.com",@@ -1798,14 +1801,25 @@ export function createWebSearchSeed(): TeamHubWebSearchBackendList {},{...keyed,+ description: "Web data API for AI agents.",free_tier: "1,000 credits a month",id: "firecrawl",key_url: "https://www.firecrawl.dev/app/api-keys",name: "Firecrawl",},+ {+ ...keyed,+ description: "Search API for AI agents that need real-time web data.",+ free_tier: "$10 credit a month",+ id: "exa",+ key_url: "https://dashboard.exa.ai/api-keys",+ name: "Exa",+ official_key_check: false,+ },{...keyed,commands: ["search"],+ description: "Private search from the Internet privacy company.",id: "duckduckgo",keyless: true,max_limit: 10,@@ -1820,6 +1834,7 @@ export function createWebSearchSeed(): TeamHubWebSearchBackendList {{...keyed,commands: ["open"],+ description: "Reads pages from the Agent's own computer.",filters: [],id: "direct",keyless: true,diff --git a/contracts/generated/go/teamhubagentapi/openapi.gen.go b/contracts/generated/go/teamhubagentapi/openapi.gen.goindex a379d5fe..a60fbb1f 100644--- a/contracts/generated/go/teamhubagentapi/openapi.gen.go+++ b/contracts/generated/go/teamhubagentapi/openapi.gen.go@@ -1204,6 +1204,7 @@ func (e WebConnectResponseStatus) Valid() bool {// Defines values for WebOpenRequestBackend.const (+ WebOpenRequestBackendExa WebOpenRequestBackend = "exa"WebOpenRequestBackendFirecrawl WebOpenRequestBackend = "firecrawl"WebOpenRequestBackendTavily WebOpenRequestBackend = "tavily"WebOpenRequestBackendYou WebOpenRequestBackend = "you"@@ -1212,6 +1213,8 @@ const (// Valid indicates whether the value is a known member of the WebOpenRequestBackend enum.func (e WebOpenRequestBackend) Valid() bool {switch e {+ case WebOpenRequestBackendExa:+ return truecase WebOpenRequestBackendFirecrawl:return truecase WebOpenRequestBackendTavily:@@ -1294,6 +1297,7 @@ const (WebSearchBackendIdBrave WebSearchBackendId = "brave"WebSearchBackendIdDirect WebSearchBackendId = "direct"WebSearchBackendIdDuckduckgo WebSearchBackendId = "duckduckgo"+ WebSearchBackendIdExa WebSearchBackendId = "exa"WebSearchBackendIdFirecrawl WebSearchBackendId = "firecrawl"WebSearchBackendIdTavily WebSearchBackendId = "tavily"WebSearchBackendIdYou WebSearchBackendId = "you"@@ -1308,6 +1312,8 @@ func (e WebSearchBackendId) Valid() bool {return truecase WebSearchBackendIdDuckduckgo:return true+ case WebSearchBackendIdExa:+ return truecase WebSearchBackendIdFirecrawl:return truecase WebSearchBackendIdTavily:@@ -1358,6 +1364,7 @@ func (e WebSearchFilter) Valid() bool {// Defines values for WebSearchKeyBackend.const (WebSearchKeyBackendBrave WebSearchKeyBackend = "brave"+ WebSearchKeyBackendExa WebSearchKeyBackend = "exa"WebSearchKeyBackendFirecrawl WebSearchKeyBackend = "firecrawl"WebSearchKeyBackendTavily WebSearchKeyBackend = "tavily"WebSearchKeyBackendYou WebSearchKeyBackend = "you"@@ -1368,6 +1375,8 @@ func (e WebSearchKeyBackend) Valid() bool {switch e {case WebSearchKeyBackendBrave:return true+ case WebSearchKeyBackendExa:+ return truecase WebSearchKeyBackendFirecrawl:return truecase WebSearchKeyBackendTavily:@@ -1476,6 +1485,7 @@ func (e WebSearchRecency) Valid() bool {const (WebSearchSearchBackendBrave WebSearchSearchBackend = "brave"WebSearchSearchBackendDuckduckgo WebSearchSearchBackend = "duckduckgo"+ WebSearchSearchBackendExa WebSearchSearchBackend = "exa"WebSearchSearchBackendFirecrawl WebSearchSearchBackend = "firecrawl"WebSearchSearchBackendTavily WebSearchSearchBackend = "tavily"WebSearchSearchBackendYou WebSearchSearchBackend = "you"@@ -1488,6 +1498,8 @@ func (e WebSearchSearchBackend) Valid() bool {return truecase WebSearchSearchBackendDuckduckgo:return true+ case WebSearchSearchBackendExa:+ return truecase WebSearchSearchBackendFirecrawl:return truecase WebSearchSearchBackendTavily:@@ -3487,6 +3499,9 @@ type WebOpenResponse struct {type WebSearchBackend struct {Commands []WebSearchCommand `json:"commands"`+ // Description The provider's own one-line description of its product.+ Description string `json:"description"`+// Filters The search filters the backend honors; any other is refused before a call.Filters []WebSearchFilter `json:"filters"`@@ -3571,7 +3586,7 @@ type WebSearchQuota struct {ObservedAt *Timestamp `json:"observed_at,omitempty"`Plan *string `json:"plan,omitempty"`- // Reason no_key: no key is saved; not_reported: there is no usage endpoint to read (keyless You.com, direct); not_observed: Brave has answered no call yet; key_rejected: the provider refused the saved key; provider_unavailable: the usage endpoint did not answer in time.+ // Reason no_key: no key is saved; not_reported: there is no usage endpoint to read (keyless You.com, DuckDuckGo, Exa, direct); not_observed: Brave has answered no call yet; key_rejected: the provider refused the saved key; provider_unavailable: the usage endpoint did not answer in time.Reason *WebSearchQuotaReason `json:"reason,omitempty"`Remaining *float32 `json:"remaining,omitempty"`@@ -3583,7 +3598,7 @@ type WebSearchQuota struct {// WebSearchQuotaFrom defines model for WebSearchQuota.From.type WebSearchQuotaFrom string-// WebSearchQuotaReason no_key: no key is saved; not_reported: there is no usage endpoint to read (keyless You.com, direct); not_observed: Brave has answered no call yet; key_rejected: the provider refused the saved key; provider_unavailable: the usage endpoint did not answer in time.+// WebSearchQuotaReason no_key: no key is saved; not_reported: there is no usage endpoint to read (keyless You.com, DuckDuckGo, Exa, direct); not_observed: Brave has answered no call yet; key_rejected: the provider refused the saved key; provider_unavailable: the usage endpoint did not answer in time.type WebSearchQuotaReason string// WebSearchQuotaUnit defines model for WebSearchQuota.Unit.diff --git a/contracts/generated/go/teamhubpublic/openapi.gen.go b/contracts/generated/go/teamhubpublic/openapi.gen.goindex cf64b81d..c7746f8c 100644--- a/contracts/generated/go/teamhubpublic/openapi.gen.go+++ b/contracts/generated/go/teamhubpublic/openapi.gen.go@@ -4159,6 +4159,7 @@ const (WebSearchBackendIdBrave WebSearchBackendId = "brave"WebSearchBackendIdDirect WebSearchBackendId = "direct"WebSearchBackendIdDuckduckgo WebSearchBackendId = "duckduckgo"+ WebSearchBackendIdExa WebSearchBackendId = "exa"WebSearchBackendIdFirecrawl WebSearchBackendId = "firecrawl"WebSearchBackendIdTavily WebSearchBackendId = "tavily"WebSearchBackendIdYou WebSearchBackendId = "you"@@ -4173,6 +4174,8 @@ func (e WebSearchBackendId) Valid() bool {return truecase WebSearchBackendIdDuckduckgo:return true+ case WebSearchBackendIdExa:+ return truecase WebSearchBackendIdFirecrawl:return truecase WebSearchBackendIdTavily:@@ -4223,6 +4226,7 @@ func (e WebSearchFilter) Valid() bool {// Defines values for WebSearchKeyBackend.const (WebSearchKeyBackendBrave WebSearchKeyBackend = "brave"+ WebSearchKeyBackendExa WebSearchKeyBackend = "exa"WebSearchKeyBackendFirecrawl WebSearchKeyBackend = "firecrawl"WebSearchKeyBackendTavily WebSearchKeyBackend = "tavily"WebSearchKeyBackendYou WebSearchKeyBackend = "you"@@ -4233,6 +4237,8 @@ func (e WebSearchKeyBackend) Valid() bool {switch e {case WebSearchKeyBackendBrave:return true+ case WebSearchKeyBackendExa:+ return truecase WebSearchKeyBackendFirecrawl:return truecase WebSearchKeyBackendTavily:@@ -4317,6 +4323,7 @@ func (e WebSearchQuotaUnit) Valid() bool {const (WebSearchSearchBackendBrave WebSearchSearchBackend = "brave"WebSearchSearchBackendDuckduckgo WebSearchSearchBackend = "duckduckgo"+ WebSearchSearchBackendExa WebSearchSearchBackend = "exa"WebSearchSearchBackendFirecrawl WebSearchSearchBackend = "firecrawl"WebSearchSearchBackendTavily WebSearchSearchBackend = "tavily"WebSearchSearchBackendYou WebSearchSearchBackend = "you"@@ -4329,6 +4336,8 @@ func (e WebSearchSearchBackend) Valid() bool {return truecase WebSearchSearchBackendDuckduckgo:return true+ case WebSearchSearchBackendExa:+ return truecase WebSearchSearchBackendFirecrawl:return truecase WebSearchSearchBackendTavily:@@ -9623,6 +9632,9 @@ type VoiceTranscriptEventPage struct {type WebSearchBackend struct {Commands []WebSearchCommand `json:"commands"`+ // Description The provider's own one-line description of its product.+ Description string `json:"description"`+// Filters The search filters the backend honors; any other is refused before a call.Filters []WebSearchFilter `json:"filters"`@@ -9716,7 +9728,7 @@ type WebSearchQuota struct {ObservedAt *Timestamp `json:"observed_at,omitempty"`Plan *string `json:"plan,omitempty"`- // Reason no_key: no key is saved; not_reported: there is no usage endpoint to read (keyless You.com, direct); not_observed: Brave has answered no call yet; key_rejected: the provider refused the saved key; provider_unavailable: the usage endpoint did not answer in time.+ // Reason no_key: no key is saved; not_reported: there is no usage endpoint to read (keyless You.com, DuckDuckGo, Exa, direct); not_observed: Brave has answered no call yet; key_rejected: the provider refused the saved key; provider_unavailable: the usage endpoint did not answer in time.Reason *WebSearchQuotaReason `json:"reason,omitempty"`Remaining *float32 `json:"remaining,omitempty"`@@ -9728,7 +9740,7 @@ type WebSearchQuota struct {// WebSearchQuotaFrom defines model for WebSearchQuota.From.type WebSearchQuotaFrom string-// WebSearchQuotaReason no_key: no key is saved; not_reported: there is no usage endpoint to read (keyless You.com, direct); not_observed: Brave has answered no call yet; key_rejected: the provider refused the saved key; provider_unavailable: the usage endpoint did not answer in time.+// WebSearchQuotaReason no_key: no key is saved; not_reported: there is no usage endpoint to read (keyless You.com, DuckDuckGo, Exa, direct); not_observed: Brave has answered no call yet; key_rejected: the provider refused the saved key; provider_unavailable: the usage endpoint did not answer in time.type WebSearchQuotaReason string// WebSearchQuotaUnit defines model for WebSearchQuota.Unit.diff --git a/contracts/generated/typescript/src/generated/teamhub-agent-api/types.ts b/contracts/generated/typescript/src/generated/teamhub-agent-api/types.tsindex ec26b1e8..607fa1c8 100644--- a/contracts/generated/typescript/src/generated/teamhub-agent-api/types.ts+++ b/contracts/generated/typescript/src/generated/teamhub-agent-api/types.ts@@ -860,7 +860,7 @@ export interface paths {put?: never;/*** Search the web through one backend with the deployment's saved key.- * @description Without backend, TeamHub uses the default a Human chose exactly as if the request named it, even when its key stopped working; without a chosen default it uses the first ready backend in the order tavily, brave, firecrawl, you (with a key), then DuckDuckGo, which needs no key, and details.origin is suggested. You.com without a key runs only when named or chosen. A filter the backend cannot honor is refused before any call. There is no automatic fallback to another backend. When the backend needs a key the deployment lacks, or the provider refused the saved one, or the keyless You.com searches are used up, TeamHub posts (or reuses) a search_key card in the chat and answers 409 search_key_requested; details names the card and the backend it shows. Saving any web search key answers the card and wakes the Agent with the backend to use.+ * @description Without backend, TeamHub uses the default a Human chose exactly as if the request named it, even when its key stopped working; without a chosen default it uses the first ready backend in the order tavily, brave, firecrawl, exa, you (with a key), then DuckDuckGo, which needs no key, and details.origin is suggested. You.com without a key runs only when named or chosen. A filter the backend cannot honor is refused before any call. There is no automatic fallback to another backend. When the backend needs a key the deployment lacks, or the provider refused the saved one, or the keyless You.com searches are used up, TeamHub posts (or reuses) a search_key card in the chat and answers 409 search_key_requested; details names the card and the backend it shows. Saving any web search key answers the card and wakes the Agent with the backend to use.*/post: operations["searchAgentWeb"];delete?: never;@@ -2704,6 +2704,7 @@ export interface components {| "tavily"| "brave"| "firecrawl"+ | "exa"| "you"| "duckduckgo";/** @enum {string} */@@ -2735,7 +2736,7 @@ export interface components {* @description A backend that opens pages; direct is fetched by the CLI.* @enum {string}*/- backend: "tavily" | "firecrawl" | "you";+ backend: "tavily" | "firecrawl" | "exa" | "you";};WebOpenResponse: {/**@@ -2756,6 +2757,7 @@ export interface components {| "tavily"| "brave"| "firecrawl"+ | "exa"| "you"| "duckduckgo"| "direct";@@ -2779,7 +2781,7 @@ export interface components {resets_at?: components["schemas"]["Timestamp"];observed_at?: components["schemas"]["Timestamp"];/**- * @description no_key: no key is saved; not_reported: there is no usage endpoint to read (keyless You.com, direct); not_observed: Brave has answered no call yet; key_rejected: the provider refused the saved key; provider_unavailable: the usage endpoint did not answer in time.+ * @description no_key: no key is saved; not_reported: there is no usage endpoint to read (keyless You.com, DuckDuckGo, Exa, direct); not_observed: Brave has answered no call yet; key_rejected: the provider refused the saved key; provider_unavailable: the usage endpoint did not answer in time.* @enum {string}*/reason?:@@ -2793,6 +2795,8 @@ export interface components {WebSearchBackend: {id: components["schemas"]["WebSearchBackendId"];name: string;+ /** @description The provider's own one-line description of its product. */+ description: string;/*** @description How a call to the backend runs now. key: with an API key saved in the product (or one it still needs); free: without a key, on a free service with limits that TeamHub does not count (DuckDuckGo, and You.com without a key); none: direct, which needs no account.* @enum {string}@@ -2839,7 +2843,7 @@ export interface components {* @description A backend that takes an API key saved in the product.* @enum {string}*/- WebSearchKeyBackend: "tavily" | "brave" | "firecrawl" | "you";+ WebSearchKeyBackend: "tavily" | "brave" | "firecrawl" | "exa" | "you";WebConnectRequest: {backend: components["schemas"]["WebSearchKeyBackend"];};diff --git a/contracts/generated/typescript/src/generated/teamhub-public/types.ts b/contracts/generated/typescript/src/generated/teamhub-public/types.tsindex 5e928cc0..4f7c924f 100644--- a/contracts/generated/typescript/src/generated/teamhub-public/types.ts+++ b/contracts/generated/typescript/src/generated/teamhub-public/types.ts@@ -5576,7 +5576,7 @@ export interface components {* @description A backend that takes an API key saved in the product.* @enum {string}*/- WebSearchKeyBackend: "tavily" | "brave" | "firecrawl" | "you";+ WebSearchKeyBackend: "tavily" | "brave" | "firecrawl" | "exa" | "you";/** @description A radio or checkbox answer names option ids. Any other value is the Human's own written answer, which every option question accepts, so a checkbox answer holds up to 20 options and one written answer. */DecisionAnswerValue: string | string[];/** @description Service-signed upload credential. It names the uploading Human, the Room, and the stored file, and it expires at the upload's expires_at; clients must not construct or parse it. */@@ -7411,6 +7411,7 @@ export interface components {| "tavily"| "brave"| "firecrawl"+ | "exa"| "you"| "duckduckgo";/**@@ -7421,6 +7422,7 @@ export interface components {| "tavily"| "brave"| "firecrawl"+ | "exa"| "you"| "duckduckgo"| "direct";@@ -7441,7 +7443,7 @@ export interface components {resets_at?: components["schemas"]["Timestamp"];observed_at?: components["schemas"]["Timestamp"];/**- * @description no_key: no key is saved; not_reported: there is no usage endpoint to read (keyless You.com, direct); not_observed: Brave has answered no call yet; key_rejected: the provider refused the saved key; provider_unavailable: the usage endpoint did not answer in time.+ * @description no_key: no key is saved; not_reported: there is no usage endpoint to read (keyless You.com, DuckDuckGo, Exa, direct); not_observed: Brave has answered no call yet; key_rejected: the provider refused the saved key; provider_unavailable: the usage endpoint did not answer in time.* @enum {string}*/reason?:@@ -7455,6 +7457,8 @@ export interface components {WebSearchBackend: {id: components["schemas"]["WebSearchBackendId"];name: string;+ /** @description The provider's own one-line description of its product. */+ description: string;/*** @description How a call to the backend runs now. key: with an API key saved in the product (or one it still needs); free: without a key, on a free service with limits that TeamHub does not count (DuckDuckGo, and You.com without a key); none: direct, which needs no account.* @enum {string}diff --git a/contracts/openapi/components/web-search.yaml b/contracts/openapi/components/web-search.yamlindex 38282ac1..be873ef9 100644--- a/contracts/openapi/components/web-search.yaml+++ b/contracts/openapi/components/web-search.yaml@@ -6,12 +6,13 @@ components:A web search backend. duckduckgo searches without a key. direct openspages only and is fetched by the Agent CLI on the Agent's computer;TeamHub never fetches a page itself.- enum: [tavily, brave, firecrawl, you, duckduckgo, direct]+ enum: [tavily, brave, firecrawl, exa, you, duckduckgo, direct]x-enum-varnames:[WebSearchBackendIdTavily,WebSearchBackendIdBrave,WebSearchBackendIdFirecrawl,+ WebSearchBackendIdExa,WebSearchBackendIdYou,WebSearchBackendIdDuckduckgo,WebSearchBackendIdDirect,@@ -19,23 +20,25 @@ components:WebSearchKeyBackend:type: stringdescription: A backend that takes an API key saved in the product.- enum: [tavily, brave, firecrawl, you]+ enum: [tavily, brave, firecrawl, exa, you]x-enum-varnames:[WebSearchKeyBackendTavily,WebSearchKeyBackendBrave,WebSearchKeyBackendFirecrawl,+ WebSearchKeyBackendExa,WebSearchKeyBackendYou,]WebSearchSearchBackend:type: stringdescription: A backend that runs searches.- enum: [tavily, brave, firecrawl, you, duckduckgo]+ enum: [tavily, brave, firecrawl, exa, you, duckduckgo]x-enum-varnames:[WebSearchSearchBackendTavily,WebSearchSearchBackendBrave,WebSearchSearchBackendFirecrawl,+ WebSearchSearchBackendExa,WebSearchSearchBackendYou,WebSearchSearchBackendDuckduckgo,]@@ -120,7 +123,8 @@ components:]description: >-no_key: no key is saved; not_reported: there is no usage- endpoint to read (keyless You.com, direct); not_observed: Brave has answered no call yet;+ endpoint to read (keyless You.com, DuckDuckGo, Exa, direct);+ not_observed: Brave has answered no call yet;key_rejected: the provider refused the saved key;provider_unavailable: the usage endpoint did not answer in time.WebSearchBackend:@@ -135,6 +139,7 @@ components:[id,name,+ description,tier,commands,filters,@@ -152,6 +157,11 @@ components:type: stringminLength: 1maxLength: 80+ description:+ type: string+ minLength: 1+ maxLength: 200+ description: The provider's own one-line description of its product.tier:type: stringenum: [key, free, none]@@ -359,11 +369,12 @@ components:maxLength: 2048backend:type: string- enum: [tavily, firecrawl, you]+ enum: [tavily, firecrawl, exa, you]x-enum-varnames:[WebOpenRequestBackendTavily,WebOpenRequestBackendFirecrawl,+ WebOpenRequestBackendExa,WebOpenRequestBackendYou,]description: A backend that opens pages; direct is fetched by the CLI.diff --git a/contracts/openapi/paths/agent-web-search.yaml b/contracts/openapi/paths/agent-web-search.yamlindex 041bb656..c24d2542 100644--- a/contracts/openapi/paths/agent-web-search.yaml+++ b/contracts/openapi/paths/agent-web-search.yaml@@ -8,7 +8,7 @@ search:Without backend, TeamHub uses the default a Human chose exactly as ifthe request named it, even when its key stopped working; without achosen default it uses the first ready backend in the order tavily,- brave, firecrawl, you (with a key), then DuckDuckGo, which needs no key,+ brave, firecrawl, exa, you (with a key), then DuckDuckGo, which needs no key,and details.origin is suggested. You.com without a key runs only whennamed or chosen. A filter the backend cannot honor isrefused before any call. There is no automatic fallback to anotherdiff --git a/docs/local-inference.md b/docs/local-inference.mdindex f3a2bced..8ea92e90 100644--- a/docs/local-inference.md+++ b/docs/local-inference.md@@ -48,7 +48,8 @@ On Subscription, Claude Code and Codex keep their own web search. On Localmodel and BYOK the gateway cannot run that provider-hosted search, so thecomputer turns it off and agents search and read pages with `teamhub web search`and `teamhub web open`, as Pi always does. Those commands use the web search-providers set up on the server (Tavily, Brave Search, Firecrawl or You.com).+providers set up on the server (Tavily, Brave Search, Firecrawl, Exa or+You.com).Without any key they search DuckDuckGo, which is free but blocks searches thatcome too often; You.com also works without a key, with lower quality. Pages areread from this computer by default. When a provider needs a key, a card in the