Smarter Documentation

Teaching and Training

  • Smarter Instructor Guide
    • Open Source, Free, and Community Supported
    • From Educational Sandbox to Live Production
    • Free Course Designs
    • Getting Smarter Running
      • Quick Start
      • From Source
      • The Command-Line Interface
      • A First Look Around
    • Setting Up a Class
      • Choosing a Deployment Model
      • Accounts and Users
      • Managing Cost
      • Privacy and Academic Integrity
    • Planning a Course
      • Sample Formats
      • Assignments and Grading
    • Instructor Checklist
    • Getting Help and Giving Back
  • Free Course Designs
    • Micro Courses
      • Course Formats and Grading
        • The Three Formats
        • Grading
        • Course Policies
        • Before Teaching a Plan
      • Prompt Engineering
        • Classroom bootcamp: 8 hours
        • Two-week online course: 6 hours
        • Four-week online course: 12 hours
      • Building AI Applications
        • Classroom bootcamp: 8 hours
        • Two-week online course: 6 hours
        • Four-week online course: 12 hours
      • AI Governance and Responsible AI
        • Classroom bootcamp: 8 hours
        • Two-week online course: 6 hours
        • Four-week online course: 12 hours
      • The Economics of AI
        • Classroom bootcamp: 8 hours
        • Two-week online course: 6 hours
        • Four-week online course: 12 hours
      • Backend Development with Python, Django, Django REST Framework and Pydantic
        • Classroom bootcamp: 8 hours
        • Two-week online course: 6 hours
        • Four-week online course: 12 hours
      • Front End Development with React, Vite.js and Bootstrap
        • Classroom bootcamp: 8 hours
        • Two-week online course: 6 hours
        • Four-week online course: 12 hours
      • Full Stack Development with Django and React
        • Classroom bootcamp: 8 hours
        • Two-week online course: 6 hours
        • Four-week online course: 12 hours
      • API Design and Integration
        • Classroom bootcamp: 8 hours
        • Two-week online course: 6 hours
        • Four-week online course: 12 hours
      • Extension Development
        • Classroom bootcamp: 8 hours
        • Two-week online course: 6 hours
        • Four-week online course: 12 hours
      • Writing Secure Software for the Internet
        • Classroom bootcamp: 8 hours
        • Two-week online course: 6 hours
        • Four-week online course: 12 hours
      • Docker for Software Development
        • Classroom bootcamp: 8 hours
        • Two-week online course: 6 hours
        • Four-week online course: 12 hours
      • Kubernetes for Running Applications at Scale
        • Classroom bootcamp: 8 hours
        • Two-week online course: 6 hours
        • Four-week online course: 12 hours
      • Cloud Infrastructure as Code
        • Classroom bootcamp: 8 hours
        • Two-week online course: 6 hours
        • Four-week online course: 12 hours
      • Self-Hosting Open Models
        • Classroom bootcamp: 8 hours
        • Two-week online course: 6 hours
        • Four-week online course: 12 hours
      • Software Quality and Quality Assurance
        • Classroom bootcamp: 8 hours
        • Two-week online course: 6 hours
        • Four-week online course: 12 hours
      • Creating High Quality Documentation with Sphinx
        • Classroom bootcamp: 8 hours
        • Two-week online course: 6 hours
        • Four-week online course: 12 hours
      • Software Architecture
        • Classroom bootcamp: 8 hours
        • Two-week online course: 6 hours
        • Four-week online course: 12 hours
      • Agentic Software Development with Claude Code
        • Classroom bootcamp: 8 hours
        • Two-week online course: 6 hours
        • Four-week online course: 12 hours
      • Open Source Participation
        • Classroom bootcamp: 8 hours
        • Two-week online course: 6 hours
        • Four-week online course: 12 hours
    • Master Classes
      • Django Master Class
        • Three-day classroom course: 18 hours
        • Six-week online course: 18 hours
      • AI Application Development Master Class
        • Three-day classroom course: 18 hours
        • Six-week online course: 18 hours
      • Python Programming with Agentic AI Master Class
        • Three-day classroom course: 18 hours
        • Six-week online course: 18 hours

