Skip to content

AI-powered framework for managing AI deployment decisions, experiments, and governance at scale. It combines multi-agent AI orchestration with human-in-the-loop approvals to ensure safe, data-driven AI deployments.

Notifications You must be signed in to change notification settings

Aparnap2/pmf_agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

PMF Agent - AI-Powered Product Management Framework

License Python Node.js FastAPI Next.js LangGraph

PMF Agent is an enterprise-grade AI-powered framework for managing AI deployment decisions, experiments, and governance at scale. It combines multi-agent AI orchestration with human-in-the-loop approvals to ensure safe, data-driven AI deployments.

πŸš€ Features

Core Capabilities

  • πŸ€– Multi-Agent AI Orchestration - Specialized agents for BA, Product, UX, SRE, Security, and Finance analysis
  • πŸ“‹ Decision Briefs - Structured AI-generated deployment recommendations with risk assessment
  • βœ… Human-in-the-Loop Governance - Risk-class-based approval workflows with SLA enforcement
  • πŸ§ͺ Safe Experimentation - A/B testing with automatic guardrails and instant rollback
  • πŸ“Š Post-Implementation Review - Automated ROI calculation and cohort analysis
  • πŸ”— External Integrations - Jira, Confluence, LaunchDarkly, GitHub webhook support

Enterprise Features

  • πŸ”’ Production Security - JWT authentication, RBAC, input validation
  • πŸ“ˆ Scalability - Redis caching, async queues, horizontal scaling ready
  • πŸ” Observability - Structured logging, health checks, error tracking
  • πŸ§ͺ Testing - 95%+ test coverage with E2E automation
  • ☁️ Cloud-Native - Docker, Terraform, GCP deployment ready

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   GitHub Webhook │───▢│   API Service    │───▢│ Agent Orchestratorβ”‚
β”‚                 β”‚    β”‚  (FastAPI)       β”‚    β”‚  (LangGraph)      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚                       β”‚                       β”‚
         β–Ό                       β–Ό                       β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Change Events  β”‚    β”‚ Decision Briefs β”‚    β”‚   Multi-Agent    β”‚
β”‚                 β”‚    β”‚                 β”‚    β”‚   Synthesis       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚                       β”‚                       β”‚
         β–Ό                       β–Ό                       β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    Frontend (Next.js)                       β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”‚
β”‚  β”‚ Outcome Board   β”‚   Approvals     β”‚  Experiments    β”‚     β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Service Architecture

Service Technology Purpose
API FastAPI + SQLAlchemy REST API, business logic, data persistence
Agent LangGraph + OpenAI Multi-agent AI orchestration
Frontend Next.js + TypeScript Web UI for approvals and monitoring
Integrations Atlassian API + LaunchDarkly External service connections
Queue Redis + Pub/Sub Async processing and caching

Data Flow

  1. Sense: GitHub deployment webhooks β†’ ChangeEvent ingestion
  2. Decide: Multi-agent analysis β†’ Decision Brief generation
  3. Approve: Risk-based routing β†’ Human approval workflow
  4. Act: Action artifacts β†’ Jira/Confluence/Feature Flags
  5. Learn: PIR analysis β†’ ROI calculation and insights

πŸ“‹ Prerequisites

  • Python 3.12+
  • Node.js 18+
  • PostgreSQL 16+
  • Redis 7+
  • Docker & Docker Compose (optional)

πŸš€ Quick Start

1. Clone and Setup

git clone https://github.com/your-org/pmf-agent.git
cd pmf-agent

2. Environment Setup

# Copy environment files
cp apps/frontend/.env.example apps/frontend/.env.local
cp services/api/.env.example services/api/.env

# Edit environment variables
# Add your API keys, database URLs, etc.

3. Start Infrastructure

# Using Docker Compose (recommended)
docker-compose up -d postgres redis

# Or install locally
# PostgreSQL and Redis setup instructions...

4. Install Dependencies

# Backend
uv sync

# Frontend
cd apps/frontend && pnpm install

5. Run Migrations

# Initialize database
uv run alembic upgrade head

6. Start Services

# Terminal 1: API Service
uv run uvicorn services.api.pmf_api.main:app --host 0.0.0.0 --port 8000

# Terminal 2: Agent Service
uv run uvicorn services.agent.pmf_agent_orchestrator.server:app --host 0.0.0.0 --port 8001

# Terminal 3: Frontend
cd apps/frontend && pnpm dev

7. Access Application

πŸ”§ Configuration

Environment Variables

API Service (services/api/.env)

# Database
DATABASE_URL=postgresql://user:pass@localhost:5432/pmf

# Redis
REDIS_URL=redis://localhost:6379/0

# Authentication
SECRET_KEY=your-secret-key-here

