Smarter Documentation

Getting Started

  • Quick Start Guide
    • 1. Install Docker Desktop.
    • 2. Clone the Repository.
    • 3. Prepare Your Environment File.
    • 4. Initialize the Application.
    • 5. Start the Application.
    • 6. Log In.
    • 7. Download the Smarter Command-Line Interface.

Table of Contents

  • Platform Administration Guide
    • Installation
      • Quick Start Guide
        • 1. Install Docker Desktop.
        • 2. Clone the Repository.
        • 3. Prepare Your Environment File.
        • 4. Initialize the Application.
        • 5. Start the Application.
        • 6. Log In.
        • 7. Download the Smarter Command-Line Interface.
      • Production Deployment
        • I. Infrastructure
        • II. ReactJS Component
        • III. Smarter Platform Application
        • Trouble Shooting
      • Developer Setup Guide
        • Prerequisites
        • Launch the Smarter Platform
        • Work With Source Code
        • Good Coding Best Practices
        • Repository Setup
        • Docker Setup
        • Python Setup
        • Keen Bootstrap Theme Setup
        • AWS Cloud Infrastructure
    • Smarter Web Console
      • AI Resource Authors
        • Console Dashboard
        • AI Resource Lists
        • LLM Prompt Workbench
        • Manifest Drop Zone
        • LLM Provider API Passthrough Tool
        • Live Server Logs
        • Complete REST API Reference
      • Administrators
        • Django Admin Console
    • Django Admin
    • Prerequisites
    • Trouble Shooting & FAQ
    • Cloud Infrastructure
      • Usage
      • Resources Created
    • URL Patterns
      • Example URL Patterns
    • Account Management
      • Creating Accounts
    • User Management
    • Smarter CLI
    • API Keys
      • Creating API Keys
      • Managing API Keys
      • Configuration Options
      • Using API Keys
        • Smarter Chat React Component
        • Smarter Command-line Interface
    • How-To: Adding an LLM Provider to Smarter
      • Goal
      • Supported Providers
      • Prerequisites
      • Setup
        • Step 1: Get an API Key
        • Step 2: Add the Key to Smarter
      • Concept Overview
      • Step-by-Step: Create and Apply a Provider Manifest
        • Step 3: Generate a Starting Template
        • Step 4: Write the Provider Manifests
        • Step 5: Apply Both Manifests
        • Step 6: Confirm Both Providers are Active
      • Proof of Concept
      • Troubleshooting
    • Cost Accounting
      • Pricing
      • Budgets
        • Enforcement
        • Budget versus actual
    • Smarter Journal
      • Enabling the Smarter Journal
      • Django Log
      • Application Logs
    • Configuration
      • 1. AWS Infrastructure Configuration
      • 2. Django Settings
      • 3. Asynchronous Task Queue Configuration
      • 4. Beat Scheduler Configuration
      • 5. Helm Chart Configuration
      • 6. Dockerfile Configuration
      • 7. GitHub Actions Secrets Configuration
      • 8. Secrets Management
      • 9. Logging Configuration
      • 10. Database Configuration
      • 11. Email/Notification Configuration
      • 1. Static & Media Files Configuration
      • 13. Smarter Settings Class Reference
    • Security
      • Firewall
      • Application Security
        • Proprietary Security Features
        • Django Security Features
      • Secure Remote Access
        • Smarter Authentication
      • Audit Logging
      • Malware Protection
      • User management
      • Data Encryption
      • Security Updates
    • Backup and Restore
    • Updates
    • Trouble Shooting
      • Where to go for Help
    • Security FAQ
  • Smarter AI Resource Reference
    • Smarter Account
      • Overview
      • Usage
      • Technical Reference
        • API Reference
        • manage.py Commands
        • Const
        • Account Django ORM
        • Receivers
        • Smarter Resources - Account
        • Smarter API Manifests (SAM)
        • DRF Serializers
        • Signals
        • Asynchronous Tasks
        • Utils
    • Smarter Authtoken
      • Overview
      • Overview
      • Technical Reference
    • Smarter Budget
      • Overview
      • Technical Reference
        • Budget Model
        • Budget
        • Budget
        • add_builtin_budgets
    • Smarter Connection
      • Overview
      • Example Manifest
      • Technical Reference
        • API Reference
        • Const
        • Manifest
        • Django ORM
        • Receivers
        • SAM Resources
        • DRF Serializers
        • Signals
        • Asynchronous Tasks
        • React Integration Template Tag
        • URLs
        • Views
    • Smarter Custom Domain
      • Overview
      • How It Works
      • The Manifest
      • Verification
    • Smarter Guardrail
      • Overview
      • How It Works
      • The Manifest
        • Strategies
        • Actions
        • Modes and Failure
      • Built-in Guardrails
      • Security Notes
      • Technical Reference
        • Django Admin
        • API Reference
        • Caching
        • Const
        • Exceptions
        • Management Commands
        • Smarter API Manifests (SAM)
        • Django ORM
        • Signal Receivers
        • DRF Serializers
        • Services
        • Signals
        • Asynchronous Tasks
        • Utilities
        • Views
    • Smarter LLM Client
      • Overview
      • Usage
      • Example Manifest
      • Technical Reference
        • API Reference
        • Models
        • Smarter API Manifests (SAM)
        • DRF Serializers
        • React UI
        • LLMClientHelper Class
        • Kubernetes Ingress
        • Management Commands
        • Middleware
        • Tasks
        • Signals
        • URLs
        • Utils
      • Sandbox Mode
      • Deploying
      • Updating
      • Deleting
      • Testing
      • Monitoring
      • Scaling
      • Trouble Shooting
    • Smarter LLM Host
      • Overview
      • Example: Self-Hosting a Hugging Face Model
      • Technical Reference
        • API Reference
        • Const
        • Management Commands
        • Smarter API Manifests (SAM)
        • Django ORM
        • DRF Serializers
        • Signals
        • Asynchronous Tasks
        • Views
    • Smarter MCP Client
      • Overview
      • How It Works
      • The Manifest
        • Authentication
        • Security
      • Example Manifests
      • Technical Reference
        • API Reference
        • Caching
        • MCP Server Connections
        • Const
        • Exceptions
        • Smarter API Manifests (SAM)
        • Django ORM
        • Signal Receivers
        • DRF Serializers
        • Signals
        • Asynchronous Tasks
        • Prompt Toolkit
        • Views
    • Smarter Orchestrator
      • Overview
      • Technical Reference
        • API Reference
        • Const
        • Management Commands
        • Smarter API Manifests (SAM)
        • Django ORM
        • DRF Serializers
        • Signals
        • Asynchronous Tasks
        • Views
    • Smarter Plugin
      • Overview
      • Usage
      • Example Manifest
      • Technical Reference
        • API Reference
        • Caching
        • Const
        • How it Works
        • How LLM Tool Calling Works
        • Plugin Reference
        • Django Management Commands
        • Django ORM
        • Smarter API Manifests (SAM)
        • DRF Serializers
        • Natural Language Processing (NLP)
        • Signals
        • Receivers
        • Asynchronous Tasks
        • React Integration Template Tags
        • Utils
        • Views
    • Smarter Prompt
      • Overview
      • Usage
      • Technical Reference
        • Example Prompt Configuration
        • Example Prompt Request
        • Example Prompt Response
        • API Reference
        • Const
        • Manifests (SAM)
        • Django ORM
        • Smarter Prompt Functions
        • Django Management Commands
        • Signals
        • Asynchronous Tasks
        • Prompt Templatetags
        • Urls
        • Prompt Views
    • Smarter Provider
      • Overview
      • Technical Reference
        • API Reference
        • Const
        • Management Commands
        • Smarter API Manifests (SAM)
        • Django ORM
        • DRF Serializers
        • Services
        • Signals
        • Asynchronous Tasks
        • Utils
        • Verification
        • Views
    • Smarter Proxy
      • Overview
      • How It Works
      • Quick Start
      • Creating a Proxy
      • Manifest Reference
      • Authentication
      • Errors
      • Security
      • Usage and Budgets
      • Built-in Proxies
      • Technical Reference
        • API Reference
        • Authentication
        • Caching
        • Const
        • Exceptions
        • Management Commands
        • Smarter API Manifests (SAM)
        • Django ORM
        • Serializers
        • Passthrough Service
        • Signals
        • Views
    • Smarter Secret
      • Overview
      • Technical Reference
        • API Reference
        • Django Admin
        • Caching
        • Const
        • Management Commands
        • Smarter API Manifests (SAM)
        • Django ORM
        • Receivers
        • Secret Resources
        • DRF Serializers
        • Signals
        • React Integration Template Tags
        • Asynchronous Tasks
        • Urls
        • Views
    • Smarter Vectorsearch
      • API Reference
        • VectorsearchApiBaseViewSet
      • Const
      • Management Commands
      • Smarter API Manifests (SAM)
        • Enumerations Classes
        • Pydantic Models
      • Django ORM
        • Vectorsearch
        • VectorsearchSearchType
      • DRF Serializers
        • VectorsearchSerializer
      • Signals
        • vectorsearch_called
      • Asynchronous Tasks
      • Views
        • API View
        • ListView
        • Detail View
    • Smarter Vectorstore
      • Overview
      • Example Manifests
      • Lifecycle
        • Self-Hosted Qdrant
        • Managed Services
      • Documents
      • Search
      • Maintenance and Snapshots
      • Technical Reference
        • REST API
        • Vectorstore Backends
        • Built-in Vectorstores
        • Caching
        • Management Commands
        • Documents: Text Extraction and Embeddings
        • Self-Hosted Qdrant on Kubernetes
        • Vectorstore Manifest
        • Vectorstore ORM Models
        • Vectorstore Receivers
        • Vectorstore Serializers
        • Vectorstore Services
        • Vectorstore Signals
        • Vectorstore Asynchronous Tasks
        • Web Console Views
  • Smarter Development Framework
    • Getting Started
    • Developer Guides
      • Developer Setup Guide
        • Prerequisites
        • Launch the Smarter Platform
        • Work With Source Code
        • Good Coding Best Practices
        • Repository Setup
        • Docker Setup
        • Python Setup
        • Keen Bootstrap Theme Setup
        • AWS Cloud Infrastructure
      • Contributing
        • How to Contribute
      • New Feature Checklist
        • Django Checklist
        • Smarter / SAM Checklist
        • Style Guide Checklist
      • Documentation Style Guide & Technical Reference
        • Style Guide
        • Tips for Writing Good Documentation
        • Documentation Build Process
      • 12-Factor App
      • Code of Conduct
        • 1. Purpose
        • 2. Open Source Citizenship
        • 3. Expected Behavior
        • 4. Unacceptable Behavior
        • 5. Enforcement
        • 6. Scope
        • 7. Our Responsibilities
        • Attribution
      • Developer Guidelines
        • New Feature Checklist
        • Unit Testing
        • Pydantic
        • Automations
        • Linters and Formatters
      • Semantic Versioning Guide
        • Commit Message format
      • OpenAI
      • OpenAI JSON Examples
        • Environment Variables
        • Logging
        • event dump
      • Claude Code
        • Getting Started with Claude Code on Smarter
        • Getting Started with Claude-Powered Coding in Smarter
        • Getting Started with Claude Code on the Smarter Platform
        • NAPL Grid Maintenance Assistant
        • Tutorial
        • Getting Started with Claude Code in Smarter
        • Claude Code with Smarter: Adding Anthropic and Getting Started
        • Part 1 — Adding Anthropic as an LLM Provider
        • Part 2 — Getting Started: Claude Code for NAPL Programmers
        • How-To: Add Anthropic as an LLM Provider in Smarter
        • Getting Started with Claude Code in Smarter
        • Adding an Anthropic Provider to Smarter
        • Getting Started: Using Claude Code with Smarter at NAPL
        • Smarter Claude Code Plugin
        • How-To: Adding Anthropic as an LLM Provider to Smarter
        • Getting Started with Claude Code as a Coding Assistant
        • Smarter & Claude is Jean-Claude Van Damme - Getting Started Guide
    • Smarter API Manifests (SAM)
      • Example SAM Manifest
      • SAM Enumerations Classes
      • SAM Pydantic Base Classes
        • AbstractSAMBase
        • AbstractSAMMetadataBase
        • AbstractSAMSpecBase
        • AbstractSAMStatusBase
        • SAMDependency
        • SmarterBasePydanticModel
        • VALID_ANNOTATION_VALUE_TYPES_SET
      • SAMLoader Class
        • SAMLoader
        • SAMLoaderError
        • validate_key()
      • SAM AbstractController Class
        • AbstractController
      • SAM Broker Model
      • SAM Error Handling
        • SAMBadRequestError
        • SAMExceptionBase
        • SAMValidationError
      • SAM Validation Strategy
        • Validation Strategy
    • Smarter Broker Model
      • AbstractBroker
        • AbstractBroker.ORMMetaModelClass
        • AbstractBroker.ORMModelClass
        • AbstractBroker.SAMModelClass
        • AbstractBroker.SerializerClass
        • AbstractBroker.__init__()
        • AbstractBroker.abstract_broker_logger_cache_invalidation_prefix
        • AbstractBroker.abstract_broker_logger_prefix
        • AbstractBroker.abstract_broker_ready_state
        • AbstractBroker.api_version
        • AbstractBroker.apply()
        • AbstractBroker.cache_invalidations()
        • AbstractBroker.clean_cli_param()
        • AbstractBroker.created
        • AbstractBroker.delete()
        • AbstractBroker.dependencies()
        • AbstractBroker.dependencies_status()
        • AbstractBroker.dependency_broker()
        • AbstractBroker.dependency_brokers()
        • AbstractBroker.deploy()
        • AbstractBroker.describe()
        • AbstractBroker.example_manifest()
        • AbstractBroker.formatted_class_name
        • AbstractBroker.formatted_class_name_cache_invalidations
        • AbstractBroker.get()
        • AbstractBroker.get_model_titles()
        • AbstractBroker.get_or_create_secret()
        • AbstractBroker.is_ready_abstract_broker
        • AbstractBroker.is_valid
        • AbstractBroker.json_response_err()
        • AbstractBroker.json_response_err_notfound()
        • AbstractBroker.json_response_err_notimplemented()
        • AbstractBroker.json_response_err_notready()
        • AbstractBroker.json_response_err_readonly()
        • AbstractBroker.json_response_ok()
        • AbstractBroker.kind
        • AbstractBroker.kind_setter()
        • AbstractBroker.loader
        • AbstractBroker.log_abstract_broker_state()
        • AbstractBroker.logs()
        • AbstractBroker.manifest
        • AbstractBroker.manifest_setter()
        • AbstractBroker.manifest_to_django_orm()
        • AbstractBroker.name
        • AbstractBroker.name_cached_property_setter()
        • AbstractBroker.orm_instance
        • AbstractBroker.orm_meta_instance
        • AbstractBroker.orm_meta_instance_setter()
        • AbstractBroker.params
        • AbstractBroker.prompt()
        • AbstractBroker.raise_for_unknown_keys()
        • AbstractBroker.ready
        • AbstractBroker.ready_state
        • AbstractBroker.request
        • AbstractBroker.schema()
        • AbstractBroker.set_and_verify_name_param()
        • AbstractBroker.thing
        • AbstractBroker.to_json()
        • AbstractBroker.undeploy()
        • AbstractBroker.uri
        • AbstractBroker.validation_errors()
        • AbstractBroker.verify_no_dependencies()
        • AbstractBroker.visible_dependencies()
      • BrokerNotImplemented
        • BrokerNotImplemented.ORMModelClass
        • BrokerNotImplemented.SerializerClass
        • BrokerNotImplemented.__init__()
        • BrokerNotImplemented.delete()
        • BrokerNotImplemented.dependencies()
        • BrokerNotImplemented.deploy()
        • BrokerNotImplemented.describe()
        • BrokerNotImplemented.example_manifest()
        • BrokerNotImplemented.get()
        • BrokerNotImplemented.logs()
        • BrokerNotImplemented.manifest
        • BrokerNotImplemented.prompt()
        • BrokerNotImplemented.undeploy()
      • memoized_dependencies()
      • should_log()
    • Smarter API
      • API Documentation
      • CLI URLs
        • Endpoints
        • URL Patterns
        • Base Class Reference
      • Prompt (Chat) URLS
        • Endpoints
        • URL Patterns
        • PromptConfigView Class Reference
        • DefaultLLMClientApiView Class Reference
      • Authentication
      • CLI Error Handling
      • Logging
      • Rate Limiting
      • Journal
      • Class Reference
        • CLI
        • Management Commands
        • Enumerations
        • Signals
        • URLS
    • Smarter CLI
      • Installation
      • Usage
      • Commands
      • Related API endpoints
      • Manifest Spec
        • Kind
        • Broker Model
        • Controller Model
    • VS Code Extension
      • Features
      • Getting Started
      • Configuration
      • JSON Schemas
    • Developer Technical Reference
      • Agentic Development
        • How You Ask
        • What the Code Base Gives the Agent
        • Reviewing What You Get
      • Django-React Integration
        • Request Lifecycle
        • An Example: The Terminal Application Component
        • Build, Deployment, and CI/CD Considerations
      • Smarter Journal
        • Journal Technical References
      • Smarter Enumeration Classes
        • SmarterEnumAbstract
      • Smarter Mixins
        • Smarter Helper Mixin
        • Smarter Account Mixin
        • Smarter Request Mixin
        • Smarter Middleware Mixin
      • Smarter Settings
        • Settings
      • Smarter Utils
        • Technical References
      • Smarter Devops Guide
        • Build
        • Unit Testing
        • Deploy
        • CI/CD
      • Smarter Dashboard App
        • Django Admin
        • Const
        • Context Processors
        • Django ORM
        • Dashboard Receivers
        • Signals
        • Dashboard Templatetags
        • Urls
        • Views
      • Smarter Framework Library
        • Django
        • Django Rest Framework
        • Smarter Caching
        • Smarter Json Library
        • Smarter Celery Config Library
        • Smarter Journal Library
        • Smarter Logging
        • Smarter OpenAI Library
        • Smarter Social Core Library
        • Smarter Unit Test Library
    • Technologies
      • Amazon Web Services (AWS)
        • Terraform
        • AWS Helper Classes
      • Docker
        • What is Docker?
        • Why Use Docker?
        • Smarter and Docker
        • Getting Started with Docker
        • Key Docker Concepts
        • Basic Commands
        • Next Steps
      • Kubernetes
        • Kubernetes Helper Classes
        • Helm Chart
      • OpenTelemetry Compatibility
        • Overview
        • Motivation
        • What “OpenTelemetry Compatible” means for Smarter
        • Proposed architecture
        • UI surface (proposed, not finalized)
        • Open questions
        • Related links
      • Python
        • Coding Style
        • Type Hinting
        • Documentation
        • Dependencies
        • Dependabot Configuration for Python Dependencies
      • Pydantic
      • SMTP Email Support
        • Configuration
        • Basic Usage
        • Technical Reference
      • Tavily Web Search
        • How Smarter Uses Tavily
        • Setup
        • CI/CD Considerations
        • Cost and Limits
        • Troubleshooting
  • ADR
    • ADR Introduction
      • Guidelines for Writing ADRs
    • ADR-001: Django
      • Status
      • Context
      • Decision
      • Alternatives Considered
      • Consequences
      • Related ADRs
    • ADR-002: Docker
      • Status
      • Context
      • Decision
      • Alternatives Considered
      • Consequences
      • Related ADRs
    • ADR-003: Kubernetes
      • Status
      • Context
      • Decision
      • Alternatives Considered
      • Consequences
      • Related ADRs
    • ADR-004: 12-Factor App
      • Status
      • Context
      • Decision
      • Alternatives Considered
      • Consequences
      • Related ADRs
    • ADR-005: Manifests
      • Status
      • Context
      • Decision
      • Alternatives Considered
      • Consequences
      • Related ADRs
    • ADR-006: Rest API
      • Status
      • Context
      • Decision
      • Alternatives Considered
      • Consequences
      • Related ADRs
    • ADR-007: Settings
      • Status
      • Context
      • Decision
      • Alternatives Considered
      • Consequences
      • Related ADRs
    • ADR-008: Function Calling
      • Status
      • Context
      • Decision
      • Alternatives Considered
      • Consequences
      • Related ADRs
    • ADR-009: Async Tasks
      • Status
      • Context
      • Decision
      • Alternatives Considered
      • Consequences
      • Related ADRs
    • ADR-010: Management Commands
      • Status
      • Context
      • Decision
      • Alternatives Considered
      • Consequences
      • Related ADRs
    • ADR-011: Logging
      • Status
      • Context
      • Decision
      • Alternatives Considered
      • Consequences
      • Related ADRs
    • ADR-012: Error Handling
      • Status
      • Context
      • Decision
      • Alternatives Considered
      • Consequences
      • Related ADRs
    • ADR-013: Testing
      • Status
      • Context
      • Decision
      • Alternatives Considered
      • Consequences
      • Related ADRs
    • ADR-014: CI/CD
      • Status
      • Context
      • Decision
      • Alternatives Considered
      • Consequences
      • Related ADRs
    • ADR-015: Dependency Management
      • Status
      • Context
      • Decision
      • Alternatives Considered
      • Consequences
      • Related ADRs
    • ADR-016: Security
      • Status
      • Context
      • Decision
      • Alternatives Considered
      • Consequences
      • Related ADRs
    • ADR-017: Database
      • Status
      • Context
      • Decision
      • Alternatives Considered
      • Consequences
      • Related ADRs
    • ADR-018: Caching
      • Status
      • Context
      • Decision
      • Alternatives Considered
      • Consequences
      • Related ADRs
    • ADR-019: React
      • Status
      • Context
      • Decision
      • Alternatives Considered
      • Consequences
      • Related ADRs
    • ADR-020: Semantic Versioning
      • Status
      • Context
      • Decision
      • Alternatives Considered
      • Consequences
      • Related ADRs
    • ADR-021: Internationalization
      • Status
      • Context
      • Decision
      • Alternatives Considered
      • Consequences
      • Related ADRs
    • ADR-022: Feature Flags
      • Status
      • Context
      • Decision
      • Alternatives Considered
      • Consequences
      • Related ADRs
    • ADR-023: API Versioning
      • Status
      • Context
      • Decision
      • Alternatives Considered
      • Consequences
      • Related ADRs
    • ADR-024: Broker Model
      • Status
      • Context
      • Decision
      • Alternatives Considered
      • Consequences
      • Related ADRs
    • ADR-025: Django Templates
      • Status
      • Context
      • Decision
      • Alternatives Considered
      • Consequences
      • Related ADRs
    • ADR-026: Keen Bootstrap
      • Status
      • Context
      • Decision
      • Alternatives Considered
      • Consequences
      • Related ADRs
    • ADR-027: Python Annotations
      • Status
      • Context
      • Decision
      • Alternatives Considered
      • Consequences
      • Related ADRs
    • ADR-028: Code Quality
      • Status
      • Context
      • Decision
      • Alternatives Considered
      • Consequences
      • Related ADRs
    • ADR 029: Docstring Style
      • Context
      • Alternatives Considered
      • Decision
      • Consequences
      • References
    • ADR-030: Operational and Infrastructure Task Queues
      • Status
      • Context
      • Decision
      • Alternatives Considered
      • Consequences
      • Related ADRs
  • Contributors
    • GitHub Repositories
    • Core Contributors
    • Community Contributors

External Resources

  • Support Smarter!
  • Swagger API Documentation
  • Smarter Manifest Examples
  • Smarter Json Schemas
  • Smarter on YouTube
Smarter Documentation
  • Smarter Development Framework
  • Technologies
  • Tavily Web Search
  • View page source

Tavily Web Search

Tavily is a commercial web search API that is designed for LLMs and AI agents. Like a search engine, it takes a query and returns ranked web pages, but each result is returned as structured json (a title, a url, a snippet of the page’s content, and its publication date) rather than as a page of links for a person to read. This makes it a good fit for tool calling, where the LLM reads the results and cites them.

Smarter uses Tavily as one of the two web search APIs of the WebsearchPlugin. The other is the Brave Search API. Each WebsearchPlugin chooses its search API in its manifest.

Note

The WebsearchPlugin is experimental. See WebsearchPlugin.

How Smarter Uses Tavily

The WebsearchPlugin. A WebsearchPlugin gives an LLM one tool with two operations: search the web, and read a web page. Only search uses Tavily. When the LLM sets a query, the plugin sends it to the Tavily Search API, https://api.tavily.com/search, and returns the results to the LLM in the same form as Brave’s, so that the LLM sees the same fields whichever API is configured. Reading a web page, the fetch operation, is done by Smarter itself, not by Tavily.

The plugin’s manifest selects Tavily, and names the Smarter Secret that contains the Tavily API key:

spec:
  websearchData:
    search:
      provider: tavily
      apiKey: tavily_api_key    # the name of a Smarter Secret, never the key itself
      maxResults: 5
      safeSearch: moderate
    blockedDomains:
      - pinterest.com

Each search request:

  • uses Tavily’s basic search depth and general topic, and asks for no generated answer and no raw page content, only ranked results.

  • passes the plugin’s allowedDomains and blockedDomains to Tavily, as its include_domains and exclude_domains. Smarter also filters the results that Tavily returns by the same domain policy, so that the policy is enforced even if Tavily returns a result that it should not.

  • passes safeSearch as Tavily’s safe_search, which is either on or off: moderate and strict both turn it on.

  • passes freshness (day, week, month or year) and language. The plugin’s country is not passed, because Tavily localizes by country name rather than by country code.

Search results are cached, per plugin, for the manifest’s cacheTtl seconds, keyed on the query and its parameters. A repeated question does not call Tavily again until the cache expires.

The implementation is smarter.apps.plugin.plugin.websearch_providers.TavilySearchProvider.

The smarter LLMClient. The platform’s built-in smarter LLMClient, the Smarter sales agent, uses the built-in WebsearchPlugin smarter_project_websearch to find current information about The Smarter Project on the web, from reputable sources. It complements the documentation and source code that its smarter_project_github MCPClients read. Its manifests are in the source tree:

  • smarter/smarter/apps/llmclient/data/plugins/plugin-smarter-websearch.yaml

  • smarter/smarter/apps/llmclient/data/llm-clients/llmclient-smarter.yaml

