Overview
Valthera is an open-source framework that enables LLM Agents to engage users in a more meaningful way. It is built on BJ Fogg’s Behavior Model (B=MAT) and leverages data from multiple sources (such as HubSpot, PostHog, and Snowflake) to assess a user’s motivation and ability before triggering an action. In this guide, you’ll learn:- Core Concepts: Overview of the components (Data Aggregator, Scorer, Reasoning Engine, and Trigger Generator).
- System Architecture: How data flows through the system and how decisions are made.
- Customization: How to extend connectors, scoring metrics, and decision rules to fit your needs.
Setup
This section covers installation of dependencies and setting up custom data connectors for Valthera.Instantiation
In this section, we instantiate the core components. First, we create a Data Aggregator to combine data from the custom connectors. Then, we configure the scoring metrics for motivation and ability.Invocation
Next, we set up the Reasoning Engine and Trigger Generator, then bring all components together by instantiating the Valthera Tool. Finally, we execute the agent workflow to process an input message.Chaining
This integration does not currently support chaining operations. Future releases may include chaining support.API reference
Below is an overview of the key APIs provided by the Valthera integration:- Data Aggregator: Use
data_aggregator.get_user_context(user_id)
to fetch aggregated user data. - Scorer: The
ValtheraScorer
computes motivation and ability scores based on the provided configurations. - Reasoning Engine: The
ReasoningEngine
evaluates decision rules to determine the appropriate action (trigger, improve motivation, improve ability, or defer). - Trigger Generator: Generates personalized trigger messages using the LLM.
- Valthera Tool: Integrates all the components to process inputs and execute the agent workflow.