In typical LLM use-cases, users often find themselves in a “prompting loop” - tweaking a question repeatedly to get a useful answer. As the conversation grows, the LLM begins to lose the thread, forgetting initial constraints or, worse, hallucinating technical details to fill the gaps in its memory.
So instead of asking the LLM to “answer better”, this project asks the system to think better.
This project replaces the "Linear Chat" with an "Agentic Workflow."
Instead of relying on a single, fragile conversation, the platform initiates a specialized Chain of Command. By decoupling thinking from doing, it ensures every answer is:
- Strategically planned
- Grounded in multi-source data
- Critically audited before reaching the user
This approach directly addresses the twin problems of Information Overload and Context Drift.
-
Document Analysis
Semantic deep-dives into complex PDFs to answer user queries with evidence-backed reasoning. -
Log Diagnostics
Root-cause analysis by filtering noise and identifying temporal failure patterns in large log streams.
This project uses a custom-built Multi-Agent System (MAS).
While libraries like LangChain are used selectively (for document ingestion and vector retrieval), all agent logic, orchestration, and state transitions are fully custom. This design makes the system easier to understand, modify, and extend for anyone forking the repository.
Core Stack:
- Language: Python 3.10+
- API Layer: FastAPI (async endpoint management)
- Task Queue: Redis + RQ (background task processing)
- Vector Store: Qdrant (high-performance semantic retrieval)
- LLM: OpenAI (GPT-4o-mini)
- Libraries / Helpers:
- Pydantic — for structured data validation and type-safe job specifications
- LangChain — selectively for document ingestion and vector retrieval
Agentic AI refers to systems where the AI is given the agency to follow a process, rather than just completing a sentence. This project implements three foundational agentic concepts:
-
Decomposition (The Planner):
Instead of answering immediately, the system first asks: “What steps do I need to take to answer this accurately?” -
Specialization:
Different personas (Planner, Analyst, Critic) create a checks-and-balances system, similar to a professional engineering team. -
State Accumulation:
As the process moves from planning to reporting, a central State Object grows. Later agents can see the reasoning and decisions of earlier agents, enabling traceability and introspection.
When a job is submitted, the system follows this execution flow:
- FastAPI accepts the job and immediately returns a job_id, pushing the task to Redis.
- A background Worker picks up the job and initializes a Shared State (persistent job memory).
- The Planner maps out the investigation strategy.
- The Retriever executes the plan, fetching data from Qdrant or raw logs.
- The Analyst synthesizes findings under strict user-defined constraints.
- The Critic performs a Zero-Hallucination check against raw context.
- The Reporter delivers a structured final output.
The Planner acts as the Architect.
It converts a high-level objective into a numbered list of execution steps.
temperature=0is used to ensure logical, deterministic plans.
To prevent information gaps, the retriever uses the Planner’s steps to perform multiple targeted searches:
- Document Analysis: Uses Qdrant to retrieve semantic matches for each plan step.
- Log Analysis: Applies a signal filter to strip away INFO heartbeats and surface high-signal ERROR/FATAL patterns.
The Analyst is the Subject Matter Expert.
It synthesizes the filtered context into a technical breakdown while strictly adhering to user constraints (e.g., “Max 500 words”).
The Gatekeeper of Truth.
The Critic compares the Analyst’s claims against the raw context. If a claim is not explicitly supported by the data, it is flagged—preventing hallucinations from reaching the final report.
(Please find the sample input inside sample-input/ directory)
Live Diagnostic Demos
-
Document Analysis Flow:
Step-by-step results of agents parsing the EKS PDF and planning retrieval. Watch video -
Log Diagnostic Flow:
Step-by-step results of agents filtering log noise and identifying root cause. Watch video
Final Report Sample:
A sample final report generated after a complex log analysis, showcasing structured findings and confidence scoring.

If you run these locally, each agent’s execution will print step-by-step in the worker console.
Using raw logs:
In real-world scenarios, most application and infrastructure logs are generated in raw text format. You can upload raw log files directly to the /jobs/raw-logs endpoint for analysis. Once uploaded, the system automatically reads the log contents, injects them into the job specification, and executes the analysis workflow as usual - no need to pre-format or escape the logs. (A sample input Job Spec for raw logs endpoint is provided inside sample-input/ directory)
Below is a sample analysis report for a Karpenter scheduling failure on AWS using a raw log file:
- Python 3.10+
- Docker & Docker Compose
- OpenAI API Key
Docker is used to spin up all required infrastructure.
# Start Redis and Qdrant
docker-compose up -d- Redis powers the background task queue
- Qdrant stores vector embeddings
- Qdrant UI is available at: http://localhost:6333
Fork the repository to your GitHub account by clicking the Fork button on the top-right of the repo page. Then Clone your fork locally:
git clone https://github.com/<your-username>/agentic-analysis-platform.gitOr Clone directly:
git clone https://github.com/msdokania/agentic-analysis-platform.gitcd agentic-analysis-platform
python -m venv venv
source venv/bin/activate
pip install -r requirements.txtCreate a .env file in the project root:
OPENAI_API_KEY=your_openai_api_key
REDIS_HOST=localhost
REDIS_PORT=6379
QDRANT_URL=http://localhost:6333
QDRANT_COLLECTION_NAME=your-collection-name
Run two separate terminals:
Terminal 1 — API Server
python main.pyTerminal 2 — Worker
rq worker agent-jobsMacOS fork-safety workaround:
OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES rq worker agent-jobsOn first run:
- Place your PDF document in the data/ directory
- Uncomment bootstrap_docs() in main.py
- Update the filename passed to ingest_pdf()
This will ingest the document as vector embeddings into Qdrant for future retrieval.
- Analyst to retry if the Critic’s confidence < X
- Allow users to edit the plan before execution
- Structured Output: Forcing the AI to follow strict templates so it never forgets to include a specific section.
- Evidence Checking: Making the Critic highlight the exact line in the logs that proves the Analyst is right.
- For planning use Common Blueprints for standard tasks (like "AWS Connection Issues") to make the results more consistent and faster.
- Hybrid model routing (e.g., GPT-4o for planning, Claude 3.5 Sonnet for synthesis)
Contributions are welcome!
If you have ideas for:
- New agent personas
- Retrieval strategies
- Evaluation or verification techniques
Feel free to open an issue or submit a PR.