manage.py deploy_builtin_llmclients applies the built-in plugins, and then the built-in LLMClients. Applying an LLMClient fails if any plugin that it names does not exist, and applying smarter_project_websearch fails if its Secret tavily_api_key does not exist. An installation without a Tavily API key therefore cannot deploy the smarter LLMClient. The other built-in plugins and LLMClients are not affected: the command applies each manifest in its own transaction, so a manifest that fails is rolled back entirely, and is reported, and the command goes on to the next one. An existing smarter LLMClient keeps its previous version.

Setup

  1. Get an API key. Create an account at tavily.com, and copy an API key from its dashboard. Tavily keys begin with tvly-.

  2. Set the environment variable. Set TAVILY_API_KEY. As with every Smarter setting, the name may also be given the SMARTER_ prefix, SMARTER_TAVILY_API_KEY: the two are the same setting. For local development, add it to .env, which .env.example documents:

    SMARTER_TAVILY_API_KEY=tvly-...
    
  3. Create the Secret. manage.py initialize_providers, which manage.py initialize_platform runs, stores the key as the Smarter Secret tavily_api_key, owned by the smarter admin. It updates the Secret if it already exists, so running it again rotates the key.

    python manage.py initialize_providers
    

    If TAVILY_API_KEY is not set, or is still a placeholder, such as .env.example’s SET-ME-PLEASE or values.yaml’s SET-ME-IN-helm/charts/smarter/values.yaml, the command logs a warning and does not create the Secret. It never stores a placeholder as the key.

  4. Deploy the built-in LLMClients.

    python manage.py deploy_builtin_llmclients --account_number 3141-5926-5359
    

