Skip to content
View HaystackedAI's full-sized avatar
💭
I may be slow to respond.
💭
I may be slow to respond.

Block or report HaystackedAI

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Content in all repositories owned by your account will be closed.
Maximum 250 characters. Please don’t include any personal information such as legal names or email addresses. Markdown is supported. This note will only be visible to you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
HaystackedAI/README.md

🧠 Haystacked

Agentic AI applications built with LangChain & Haystack — grounded, explainable, and production-ready.

Haystacked — Agentic AI Systems



Python LangChain Haystack SQL Vector Search License


LinkedIn Twitter


🚀 Mission

Haystacked exists to build real AI agents — not demos.

Level 1: Answering (LLMs today)
Level 2: Tool execution (agents today)
Level 3: Code generation (adaptive solutions)
Level 4: Question generation (rare / emerging)
Level 5: Problem discovery (almost none)

🧠 What Haystacked Builds

  • 🤖 Agentic AI systems using LangChain and Haystack
  • 🧰 Tool-orchestrated workflows (SQL, retrieval, web search, APIs)
  • 📊 Data-grounded reasoning over structured and unstructured sources
  • 🔐 Production-safe execution with guardrails and observability
  • ✅ Explainable answers backed by traceable evidence

This is not prompt engineering.
This is systems engineering with LLMs.


🏗️ Agent Architecture

flowchart LR
    Q[User Query] --> A[Agent]
    A -->|Plan| R[Tool Router]

    R -->|SQL| DB1[Deal Table]
    R -->|SQL| DB2[Canada Wages DB]
    R -->|Vector| VS[Vector Store]
    R -->|Web| WEB[External Search]

    DB1 --> A
    DB2 --> A
    VS --> A
    WEB --> A

    A --> L[LLM Reasoning]
    L --> O[Grounded & Explainable Answer]
Loading

🧩 Core System Components

🔹 SQL Tooling

  • Schema-aware query generation
  • Read-only execution
  • Parameterized queries
  • Row limits and timeouts

🔹 Vector Retrieval

  • Semantic similarity search
  • Context injection for reasoning
  • Historical and domain grounding

🔹 External Search

  • Real-time data enrichment
  • Clearly labeled non-authoritative sources
  • Never overrides internal data

🔐 Safety & Guardrails

Every agent execution is constrained by design:

  • ❌ No data mutation (INSERT, UPDATE, DELETE, DROP)
  • ✅ SELECT-only SQL queries
  • ⏱ Execution time limits
  • 📉 Result size caps
  • 🔍 Pre-execution validation
def validate_sql(query: str) -> None:
    assert query.strip().lower().startswith("select")
    forbidden = ["insert", "update", "delete", "drop", "alter"]
    for keyword in forbidden:
        if keyword in query.lower():
            raise ValueError("Forbidden SQL operation")

🧠 Explainability by Default

Every response produced by Haystacked includes:

  • Answer — the conclusion
  • Sources — where the data came from
  • Reasoning — how the conclusion was derived

Example:

Answer:
Average wage growth for Ontario tech roles is 4.2%.

Sources:
- Canada Wages Database (2023–2024)
- Vector context: regional labor trends

Reasoning:
Filtered by province and industry, then compared year-over-year averages.

📌 Example Agent Queries

  • “What’s the average wage growth for tech roles in Ontario?”
  • “Compare fintech deal sizes between Q2 and Q3”
  • “Are deal trends aligned with labor market signals?”
  • “Summarize financial risks using current wage data”

🛠️ Technology Stack

  • Python 3.13
  • LangChain — agent orchestration
  • Haystack — retrieval & document pipelines
  • SQL (Postgres / MySQL) — authoritative data access
  • Vector Stores (pgvector / Chroma) — semantic retrieval
  • LLMs (GPT-5 class) — reasoning & synthesis

🧪 Built for Production

  • Deterministic tool execution
  • Modular, extensible agent design
  • Framework-agnostic architecture
  • Observability-ready reasoning traces

🔮 Roadmap

  • Multi-agent collaboration
  • Cost-aware routing
  • Caching & replay
  • Human-in-the-loop review
  • Visualization of reasoning traces

Haystacked — AI agents that reason over reality.

Pinned Loading

  1. HYPech.com_Case8Thread HYPech.com_Case8Thread Public

    Java

  2. HYPech.com_Case8ThreadClass HYPech.com_Case8ThreadClass Public

    Java

  3. uChat3 uChat3 Public

    VIP RecylerView

    Java

  4. A2UI-Chart A2UI-Chart Public

    Agent-driven charts for Google's A2UI protocol — the LLM never touches your data. A React hook + a Strands-ready, ADK-free agent producer.

    TypeScript 1