aiconfig-context-basic

Build and manage LaunchDarkly AI Config user contexts with the Python SDK.

Updated Feb 4, 2026
One-click install
npx skills add https://github.com/launchdarkly-labs/aiconfigs-skills --skill aiconfig-context-basic
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: aiconfig-context-basic
Source: https://github.com/launchdarkly-labs/aiconfigs-skills/tree/main/aiconfig-context-basic
Command: npx skills add https://github.com/launchdarkly-labs/aiconfigs-skills --skill aiconfig-context-basic

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill lets teams create and manage structured user contexts for LaunchDarkly AI Config targeting, enabling personalized and segmented delivery of AI Configs without manual boilerplate.

Core Features & Use Cases

  • Create user or organization contexts with attributes such as user_id, name, email, region, and custom fields to drive targeting and personalization.
  • Support multi-context scenarios (user, organization) to enable complex targeting rules and experiments in AI Configs.
  • Use cases include building personalized AI responses, A/B testing prompts, and applying segmentation rules to config variations across applications.

Quick Start

Use the aiconfig-context-basic skill to build a simple context with a minimal user_id, and then fetch or apply an AI Config variation using that context.

Frequently Asked Questions about aiconfig-context-basic

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create user contexts for LaunchDarkly AI Config targeting?

User contexts for LaunchDarkly AI Config targeting are built using the Python SDK's Context.builder API, which accepts attributes like user_id, name, email, and custom fields. Pass the constructed context to your AI Config evaluation to enable personalized and segmented delivery.

Can I target AI Configs to multiple contexts like users and organizations?

Yes, LaunchDarkly supports multi-context scenarios using Context.multi_builder, allowing you to combine user and organization contexts in a single targeting evaluation. This enables complex segmentation and experimentation rules across your AI Config variations.

What Python SDK packages do I need to build and manage contexts for AI Configs?

You need Python 3.8 or later with the launchdarkly-server-sdk and launchdarkly-server-sdk-ai packages installed. These provide the Context API and AI Config evaluation capabilities required for building and managing user contexts.

How do I use contexts to personalize AI Config responses for different user segments?

Construct contexts with segment-identifying attributes—region, user tier, or custom fields—then pass them during AI Config evaluation. LaunchDarkly applies your targeting rules to deliver segment-specific config variations without manual routing logic.

What attributes can I include in a user context for AI Config targeting?

User contexts support standard attributes like user_id, name, email, and region, plus any custom fields you define. These attributes drive targeting rules and personalization logic in your AI Config variations.