The HK Automation Framework
In modern enterprise environments, generic AI wrappers fail. The HK Automation Framework is a proprietary architectural methodology designed to ensure robust, hallucination-free, and highly scalable AI agent deployments.
Phase 1: Knowledge Ingestion (GraphRAG over Vector RAG)
Instead of relying purely on semantic vector search (which struggles with multi-hop reasoning), the framework utilizes a dual-layer approach. We ingest unstructured data into a Knowledge Graph (Neo4j) to map entity relationships, and run pgvector alongside it. This ensures the AI understands *how* data is connected, not just *what* data looks similar.
Phase 2: Asynchronous Orchestration (FastAPI + n8n)
LLM calls are inherently slow (often taking 5-15 seconds). The framework strictly separates the request interface from the processing logic using FastAPI's asynchronous background tasks and n8n webhook triggers. This guarantees the user interface never freezes while waiting for the LLM.
Phase 3: Immutable Action Execution (Tool Calling)
When an AI agent needs to modify external systems (e.g., updating a CRM, sending an email), it does not execute the action directly. Instead, it outputs a highly structured JSON payload validating against Pydantic models. This payload is passed to a strict, non-AI execution layer (written in Python) that performs the action. This eliminates the risk of an AI hallucinating an API call.