SAGE Libs Intent (L3) - Keyword-based and LLM-based intent classification for conversational AI
Project description
sage-libs-intent
L3 intent recognition package for SAGE agentic workflows.
- PyPI:
isage-libs-intent - Import path:
sage_libs.sage_agentic.intent
Scope
This package only provides intent recognition logic and data structures.
KeywordIntentRecognizer: keyword and heuristic intent classificationLLMIntentRecognizer: LLM-based intent classificationselectormode: explicit integration withisage-agenticKeywordSelectorIntentClassifier: chain wrapper over recognizers- Intent catalog and typed intent/domain results
Boundary
- Intent package does not depend on tool-selection internals.
- Recognizer build path is explicit and deterministic.
- Package exports are explicit and fail-fast.
Recognizer Modes
keyword: built-in keyword and heuristic recognizerllm: LLM recognizer via OpenAI-compatible gatewayselector: explicit bridge toisage-agenticKeywordSelector
selector mode has no fallback behavior. If isage-agentic tool-selection modules are not available,
construction fails immediately with ModuleNotFoundError.
Installation
pip install isage-libs-intent
Quick Start
import asyncio
from sage_libs.sage_agentic.intent import IntentClassifier
async def main() -> None:
classifier = IntentClassifier(mode="keyword")
result = await classifier.classify("请帮我找一下 SAGE 的安装文档")
print(result.intent.value, result.confidence)
asyncio.run(main())
LLM Recognizer Example
import asyncio
from sage_libs.sage_agentic.intent import LLMIntentRecognizer, IntentRecognitionContext
async def main() -> None:
recognizer = LLMIntentRecognizer(control_plane_url="http://localhost:8080/v1")
result = await recognizer.classify(IntentRecognitionContext(message="Explain SAGE pipeline API"))
print(result.intent.value, result.confidence)
asyncio.run(main())
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file isage_intent-0.2.0-py2.py3-none-any.whl.
File metadata
- Download URL: isage_intent-0.2.0-py2.py3-none-any.whl
- Upload date:
- Size: 29.6 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
252ddab44c5c072af69d1028c0507a7387f877393ee461d1b3151e90548555f8
|
|
| MD5 |
5305e527704031ca32b185bdca16ac8d
|
|
| BLAKE2b-256 |
b159bc9b9622a8747e3ba2e70460f4f212c8b7ead32f2da260c76572c7df9da0
|