Timbr LangChain LLM SDK is a Python SDK that extends LangChain and LangGraph with custom agents, chains, and nodes for seamless integration with the Timbr semantic layer. It enables converting natural language prompts into optimized semantic-SQL queries and executing them directly against your data.
- Access to a timbr-server
- Python 3.10 or newer
python -m pip install langchain-timbrOne of: openai, anthropic, google, azure_openai, snowflake, databricks, vertex_ai, bedrock (or 'all')
python -m pip install 'langchain-timbr[<your selected providers, separated by comma w/o space>]'pip install git+https://github.com/WPSemantix/langchain-timbrFor comprehensive documentation and usage examples, please visit:
The SDK uses environment variables for configuration. All configurations are optional - when set, they serve as default values for langchain-timbr provided tools. Below are all available configuration options:
TIMBR_URL- The URL of your Timbr serverTIMBR_TOKEN- Authentication token for accessing the Timbr serverTIMBR_ONTOLOGY- The ontology to use (also acceptsONTOLOGYas an alias)IS_JWT- Whether the token is a JWT token (true/false)JWT_TENANT_ID- Tenant ID for JWT authentication
CACHE_TIMEOUT- Timeout for caching operations in secondsIGNORE_TAGS- Comma-separated list of tags to ignore during processingIGNORE_TAGS_PREFIX- Comma-separated list of tag prefixes to ignore during processing
LLM_TYPE- The type of LLM provider to useLLM_MODEL- The specific model to use with the LLM providerLLM_API_KEY- API key or client secret for the LLM providerLLM_TEMPERATURE- Temperature setting for LLM responses (controls randomness)LLM_ADDITIONAL_PARAMS- Additional parameters to pass to the LLMLLM_TIMEOUT- Timeout for LLM requests in secondsLLM_TENANT_ID- LLM provider tenant/directory ID (Used for Service Principal authentication)LLM_CLIENT_ID- LLM provider client ID (Used for Service Principal authentication)LLM_CLIENT_SECRET- LLM provider client secret (Used for Service Principal authentication)LLM_ENDPOINT- LLM provider OpenAI endpoint URLLLM_API_VERSION- LLM provider API versionLLM_SCOPE- LLM provider authentication scope