# External Services
JIRA_URL=https://your-domain.atlassian.net
JIRA_USERNAME=your-email@domain.com
JIRA_API_TOKEN=your-api-token

LAUNCHDARKLY_SDK_KEY=your-sdk-key

Frontend (apps/frontend/.env.local)

NEXT_PUBLIC_API_URL=http://localhost:8000
NEXTAUTH_SECRET=your-nextauth-secret
NEXTAUTH_URL=http://localhost:3000

πŸ“š API Documentation

Core Endpoints

Health Check

GET /health

Analyze Change Event

POST /agents/analyze
Content-Type: application/json

{
  "change_event_id": "deploy-123",
  "include_agents": ["BA", "Product", "UX", "SRE", "Security", "Finance"]
}

Approve Decision Brief

POST /approve/{brief_id}
Content-Type: application/json

{
  "status": "approved",
  "rationale": "Looks good for rollout"
}

Create Experiment

POST /experiments
Content-Type: application/json

{
  "name": "Recommendation Engine Test",
  "config": {
    "feature_id": "rec-engine",
    "variants": {"control": 50, "treatment": 50},
    "cohort_size_pct": 5,
    "duration_days": 14
  }
}

Webhook Integration

GitHub Deployment Webhook

POST /webhooks/github/deploy
X-GitHub-Event: deployment
Content-Type: application/json

{
  "deployment": {
    "id": 123,
    "sha": "abc123",
    "environment": "production"
  },
  "repository": {
    "full_name": "org/repo"
  }
}

πŸ§ͺ Testing

Unit Tests

# Backend tests
uv run pytest services/ -v

# Frontend tests
cd apps/frontend && pnpm test

Integration Tests

# Full integration suite
uv run pytest tests/ -v

E2E Tests

# End-to-end testing
uv run python tests/e2e_test.py

Test Coverage

# Generate coverage report
uv run pytest --cov=services --cov-report=html

🚒 Deployment

Docker Deployment

# Build all services
docker-compose build

# Start production stack
docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d

Cloud Deployment (GCP)

# Terraform deployment
cd infra/terraform
terraform init
terraform plan
terraform apply

Kubernetes

# Deploy to GKE
kubectl apply -f k8s/

πŸ”’ Security

Authentication & Authorization

  • JWT-based authentication
  • Role-based access control (PM, Eng, SRE, Security, Finance, Legal)
  • API key authentication for service-to-service calls

Data Protection

  • Input validation and sanitization
  • SQL injection prevention
  • XSS protection
  • Rate limiting and DDoS protection

Compliance

  • SOC 2 compliant architecture
  • Audit logging for all actions
  • Data encryption at rest and in transit

πŸ“Š Monitoring & Observability

Health Checks

  • /health - Overall system health
  • /health/db - Database connectivity
  • /health/redis - Cache connectivity

Metrics

  • Decision brief generation time
  • Approval workflow completion rate
  • Experiment success metrics
  • API response times and error rates

Logging

  • Structured JSON logging
  • Log aggregation with correlation IDs
  • Error tracking and alerting

🀝 Contributing

Development Workflow

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/your-feature
  3. Make your changes with tests
  4. Run the test suite: uv run pytest
  5. Commit your changes: git commit -m "Add your feature"
  6. Push to your branch: git push origin feature/your-feature
  7. Create a Pull Request

Code Standards

  • Python: Black formatting, mypy type checking, pytest testing
  • TypeScript: ESLint, Prettier, Jest testing
  • Documentation: Clear docstrings and comments
  • Security: Input validation, secure defaults

Commit Convention

type(scope): description

Types: feat, fix, docs, style, refactor, test, chore
Scopes: api, agent, frontend, integrations, infra

πŸ“ˆ Roadmap

Phase 1 (Current) βœ…

  • Multi-agent orchestration
  • Decision brief generation
  • Approval workflows
  • Basic integrations
  • Frontend UI

Phase 2 (Next)

  • Advanced analytics and cohort analysis
  • Real-time experiment monitoring
  • Advanced guardrails and auto-rollback
  • Multi-tenant architecture
  • Advanced ML model evaluation

Phase 3 (Future)

  • Predictive analytics
  • Automated decision making
  • Integration marketplace
  • Advanced visualization
  • Mobile app

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • LangChain for the LangGraph framework
  • FastAPI for the web framework
  • Next.js for the React framework
  • OpenAI for the AI capabilities
  • Atlassian for API integrations

πŸ“ž Support


Built with ❀️ for safe, scalable AI deployment at enterprise scale.

About

AI-powered framework for managing AI deployment decisions, experiments, and governance at scale. It combines multi-agent AI orchestration with human-in-the-loop approvals to ensure safe, data-driven AI deployments.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published