IamBishalIamBishal
Featured

AegiSense AI Assistant

Agentic AI that answers, retrieves and acts — safely — for identity and security teams.

An AI-powered assistant for identity and security operations. Uses RAG, tool calling, and guardrails to answer security questions and automate workflows.

  • AI Agents
  • RAG
  • Guardrails
  • MCP
  • LangGraph
  • FastAPI
  • Updated Sep 21, 2026
  • In Active Development
  • 8 min read
Type
Prototype
License
MIT (planned)
Language
Python, TypeScript
Updated
Sep 21, 2026

Overview

AegiSense AI Assistant is an experimental project that demonstrates how AI agents can assist with identity and security operations. It combines retrieval-augmented generation (RAG), tool calling, and policy-based guardrails to provide accurate, secure, and actionable responses.

This prototype explores real-world use cases such as answering security questions, retrieving documentation, analyzing logs, and automating routine tasks.

Key Features

  • Retrieval-augmented generation (RAG) with company documentation
  • Tool calling for identity and security operations
  • Policy-based guardrails for safe responses
  • Conversation history and context management
  • Support for multiple data sources (docs, DB, APIs)
  • Simple and clean web interface
  • Extensible architecture for custom tools
  • Open source (planned)

System Architecture

High-level architecture of the AegiSense AI Assistant.

User

  • Web UI
  • API
  • CLI / Tools

AI Agent

  • Orchestrator (LangGraph)
  • LLM (Claude / OpenAI)
  • Tool Calling
  • Guardrails & Policies
  • Memory & Context
  • Knowledge Base(Documents, FAQs)
  • External Tools(Identity APIs, SIEM, etc.)
  • Databases(PostgreSQL, Vector DB)
  • Monitoring & Logs(Prometheus, Grafana)

Tech Stack

  • Python
  • LangGraph
  • FastAPI
  • OpenAI / Claude
  • PostgreSQL
  • Qdrant
  • Docker
  • Next.js

Screenshots

Chat (1 of 4)

Code Example

View on GitHub
rag_query.py
# Simple example: RAG query over the AegiSense knowledge base
from langchain_anthropic import ChatAnthropic
from langchain_openai import OpenAIEmbeddings
from langchain_qdrant import QdrantVectorStore
from langchain_core.prompts import ChatPromptTemplate
from langchain_core.runnables import RunnablePassthrough
from langchain_core.output_parsers import StrOutputParser

llm = ChatAnthropic(model="claude-sonnet-5", temperature=0)

retriever = QdrantVectorStore.from_existing_collection(
    collection_name="aegisense_docs",
    embedding=OpenAIEmbeddings(model="text-embedding-3-small"),
    url="http://localhost:6333",
).as_retriever(search_kwargs={"k": 4})

prompt = ChatPromptTemplate.from_template(
    "Answer using only this context:\n{context}\n\nQuestion: {question}"
)

def format_docs(docs):
    return "\n\n".join(doc.page_content for doc in docs)

chain = (
    {"context": retriever | format_docs, "question": RunnablePassthrough()}
    | prompt
    | llm
    | StrOutputParser()
)

print(chain.invoke("How do I enable MFA for a user?"))

What I Learned

  • RAG significantly improves response accuracy with domain-specific data.
  • Guardrails are essential for safe and reliable AI agents.
  • Tool calling enables powerful real-world automation.
  • A modular architecture makes it easy to extend with new capabilities.

Next Steps

  • Add support for multi-agent collaboration (planner + executor).
  • Integrate with real identity providers (Azure AD, Okta).
  • Build a more advanced guardrail framework.
  • Open source the project and write detailed documentation.
  • Create a video tutorial series.