Other WebsearchPlugins can use the same Secret, by setting apiKey: tavily_api_key, or a Secret of their own: apiKey is the name of any Secret that the plugin’s owner can read. See the sample manifests in smarter/smarter/apps/plugin/data/sample-plugins/websearch-*.yaml.

The environment variable is listed in Configuration.

CI/CD Considerations

GitHub repository secret. Both workflows read the key from the GitHub Actions repository secret TAVILY_API_KEY. Add it in the repository’s Settings > Secrets and variables > Actions. It is never committed: neither values.yaml nor any manifest contains the key.

Tests (.github/workflows/test.yml). The workflow passes TAVILY_API_KEY to the test containers’ .env, with the other API keys. The unit tests do not call Tavily: they serve the Tavily API from a fake web host, and create a test Secret, so they pass without the GitHub secret.

Deployments (.github/workflows/deploy.yml). The workflow passes the GitHub secret to the tavily-api-key input of .github/actions/deploy, which sets the Helm value env.SMARTER_TAVILY_API_KEY. The chart’s init Job, templates/job-init.yaml, is a Helm post-install and post-upgrade hook, so every deployment runs initialize_platform, which creates or updates the Secret, and then deploy_builtin_llmclients. Consequently:

  • Adding the key to an existing installation takes effect on the next deployment.

  • Rotating the key: update the GitHub secret, and deploy. The Secret is updated in place.

  • A deployment without the key completes, but the init Job logs that the tavily_api_key Secret was not created, and that smarter_project_websearch, and therefore the smarter LLMClient, could not be applied. The other built-in LLMClients are applied as usual. When the GitHub secret is not set, the deploy action passes no value, and Helm falls back to the values.yaml placeholder, which the init command recognizes and ignores.

  • Every environment that deploys the built-in LLMClients needs the key: local, alpha, beta and production. Each may use its own Tavily key, for separate usage and billing.

