Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

community: add Valthera integration #30105

Merged
merged 29 commits into from
Mar 9, 2025
Merged

Conversation

vselvarajijay
Copy link
Contributor

@vselvarajijay vselvarajijay commented Mar 4, 2025

**Description:**  
This PR integrates Valthera into LangChain, introducing an framework designed to send highly personalized nudges by an LLM agent. This is modeled after Dr. BJ Fogg's Behavior Model. This integration includes:

- Custom data connectors for HubSpot, PostHog, and Snowflake.
- A unified data aggregator that consolidates user data.
- Scoring configurations to compute motivation and ability scores.
- A reasoning engine that determines the appropriate user action.
- A trigger generator to create personalized messages for user engagement.

**Issue:**  
N/A

**Dependencies:**  
N/A

**Twitter handle:**  
- `@vselvarajijay`

**Tests and Docs:**  
- `docs/docs/integrations/tools/valthera` 
- `https://github.com/valthera/langchain-valthera/tree/main/tests`

Copy link

vercel bot commented Mar 4, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
langchain ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 9, 2025 9:19pm

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. community Related to langchain-community 🤖:docs Changes to documentation and examples, like .md, .rst, .ipynb files. Changes to the docs/ folder labels Mar 4, 2025
@vselvarajijay
Copy link
Contributor Author

Hey @ccurme - I would really appreciate a review on my first PR to LangChain. Happy to make any refinements if I missed anything. Appreciate the review and feedback! 🙂

Copy link
Collaborator

@ccurme ccurme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this. I left some in-line comments on the provider page. Remaining things to do:

@vselvarajijay
Copy link
Contributor Author

@ccurme Thanks for the review! It looks like I had some old templates there, I cleared out the abstractions I wasn’t implementing.

  1. langchain-valthera is now added to the package registry
  2. Reverted template in langchain-cli and uv.lock
  3. Fixed Pypi page:
    1. Removed references to unimplemented abstractions
    2. Fixed Homepage link
    3. Fixed Release Notes link
    4. Fixed Repository link
    5. Fixed Source code link
  4. Corrected docs/docs/integrations/providers/valthera.mdx

"source": [
"# Valthera\n",
"\n",
"Enable AI agents to engage users when they're most likely to.\n",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(nit) most likely to what?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm yeah good call. Hopefully this is better:

Enable AI agents to engage users when they're most likely to respond.

print("✅ ValtheraTool successfully initialized for LangChain integration!")
```

### Example 2: Using ValtheraTool with LangChain Agents
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest removing this and just keeping the langgraph example.

See the admonition on the API reference for create_react_agent here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok - cleared out the LangGraph examples and only keeping LangChain

@vselvarajijay
Copy link
Contributor Author

Hey @ccurme - a few more fixes on this PR as you suggested also a couple others I wanted to improve:

  • Cleaned up integration tools doc
  • Cleaned up provider doc
  • Fixed up project structure of langchain-valthera (moved package to root of repo)
  • Published new langchain-valthera package with updated links

Let me know if you think this is can be a good starting place for the Valthera tool. There is quite a bit more I would like to iterate on with the developer experience and capabilities that can help LLM Agents engage with people.

@vselvarajijay vselvarajijay requested a review from ccurme March 7, 2025 19:27
@dosubot dosubot bot added the lgtm PR looks good. Use to confirm that a PR is ready for merging. label Mar 9, 2025
@ccurme ccurme enabled auto-merge (squash) March 9, 2025 21:02
@ccurme ccurme merged commit df459d0 into langchain-ai:master Mar 9, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Related to langchain-community 🤖:docs Changes to documentation and examples, like .md, .rst, .ipynb files. Changes to the docs/ folder lgtm PR looks good. Use to confirm that a PR is ready for merging. size:XL This PR changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants