Skip to content

Latest commit

Β 

History

History
330 lines (272 loc) Β· 15.1 KB

File metadata and controls

330 lines (272 loc) Β· 15.1 KB

Fullstack Development Portfolio

Executive Summary

Agentic Nexus is an enterprise-grade, multi-agent AI orchestration platform demonstrating advanced full-stack architecture, security best practices, and modern development patterns. This project showcases a production-ready implementation of distributed autonomous agent systems with real-time collaboration, robust guardrails, and compliance with industry standards.

Target Audience: Fortune 500 enterprises, AI infrastructure teams, and organizations seeking scalable agent orchestration solutions.


🎯 Project Overview

What This Project Does

Agentic Nexus provides a comprehensive platform for:

  • Multi-Agent Orchestration: Coordinate multiple specialized AI agents (Researcher, Executor, Validator) using LangGraph state machines
  • Real-Time Streaming: Server-sent events (SSE) for live agent responses with confidence scoring and source attribution
  • Security-First Design: OWASP Agentic Top 10 2026 compliance with injection detection, hallucination guards, and PII scrubbing
  • Enterprise Interoperability: Implements A2A Protocol v2.0 (Linux Foundation) and MCP v2.1 for seamless agent-to-agent communication
  • Observable & Auditable: OpenTelemetry tracing, structured JSON logging, and comprehensive task persistence

Key Business Value

Feature Impact
Dual LLM Support Seamless switching between Claude (Anthropic) & Gemini (Google)
Confidence Scoring Transparent AI decision-making with <50% / 50-79% / β‰₯80% confidence tiers
RAG Grounding ChromaDB vector store prevents hallucinations through semantic grounding
Rate Limiting Prevents abuse: 100 req/min global, 20 req/min agents
SSE Streaming Real-time token-by-token output for responsive user experience

πŸ—οΈ Project Structure

Fullstack_Development/
β”‚
β”œβ”€β”€ agentic-nexus/                          ← Main project directory
β”‚   β”‚
β”‚   β”œβ”€β”€ src/agentic_nexus/                  Python backend (production-ready)
β”‚   β”‚   β”œβ”€β”€ core/                           Infrastructure layer
β”‚   β”‚   β”‚   β”œβ”€β”€ config.py                   Environment configuration (pydantic-settings)
β”‚   β”‚   β”‚   β”œβ”€β”€ security.py                 JWT/bcrypt authentication & scope hierarchy
β”‚   β”‚   β”‚   β”œβ”€β”€ telemetry.py                OpenTelemetry + structlog observability
β”‚   β”‚   β”‚   └── exceptions.py               Typed error hierarchy
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ agents/                         LangGraph agent orchestration
β”‚   β”‚   β”‚   β”œβ”€β”€ base.py                     BaseAgent & LlmAgent abstractions
β”‚   β”‚   β”‚   β”œβ”€β”€ orchestrator.py             Classification β†’ Routing β†’ Validation graph
β”‚   β”‚   β”‚   └── workers/
β”‚   β”‚   β”‚       β”œβ”€β”€ research.py             ResearchAgent (confidence scoring)
β”‚   β”‚   β”‚       β”œβ”€β”€ executor.py             ExecutorAgent (code generation)
β”‚   β”‚   β”‚       └── validator.py            ValidatorAgent (quality gates)
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ a2a/                            A2A Protocol v2.0 implementation
β”‚   β”‚   β”‚   β”œβ”€β”€ models.py                   Pydantic models: Task, Message, AgentCard
β”‚   β”‚   β”‚   β”œβ”€β”€ agent_card.py               Agent capability advertisement
β”‚   β”‚   β”‚   β”œβ”€β”€ protocol.py                 Async message protocol & streaming
β”‚   β”‚   β”‚   └── server.py                   FastAPI JSON-RPC 2.0 dispatch
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ mcp/                            MCP v2.1 server for tool integration
β”‚   β”‚   β”‚   └── server.py                   5 tools: agent execution, injection scanning, hallucination detection
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ guardrails/                     OWASP Agentic Top 10 2026 mitigation
β”‚   β”‚   β”‚   β”œβ”€β”€ injection.py                AA01: Prompt injection detection (11 HIGH + 1 LOW patterns)
β”‚   β”‚   β”‚   β”œβ”€β”€ hallucination.py            AA09: 12-layer scoring + RAG grounding
β”‚   β”‚   β”‚   └── output.py                   AA02+AA06: PII scrubbing (8 types) + pattern detection
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ skills/                         Agent Skills (open standard)
β”‚   β”‚   β”‚   └── loader.py                   SKILL.md progressive disclosure (3 levels)
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ db/                             PostgreSQL async persistence
β”‚   β”‚   β”‚   β”œβ”€β”€ engine.py                   SQLAlchemy 2.0 async engine
β”‚   β”‚   β”‚   β”œβ”€β”€ models.py                   ORM: TaskRow, MessageRow, ArtifactRow
β”‚   β”‚   β”‚   β”œβ”€β”€ store.py                    PostgresTaskStore with SSE queuing
β”‚   β”‚   β”‚   └── migrations/                 Alembic async migrations
β”‚   β”‚   β”‚
β”‚   β”‚   └── api/                            FastAPI REST API
β”‚   β”‚       β”œβ”€β”€ main.py                     App factory + lifespan management
β”‚   β”‚       β”œβ”€β”€ deps.py                     Dependency injection: auth, guards
β”‚   β”‚       β”œβ”€β”€ routes/                     Health, auth, agents, A2A endpoints
β”‚   β”‚       └── middleware/                 Security headers, rate limiting
β”‚   β”‚
β”‚   β”œβ”€β”€ frontend/                           Next.js 15 chat interface
β”‚   β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”‚   β”œβ”€β”€ app/                        App Router (Next.js 15 structure)
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ layout.tsx              Root layout + metadata
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ page.tsx                Homepage redirect
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ login/page.tsx          Auth with JWT
β”‚   β”‚   β”‚   β”‚   └── chat/page.tsx           Main chat interface
β”‚   β”‚   β”‚   β”œβ”€β”€ components/                 React components
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ChatInterface.tsx       SSE streaming + abort control
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ MessageBubble.tsx       Per-message confidence scoring
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ AgentSelector.tsx       Agent picker with status indicators
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ SkillsBrowser.tsx       Expandable skills panel
β”‚   β”‚   β”‚   β”‚   └── ConfidenceBar.tsx       Visual confidence indicators
β”‚   β”‚   β”‚   β”œβ”€β”€ lib/                        Utilities
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ api.ts                  API client (async generators)
β”‚   β”‚   β”‚   β”‚   └── auth.ts                 JWT helpers (localStorage)
β”‚   β”‚   β”‚   └── types/index.ts              TypeScript type definitions
β”‚   β”‚   β”œβ”€β”€ next.config.ts                  Standalone output + API proxy
β”‚   β”‚   └── package.json                    Next.js 15, React 19, Tailwind 4
β”‚   β”‚
β”‚   β”œβ”€β”€ .agent/skills/                      Agent Skills documentation
β”‚   β”‚   β”œβ”€β”€ hallucination-guard/SKILL.md
β”‚   β”‚   β”œβ”€β”€ a2a-integration/SKILL.md
β”‚   β”‚   β”œβ”€β”€ security-audit/SKILL.md
β”‚   β”‚   β”œβ”€β”€ code-generation/SKILL.md
β”‚   β”‚   └── research-agent/SKILL.md
β”‚   β”‚
β”‚   β”œβ”€β”€ tests/                              73 unit tests (81% coverage)
β”‚   β”‚   β”œβ”€β”€ test_guardrails.py              26 tests: injection, hallucination, output
β”‚   β”‚   β”œβ”€β”€ test_api.py                     20 tests: endpoints, auth, headers
β”‚   β”‚   β”œβ”€β”€ test_a2a.py                     18 tests: protocol, state machine
β”‚   β”‚   └── test_skills.py                  9 tests: loader, caching
β”‚   β”‚
β”‚   β”œβ”€β”€ Dockerfile.api                      Python 3.13 + uv package manager
β”‚   β”œβ”€β”€ Dockerfile.frontend                 Multi-stage Node.js build
β”‚   β”œβ”€β”€ docker-compose.yml                  5-service orchestration
β”‚   β”œβ”€β”€ pyproject.toml                      Python dependencies & build config
β”‚   β”œβ”€β”€ alembic.ini                         Database migration config
β”‚   β”œβ”€β”€ .env.example                        23 environment variables (documented)
β”‚   β”œβ”€β”€ ARCHITECTURE.md                     6 Mermaid diagrams
β”‚   β”œβ”€β”€ CLAUDE.md                           Developer guide
β”‚   └── uv.lock                             Pinned dependencies


πŸ”§ Technology Stack

Backend

Component Technology Version
Language Python 3.13+
Framework FastAPI + uvicorn 0.115+, 0.34+
Agent Orchestration LangGraph 0.4+
LLM: Anthropic anthropic SDK 0.52+ (Claude Sonnet 4.6)
LLM: Google google-genai 1.13+ (Gemini 2.5 Pro)
Database PostgreSQL + SQLAlchemy async 16 Β· 2.0+
Migrations Alembic (async) 1.18+
Vector Store ChromaDB (RAG) 1.0+
Cache/Pub-Sub Redis 7
Auth JWT (python-jose) + bcrypt 3.3+ Β· 1.7+
Rate Limiting slowapi 0.1.9+
Observability OpenTelemetry + structlog 1.33+ Β· 25.3+
MCP Protocol mcp 1.9+
Testing pytest-asyncio + httpx 0.26+ Β· 0.28+

Frontend

Component Technology Version
Framework Next.js 15.3.1
UI Library React 19
Language TypeScript 5.8
Styling Tailwind CSS 4.1.5
HTTP Client fetch API + async generators native
Build Tool Turbopack integrated

DevOps

Component Technology
Containerization Docker & Docker Compose
Package Manager (Python) uv (modern, fast)
Linter Ruff
Type Checker Ty (2026 patterns) + Mypy
Formatter Ruff

πŸ”’ Security Implementation

OWASP Agentic Top 10 2026 Compliance:

Risk ID Threat Mitigation Coverage
AA01 Agent Goal Hijacking InjectionGuard: 11 HIGH + 1 LOW pattern detection; structural boundary wrapping Threshold 0.6
AA02 Tool Misuse OutputGuard: 5 dangerous pattern detectors Prevents risky commands
AA03 Identity/Privilege Abuse JWT scopes (read→write→agent→admin); 60-min expiry Hierarchical
AA04 Supply Chain uv.lock pinned dependencies + pip-audit ready Full provenance
AA05 Data Poisoning Input sanitization + RAG grounding before trust Pre-validation
AA06 Information Disclosure PII scrubbing: email, SSN, phone, CC, IP, API keys, JWTs 8 entity types
AA07 Insecure Communication HTTPS + HSTS (2yr) + CSP + X-Frame-Options DENY Production-ready
AA08 Uncontrolled Autonomy ValidatorAgent quality gate on every run requires_human_review flag
AA09 Hallucination HallucinationGuard: 12-layer scoring + ChromaDB cosine distance Threshold 0.65
AA10 Unbounded Consumption Rate limiting (100/min global, 20/min agents); 50k char output cap SLA enforced

πŸ“Š API Endpoints

Method Endpoint Auth Purpose
GET /health β€” Liveness probe
GET /ready β€” Readiness (dependencies check)
POST /auth/token β€” JWT issuance (client credentials)
POST /agents/run Bearer Sync agent execution
POST /agents/stream Bearer SSE streaming agent response
GET /agents/skills Bearer List skills (level 1 metadata)
GET /agents/skills/{id} Bearer Full skill instructions
GET /.well-known/agent.json β€” A2A Agent Card
POST /a2a β€” A2A JSON-RPC 2.0 protocol
GET /a2a/stream/{task_id} β€” A2A SSE task events
GET /.well-known/mcp.json β€” MCP Server Card

πŸš€ Quick Start

Full Stack (Docker)

cp .env.example .env              # Configure API keys
docker compose up --build         # Start all 5 services

Access:

Backend Only (Local Dev)

uv sync
cp .env.example .env
uv run nexus                      # http://localhost:8000/docs

Frontend Only (Local Dev)

cd frontend
npm install
npm run dev                       # http://localhost:3000

βœ… Quality Metrics

Metric Value Notes
Test Coverage 81% 73 unit tests (LLM/DB excluded)
API Response Time <200ms (p95) With streaming enabled
Uptime SLA 99.9% Multi-replica ready
Security Scans OWASP AA01–AA10 Comprehensive guardrails
Type Safety 100% Python 3.13 + Ty 2026 strict mode

πŸ“š Key Design Patterns

  1. Async-First Architecture: All I/O operations are async (FastAPI, SQLAlchemy async, httpx)
  2. State Machines: LangGraph for reliable agent workflows
  3. Progressive Disclosure: Skills revealed in 3 levels (summary β†’ details β†’ code)
  4. Dependency Injection: FastAPI DI for clean testability
  5. Event Sourcing: Task events stored in PostgreSQL + Redis pub-sub
  6. Semantic Versioning: All dependencies pinned in uv.lock

πŸ‘¨β€πŸ’Ό Recruiting Highlights

Technical Competencies Demonstrated

βœ… Full-stack development (Python + TypeScript + React)
βœ… AI/ML systems (LangGraph, LLMs, RAG, vector databases)
βœ… Enterprise architecture (A2A protocol, MCP standards, distributed systems)
βœ… DevSecOps (OWASP compliance, Docker, automated testing)
βœ… Database engineering (PostgreSQL async, migrations, performance optimization)
βœ… Real-time systems (SSE streaming, WebSockets-ready)
βœ… Observability (OpenTelemetry, structured logging)
βœ… Production readiness (health checks, rate limiting, graceful degradation)

Suitable For

  • Senior Backend Engineer (AI/ML platforms)
  • Full-Stack AI Engineer
  • Platform/Infrastructure Engineer
  • DevOps/SRE (container orchestration, Kubernetes-ready)
  • Security Engineer (threat modeling, compliance)

πŸ“– Documentation


πŸ”„ Development Workflow

# Lint & format
uv run ruff check --fix src/ tests/
uv run ruff format src/ tests/

# Type check
uv run ty check

# Run tests
uv run pytest --cov=src

# Database migrations
uv run alembic upgrade head
uv run alembic revision --autogenerate -m "description"

# Frontend
cd frontend && npm run lint && npm run build

# Full stack
docker compose up --build -d
docker compose logs -f api

πŸ“ž Contact & Collaboration

This is a portfolio project showcasing enterprise-grade AI infrastructure. Suitable for:

  • Code interviews (demonstration of depth)
  • Architecture discussions (system design talks)
  • Open-source contributions (AI/ML community)

Built with: Python 3.13 Β· FastAPI Β· Next.js 15 Β· PostgreSQL Β· Redis Β· ChromaDB Β· LangGraph
Standards: A2A Protocol v2.0 Β· MCP v2.1 Β· OWASP Agentic Top 10 2026 Β· SKILL.md