-
FastAPI – What Is “HttpBearer()” ?
FastAPI – What Is “HTTPBearer()” ? Table Of Contents: What Is HTTPBearer ? How User Request Auth Happens ? What Is The Meaning Of Bearer ? Without HTTPBearer How We Have To Extract Token ? (1) What Is HTTPBearer ? (2) How User Request Auth Happens ? (3) What Is The Meaning Of Bearer ? (4) Without HTTPBearer How We Have To Extract Token ?
-
FastAPI – What Is ‘Depends’ In Fast API ?
FastAPI – What Is ‘Depends’ In FastAPI? Table Of Contents: What Is Depends? Why Do We Need Depends? Examples Of Using Depends. We have ‘lifespan’ Method Then Why We Needs ‘Depends’? (1) What Is Depends? (2) Why Do We Needs Depends? (3) Examples Of Depends. (4) We have ‘lifespan’ Method Then Why We Needs ‘Depends’?
-
FastAPI – What Is ‘response_model’ Parameter ?
FastAPI – What Is ‘response_model’ & “request_model” Parameter ?
-
FastAPI – Process Chain
FastAPI – Process Chain
-

EAP – Agentic Platform Flowchart
Agentic Platform Flowchart app/main.py import logging from contextlib import asynccontextmanager from fastapi import FastAPI from app.api.routes import router from app.core.config import get_settings from app.db.session import init_db from app.middleware.logging import request_logging from app.middleware.tracing import tracing @asynccontextmanager async def lifespan(_:FastAPI): init_db() yield def create_app()-> FastAPI: settings = get_settings() logging.basicConfig(level = settings.log_level) app = FastAPI(title="Service Now Agentic AI", version="1.0.0", lifespan=lifespan) app.middleware('http')(tracing) app.middleware('http')(request_logging) app.include_router(router) return app app = create_app() app/api/routes.py from uuid import uuid4 from fastapi import APIRouter, Depends from app.api.dependencies import get_agent_graph, get_memory from app.core.config import get_settings from app.middleware.auth import require_user from app.schemas.chat import ChatRequest, ChatResponse from app.schemas.incident import IncidentCreate from app.schemas.response import
-

Python Library – Contextlib
Python Library – Contextlib Table Of Contents: What Problem “contextlib” Solves? Why Not To Use “with” Block? What Is The Use Of ‘yield’ In @contextmanager ‘yield’ Without A Return Value. Where Is The “with” Block? (1) What Problem “contextlib” Solves? (2) Why Not To Use “with” Block? (3) What Is The Use Of ‘yield’ In @contextmanager from contextlib import contextmanager @contextmanager def my_context(): # ┌─── SETUP (runs first) print("🔧 Setting up") resource = "My Resource" # ┌─── GIVE to with block yield resource # ↑ Pauses here while 'with' block runs # ↓ Resumes here after 'with' block finishes #
-
Agentic AI – Service Now AI Agent
Agentic AI – Service Now Agent servicenow-agentic-ai/ │ ├── app/ │ │ ├── api/ │ │ ├── routes.py │ │ └── dependencies.py │ │ │ ├── agents/ │ │ ├── supervisor_agent.py │ │ ├── incident_agent.py │ │ ├── knowledge_agent.py │ │ └── request_agent.py │ │ │ ├── graph/ │ │ ├── state.py │ │ ├── nodes.py │ │ ├── router.py │ │ └── graph.py │ │ │ ├── tools/ │ │ ├── incident_tools.py │ │ ├── kb_tools.py │ │ └── request_tools.py │ │ │ ├── services/ │ │ ├── servicenow_service.py │ │ ├── llm_service.py │ │ ├── vector_service.py │ │
-
ERP – Vector Retrival
EAP – Vector Retrival
-
ERP – Vector Storage
EAP – Vector Storage
-
EAP – Document Indexing
EAP – Document Indexing # ── STEP 3 + 4: Embed + index ───────────────────────── collection_id = f"col-{tenant_id}" logger.info("📦 Indexing Into Vector Search") t0 = perf_counter() index_result = await index_chunks( project_id=PROJECT_ID, location=LOCATION, collection_id=collection_id, chunks=all_chunks, event_status=event_status, ) timings["indexing"] = perf_counter() – t0 logger.info(f"✅ Indexing Complete [{_fmt(timings['indexing'])}]") import logging import hashlib from typing import List, Dict from rag_pipeline.indexing import VectorIndexClient, enforce_schema from rag_pipeline.indexing.helpers import ( build_data_schema, build_auto_embedding_vector_schema, ) logger = logging.getLogger("VectorIndexingService") # – – ———————————— # Schema Configuration # – – ———————————— EMBEDDING_FIELD = "embedding" DATA_SCHEMA = build_data_schema( properties={ "file_name": {"type": "string"}, "body": {"type": "string"}, }, required=["body"], ) VECTOR_SCHEMA = build_auto_embedding_vector_schema( embedding_field=EMBEDDING_FIELD, text_template="{body}",