Cost and Limits

Tavily bills by API credits, and offers a free plan with a monthly allowance of credits; see the pricing on tavily.com. Smarter keeps usage low:

  • every search uses the basic search depth, Tavily’s least expensive.

  • results are cached for the plugin’s cacheTtl. smarter_project_websearch caches them for a day, because information about the project changes slowly.

  • only search calls Tavily. Reading a web page does not.

Monitor usage in the Tavily dashboard. When Tavily refuses a search, for example because the key is invalid or out of credits, the WebsearchPlugin returns an error to the LLM instead of search results, and sends the websearch_failed signal.

Troubleshooting

the web search api key Secret tavily_api_key does not exist, or is not accessible

The plugin was applied before the Secret existed, or by a user who cannot read it. Set TAVILY_API_KEY, run manage.py initialize_providers, and apply the plugin again.

Plugin smarter_project_websearch not found for account ...

The smarter LLMClient was applied, but its WebsearchPlugin was not, almost always because of the missing Secret above. Fix the Secret, and run manage.py deploy_builtin_llmclients, which reports each manifest that it fails to apply as Failed to apply manifest ....

initialize_tavily: TAVILY_API_KEY is not set

The init command found no key, or only a placeholder. Set the environment variable, or, in a deployment, the GitHub secret TAVILY_API_KEY.

Previous Next

© Copyright 2023 - 2026 Lawrence P. McDaniel. The Smarter Project. Last updated October-2026.

Built with Sphinx using a theme provided by Read the Docs.