struktx-ai


Namestruktx-ai JSON
Version 0.0.2b1 PyPI version JSON
download
home_pageNone
SummaryA configurable, typed AI framework with swappable LLM, classifier, handlers, and optional memory
upload_time2025-08-28 21:34:20
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10.0
licenseMIT
keywords ai chatbot framework langchain llm nlp
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <div align="center">
  <img src="/docs/public/logo-blue.png" alt="StruktX Logo" width="120" height="120">
  <br>
  <img src="/docs/public/nobg-both-white.png" alt="StruktX" width="200">
  
  A configurable, typed AI framework with swappable LLM, classifier, handlers, and memory for Natural Language to Action apps
  
  [![Python 3.8+](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/)
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
</div>






## Quick Install

### Using uv (Recommended)
```bash
# Install with core dependencies only
uv pip install struktx-ai

# Install with LLM support (LangChain)
uv pip install struktx-ai[llm]

# Install with vector store support
uv pip install struktx-ai[vector]

# Install with all optional dependencies
uv pip install struktx-ai[all]

# Install for development
uv pip install struktx-ai[dev]
```

### Using pip
```bash
# Install with core dependencies only
pip install struktx-ai

# Install with LLM support (LangChain)
pip install struktx-ai[llm]

# Install with vector store support
pip install struktx-ai[vector]

# Install with all optional dependencies
pip install struktx-ai[all]
```

### Source
```bash
# Create virtual env
uv venv

# Activate environment
source .venv/bin/activate

# Sync and install pyproject dependencies
uv sync

# Install finall Strukt package
uv pip install struktx-ai[all]
```

## Quick Start with LangChain
```python
from strukt import create, StruktConfig, HandlersConfig, LLMClientConfig, ClassifierConfig
from strukt.classifiers.llm_classifier import DefaultLLMClassifier
from strukt.prompts import DEFAULT_CLASSIFIER_TEMPLATE
from strukt.examples.time_handler import TimeHandler

from langchain_openai import ChatOpenAI
from strukt.langchain_helpers import LangChainLLMClient

# Create LangChain LLM client
langchain_llm = ChatOpenAI(api_key="your-openai-api-key")
llm = LangChainLLMClient(langchain_llm)

app = create(StruktConfig(
    llm=LLMClientConfig(llm),
    classifier=ClassifierConfig(
        factory=DefaultLLMClassifier(
            llm=llm,
            prompt_template=DEFAULT_CLASSIFIER_TEMPLATE,
            allowed_types=["time_service", "weather", "general"],
            max_parts=4,
        )
    ),
    handlers=HandlersConfig(
        registry={"time_service": TimeHandler(llm)},
        default_route="general",
    ),
))

app.invoke("What is the time in Tokyo?")
```

## What is StruktX?

StruktX is a Python framework for building AI applications with focus on natural language -> actions

- **🔄 Swappable Components**: LLM clients, classifiers, handlers, and memory engines
- **📝 Type Safety**: Full type hints and Pydantic models
- **⚙️ Configurable**: Factory-based configuration system
- **🔌 Extensible**: Easy to add custom components
- **🧠 Memory Support**: Optional conversation memory
- **🔧 Middleware**: Pre/post processing hooks

## Features

- **LLM Integration**: Support for any LLM via the `LLMClient` interface
- **Query Classification**: Route requests to appropriate handlers
- **Structured Outputs**: Pydantic model integration
- **Memory Engines**: Conversation history and context
- **Middleware System**: Pre/post processing hooks
- **LangChain Helpers**: Easy integration with LangChain ecosystem

## Requirements

- Python 3.10+
- Core: `pydantic>=2.0.0`, `python-dotenv>=1.0.0`
- Optional: LangChain packages, vector stores, etc.

## License

MIT License - see [LICENSE](LICENSE) file for details.

## Contributing

Contributions are welcome! Please report any issues, bugs, improvements, or features on GitHub.

## Support

- 📖 [Documentation](https://struktx.snowheap.ai/docs)
- 🐛 [Issue Tracker](https://github.com/snowheapllc/StruktX/issues)
- 💬 [Discussions](https://github.com/snowheapllc/StruktX/discussions)

<div align="right">
  <a href="https://github.com/snowheapllc">
    <img src="/docs/public/snowheap.png" alt="Snowheap LLC Logo" width="100">
  </a>
</div>


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "struktx-ai",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10.0",
    "maintainer_email": "Snowheap LLC <info@snowheap.com>",
    "keywords": "ai, chatbot, framework, langchain, llm, nlp",
    "author": null,
    "author_email": "Snowheap LLC <info@snowheap.com>",
    "download_url": "https://files.pythonhosted.org/packages/ee/6c/27f161f3f505559f129dc9df2282643132cd46a014a33b684e13fc54a87f/struktx_ai-0.0.2b1.tar.gz",
    "platform": null,
    "description": "<div align=\"center\">\n  <img src=\"/docs/public/logo-blue.png\" alt=\"StruktX Logo\" width=\"120\" height=\"120\">\n  <br>\n  <img src=\"/docs/public/nobg-both-white.png\" alt=\"StruktX\" width=\"200\">\n  \n  A configurable, typed AI framework with swappable LLM, classifier, handlers, and memory for Natural Language to Action apps\n  \n  [![Python 3.8+](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/)\n  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n</div>\n\n\n\n\n\n\n## Quick Install\n\n### Using uv (Recommended)\n```bash\n# Install with core dependencies only\nuv pip install struktx-ai\n\n# Install with LLM support (LangChain)\nuv pip install struktx-ai[llm]\n\n# Install with vector store support\nuv pip install struktx-ai[vector]\n\n# Install with all optional dependencies\nuv pip install struktx-ai[all]\n\n# Install for development\nuv pip install struktx-ai[dev]\n```\n\n### Using pip\n```bash\n# Install with core dependencies only\npip install struktx-ai\n\n# Install with LLM support (LangChain)\npip install struktx-ai[llm]\n\n# Install with vector store support\npip install struktx-ai[vector]\n\n# Install with all optional dependencies\npip install struktx-ai[all]\n```\n\n### Source\n```bash\n# Create virtual env\nuv venv\n\n# Activate environment\nsource .venv/bin/activate\n\n# Sync and install pyproject dependencies\nuv sync\n\n# Install finall Strukt package\nuv pip install struktx-ai[all]\n```\n\n## Quick Start with LangChain\n```python\nfrom strukt import create, StruktConfig, HandlersConfig, LLMClientConfig, ClassifierConfig\nfrom strukt.classifiers.llm_classifier import DefaultLLMClassifier\nfrom strukt.prompts import DEFAULT_CLASSIFIER_TEMPLATE\nfrom strukt.examples.time_handler import TimeHandler\n\nfrom langchain_openai import ChatOpenAI\nfrom strukt.langchain_helpers import LangChainLLMClient\n\n# Create LangChain LLM client\nlangchain_llm = ChatOpenAI(api_key=\"your-openai-api-key\")\nllm = LangChainLLMClient(langchain_llm)\n\napp = create(StruktConfig(\n    llm=LLMClientConfig(llm),\n    classifier=ClassifierConfig(\n        factory=DefaultLLMClassifier(\n            llm=llm,\n            prompt_template=DEFAULT_CLASSIFIER_TEMPLATE,\n            allowed_types=[\"time_service\", \"weather\", \"general\"],\n            max_parts=4,\n        )\n    ),\n    handlers=HandlersConfig(\n        registry={\"time_service\": TimeHandler(llm)},\n        default_route=\"general\",\n    ),\n))\n\napp.invoke(\"What is the time in Tokyo?\")\n```\n\n## What is StruktX?\n\nStruktX is a Python framework for building AI applications with focus on natural language -> actions\n\n- **\ud83d\udd04 Swappable Components**: LLM clients, classifiers, handlers, and memory engines\n- **\ud83d\udcdd Type Safety**: Full type hints and Pydantic models\n- **\u2699\ufe0f Configurable**: Factory-based configuration system\n- **\ud83d\udd0c Extensible**: Easy to add custom components\n- **\ud83e\udde0 Memory Support**: Optional conversation memory\n- **\ud83d\udd27 Middleware**: Pre/post processing hooks\n\n## Features\n\n- **LLM Integration**: Support for any LLM via the `LLMClient` interface\n- **Query Classification**: Route requests to appropriate handlers\n- **Structured Outputs**: Pydantic model integration\n- **Memory Engines**: Conversation history and context\n- **Middleware System**: Pre/post processing hooks\n- **LangChain Helpers**: Easy integration with LangChain ecosystem\n\n## Requirements\n\n- Python 3.10+\n- Core: `pydantic>=2.0.0`, `python-dotenv>=1.0.0`\n- Optional: LangChain packages, vector stores, etc.\n\n## License\n\nMIT License - see [LICENSE](LICENSE) file for details.\n\n## Contributing\n\nContributions are welcome! Please report any issues, bugs, improvements, or features on GitHub.\n\n## Support\n\n- \ud83d\udcd6 [Documentation](https://struktx.snowheap.ai/docs)\n- \ud83d\udc1b [Issue Tracker](https://github.com/snowheapllc/StruktX/issues)\n- \ud83d\udcac [Discussions](https://github.com/snowheapllc/StruktX/discussions)\n\n<div align=\"right\">\n  <a href=\"https://github.com/snowheapllc\">\n    <img src=\"/docs/public/snowheap.png\" alt=\"Snowheap LLC Logo\" width=\"100\">\n  </a>\n</div>\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A configurable, typed AI framework with swappable LLM, classifier, handlers, and optional memory",
    "version": "0.0.2b1",
    "project_urls": {
        "Bug Tracker": "https://github.com/snowheapllc/struktx/issues",
        "Documentation": "https://struktx.snowheap.ai",
        "Homepage": "https://github.com/snowheapllc/struktx",
        "Repository": "https://github.com/snowheapllc/struktx.git",
        "Source Code": "https://github.com/snowheapllc/struktx"
    },
    "split_keywords": [
        "ai",
        " chatbot",
        " framework",
        " langchain",
        " llm",
        " nlp"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "97c6453e5f18e86a570d70125dd9cb4319ad39ff110170dece9c7f12fd1a4e4f",
                "md5": "528712e8418282bd8042917cf1010103",
                "sha256": "dac78566881403e68905e34f72f1a40806e743f0fedcc933a5f86436eaf22b53"
            },
            "downloads": -1,
            "filename": "struktx_ai-0.0.2b1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "528712e8418282bd8042917cf1010103",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10.0",
            "size": 70354,
            "upload_time": "2025-08-28T21:34:18",
            "upload_time_iso_8601": "2025-08-28T21:34:18.915198Z",
            "url": "https://files.pythonhosted.org/packages/97/c6/453e5f18e86a570d70125dd9cb4319ad39ff110170dece9c7f12fd1a4e4f/struktx_ai-0.0.2b1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "ee6c27f161f3f505559f129dc9df2282643132cd46a014a33b684e13fc54a87f",
                "md5": "929df52d5239630004e6ee6965c269d2",
                "sha256": "5a683b093ad71ba10a5556f76ba84ef0782c99acb1a95dd0c06e31194ae66ccd"
            },
            "downloads": -1,
            "filename": "struktx_ai-0.0.2b1.tar.gz",
            "has_sig": false,
            "md5_digest": "929df52d5239630004e6ee6965c269d2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10.0",
            "size": 53972,
            "upload_time": "2025-08-28T21:34:20",
            "upload_time_iso_8601": "2025-08-28T21:34:20.300024Z",
            "url": "https://files.pythonhosted.org/packages/ee/6c/27f161f3f505559f129dc9df2282643132cd46a014a33b684e13fc54a87f/struktx_ai-0.0.2b1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-28 21:34:20",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "snowheapllc",
    "github_project": "struktx",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "struktx-ai"
}
        
Elapsed time: 0.51582s