Smarter Docs

  • 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. 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
        • Languages
        • 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
        • Terminal
    • Django Admin
    • Managing Extensions
      • The Extensions Page
      • Installing from the Registry
        • Trust Badges
      • Uploading an Extension
      • An Extension’s Page
        • Configuring an Extension
        • Availability
      • Enabling and Disabling
      • Updates
        • Rolling Back
      • Uninstalling an Extension
      • When Something Goes Wrong
      • Configuring the Registry
      • Management Commands
    • 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
    • Smarter Project MCP Server
      • Endpoints
      • Tools
      • The Index
      • The Built-in MCPClients
      • Technical Reference
        • Exceptions
        • Repository Indexer
        • Django ORM
        • Rate Limit
        • Signal Receivers
        • Repositories
        • Search
        • MCP Protocol
        • Signals
        • Celery Tasks
        • Tools
        • Views
    • 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_example_budgets
    • Smarter Connection
      • Overview
      • Example Manifest
      • Technical Reference
        • API Reference
        • Const
        • Management Commands
        • 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
      • Web Pages That Embed It
      • Styling the Chat
        • Styling Your LLMClient’s Chat
      • 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 LLMTool Plugin
      • Overview
      • Usage
      • Example Manifest
      • Technical Reference
        • API Reference
        • Caching
        • Const
        • How it Works
        • How LLM Tool Calling Works
        • LLMTool 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
        • 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
    • Smarter Architecture
      • Linux
      • Third-Party Django Apps
      • Smarter Subsystems
      • Smarter Django Apps
    • Extensibility
      • Plugins, Extensions and MCP Servers Compared
      • Where to Go Next
    • Smarter LLM Tool Extensions
      • An Extension in Brief
        • Building an Extension
        • The Extension’s pyproject.toml
        • The Extension Lifecycle
        • Testing an Extension
        • Publishing an Extension
        • Technical Reference
    • Developer Guides
      • 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 APIs, SDKs and Integrations
      • The APIs
      • SDKs and Developer Tools
      • Website Integrations
      • Design Goals
        • One source of truth: Pydantic models
        • A contract that can’t drift
        • Declarative writes, typed reads
        • Same vocabulary in every language
        • Strict platform, tolerant clients
        • One credential, one configuration
        • Typed errors
        • Streaming, the same way everywhere
        • Testable without a platform
        • The same practices as the platform
      • Writing an SDK for Another Language
        • Smarter API Manifests (SAM)
        • Smarter API
        • Smarter OpenAPI Contract
        • Smarter Python SDK
        • Smarter Node.js SDK
        • Smarter Go SDK
        • Smarter CLI
        • VS Code Extension
        • Smarter Chat for WordPress
        • Smarter Chat for Drupal
        • Smarter Chat for Shopify
        • Smarter Chat for Google Tag Manager
        • Smarter Chat for Documentation Sites
    • 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.command_result()
        • AbstractBroker.created
        • AbstractBroker.delete()
        • AbstractBroker.dependencies()
        • AbstractBroker.dependencies_status()
        • AbstractBroker.dependency_broker()
        • AbstractBroker.dependency_brokers()
        • AbstractBroker.dependency_brokers_for()
        • AbstractBroker.dependents()
        • AbstractBroker.deploy()
        • AbstractBroker.deployable
        • 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.has_dependents()
        • 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.readable_by_name()
        • 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()
      • SAMDependency
      • SAMDependencyReference
        • SAMDependencyReference.__init__()
        • SAMDependencyReference.account
      • SAMDependents
      • dependents_exist()
      • memoized_dependencies()
      • should_log()
    • Smarter Chat
      • Where to Start
        • Features
        • Embedding Smarter Chat
        • Developing Smarter Chat
        • How the Web Console Hosts It
        • The Chat API Contract
        • Technical Reference
      • See Also
    • Smarter on Kubernetes
      • LLMClient Deployment
        • Starting a Deployment
        • The Deployment, Step by Step
        • Status Fields
        • Undeploying
        • Deleting
        • Configuration
        • Technical Reference
      • Operating Smarter at Scale
        • What Grows with Every LLMClient
        • Sizing the Infrastructure Worker
        • Security
        • Monitoring and Logs
        • Troubleshooting a Deployment
        • Housekeeping
        • Upgrades and Restores
      • The Services
      • Docker and Kubernetes Compared
      • How Smarter Talks to the Cluster
      • Cluster Prerequisites
    • 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
      • Translations
        • How a Page Chooses Its Language
        • The Message Catalogs
        • Marking Text for Translation
        • Updating the Catalogs
        • Adding a Language
        • Technical Reference
      • 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
        • Management Commands
        • 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 Typing Library
        • Smarter Unit Test Library
    • Technologies
      • Amazon Web Services (AWS)
        • Terraform
        • AWS Provider
      • Docker
        • What is Docker?
        • Why Use Docker?
        • Smarter and Docker
        • Getting Started with Docker
        • Key Docker Concepts
        • Basic Commands
        • Next Steps
      • Infrastructure Services
        • Overview
        • The Services
        • Cloud Providers
        • Signals
        • The Resource Ledger
        • Testing Safely
        • Technical Reference
      • Kubernetes
        • The Kubernetes Service
        • 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
    • ADR-031: Pydantic Models Over Raw JSON
      • 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.llmtool.plugin.websearch_providers.TavilySearchProvider.

The sample WebsearchPlugin. smarter_project_websearch uses Tavily to find current information about The Smarter Project on the web, from reputable sources. It is an example to copy, and no example LLMClient uses it. Its manifest is in the source tree: smarter/smarter/apps/llmtool/data/sample-plugins/websearch-smarter-project.yaml.

manage.py add_example_tools applies the sample plugins. Applying smarter_project_websearch fails if its Secret tavily_api_key does not exist. The other plugins are not affected: each manifest is applied 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.

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 SET-ME-PLEASE or values.yaml’s SET-ME-IN-helm/charts/smarter/values.yaml, the command does not create the Secret, and lists the key in the [API KEYS NOT SET] console error that it logs at the end, with the other missing API keys. It never stores a placeholder as the key.

  4. Apply the sample plugins.

    python manage.py add_example_tools
    

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/llmtool/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 applies the sample plugins. 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 could not be applied. 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 uses a Tavily WebsearchPlugin 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 ...

An LLMClient that names the plugin was applied, but the plugin was not, almost always because of the missing Secret above. Fix the Secret, run manage.py add_example_tools, and apply the LLMClient again.

TAVILY_API_KEY is not set, and SMARTER_TAVILY_API_KEY in the [API KEYS NOT SET] console error

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.