Outshift Logo

Rules Context

A powerful rule management system that allows users to create, configure, and apply behavioral rules that govern how AI agents respond in different scenarios. Provides persistent rule storage, import/export capabilities, and seamless integration with chat conversations.

Preview

Rules Context Preview

Features

  • Create custom rules with names, descriptions, and content
  • Toggle rules active/inactive for different contexts
  • Import rules from files (.rules, .cursorrules, etc.)
  • Persistent storage in browser localStorage

Installation

Integration & Configuration

Installation

Instructions

# Initialize HAX in your project
agntcy-hax init

# Add the rules context
agntcy-hax add composer rules-context

Usage

The rules context system provides a management interface and context integration for behavioral rules.

Component Setup

Setup

import { RulesProvider, useRules, RulesModal } from "@/hax/composer/rules-context";
export function ChatWithRules() {
const [showRulesModal, setShowRulesModal] = useState(false);
return (
<RulesProvider>
<div className="chat-interface">
<button onClick={() => setShowRulesModal(true)}>
Manage Rules
</button>
<RulesModal
open={showRulesModal}
onOpenChange={setShowRulesModal}
/>
{/* Chat interface */}
</div>
</RulesProvider>
);
}

© 2025 Outshift. All Rights Reserved.