Skip to content

LangChain toolkit for TruthStack supplement safety API — check interactions, search compounds, analyze stacks

Notifications You must be signed in to change notification settings

TruthStack1/truthstack-langchain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

TruthStack LangChain Integration

A LangChain toolkit that gives your AI agents access to TruthStack's supplement-drug interaction database.

Installation

pip install langchain langchain-core requests

Copy truthstack_toolkit.py into your project, or install from this directory:

pip install -e .

Quick Start

from truthstack_toolkit import TruthStackToolkit
from langchain.agents import AgentExecutor, create_tool_calling_agent
from langchain_anthropic import ChatAnthropic

# Initialize toolkit
toolkit = TruthStackToolkit(api_key="your-api-key")
tools = toolkit.get_tools()

# Create agent
llm = ChatAnthropic(model="claude-sonnet-4-5-20250929")
agent = create_tool_calling_agent(llm, tools, prompt)
agent_executor = AgentExecutor(agent=agent, tools=tools, verbose=True)

# Ask about interactions
result = agent_executor.invoke({
    "input": "Is it safe to take magnesium with lisinopril?"
})

Available Tools

Tool Description
truthstack_check_interactions Check a supplement for interactions with drugs or other supplements
truthstack_search_compounds Search for compounds by name (fuzzy matching across 584 aliases)
truthstack_get_compound Get full compound profile with all known interactions
truthstack_stack_check Check an entire supplement stack for all pairwise interactions
truthstack_get_drug_profile Get drug profile with all supplement interactions

API Key

Get your free API key at api.truthstack.co

Links

About

LangChain toolkit for TruthStack supplement safety API — check interactions, search compounds, analyze stacks

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages