How khushi02-git/agentaccess works
AgentAccess is a policy-based access-control framework for AI-agent database and OS operations, with a web console for oversight. The main workflow routes API requests through authentication, query validation and role/policy authorization before database execution, while recording audit events; entity resolution and AI-assisted SQL generation are additional query capabilities. The console exposes agent, RBAC, audit, query, and system views. A separate OS-monitor package demonstrates access controls, agent monitoring, audit logging, and job scheduling. Evidence is limited to the README and the supplied excerpts and source index; some feature-to-route details remain unsampled.
Main entry points: main.py API Application · App.jsx Console Router · database.py Application Database · api.js API Client
Components 32
API and Services
- API Application
backend/main.py - Request Schemas
backend/schemas.py - Authentication Routes
backend/routes/auth.py - Application Database
backend/database.py - Audit Service
backend/services/audit_service.py - Audit Routes
backend/routes/audit.py - Dashboard Routes
backend/routes/dashboard.py
Query and Policy
- Authentication and RBAC
backend/services/auth_service.py - Query Routes
backend/routes/query.py - SQL Validation
backend/services/query_service.py - Entity Resolution Routes
backend/routes/entity_resolution.py - Entity Resolution
backend/services/entity_resolution_service.py - SQL Generation Routes
backend/routes/gemini.py - SQL Generation
backend/services/gemini_service.py
Web Console
- Console Router
frontend/src/App.jsx - API Client
frontend/src/lib/api.js - Agent View
frontend/src/pages/Agent.jsx - RBAC View
frontend/src/pages/RBAC.jsx - Audit Trail
frontend/src/pages/AuditTrail.jsx - Dashboard
frontend/src/pages/Dashboard.jsx - System Monitor
frontend/src/pages/SystemMonitor.jsx - Logs and Violations
frontend/src/pages/Logs.jsx
OS Operations
- OS Monitor Routes
backend/routes/os_monitor.py - OS Monitor Service
backend/services/os_monitor_service.py - Access Matrix
AgentAccess-OS/monitor/access_matrix.py - Agent Monitor
AgentAccess-OS/monitor/agent_monitor.py - OS Audit Log
AgentAccess-OS/monitor/audit_log.py - Resource Limits
AgentAccess-OS/monitor/limits.py - Live Scheduler
AgentAccess-OS/monitor/scheduler_live.py - Scheduler Simulator
AgentAccess-OS/monitor/scheduler_sim.py
Other components
- Agent
- Console Operator
Connections 47
- Agent → API Application: submits requests
backend/main.py - API Application → Authentication Routes: routes to
backend/main.py - API Application → Query Routes: routes to
backend/main.py - API Application → Entity Resolution Routes: routes to
backend/main.py - API Application → SQL Generation Routes: routes to
backend/main.py - API Application → Audit Routes: routes to
backend/main.py - API Application → Dashboard Routes: routes to
backend/main.py - API Application → OS Monitor Routes: routes to
backend/main.py - Authentication Routes → Authentication and RBAC: calls
backend/routes/auth.py - Query Routes → SQL Validation: validates SQL
backend/routes/query.py - Query Routes → Authentication and RBAC: checks access
backend/routes/query.py - Query Routes → Audit Service: records events
backend/routes/query.py - Query Routes → Application Database: executes approved SQL
backend/routes/query.py - Authentication and RBAC → Application Database: checks policy
backend/services/auth_service.py - Entity Resolution Routes → Entity Resolution: calls
backend/routes/entity_resolution.py - Entity Resolution → Authentication and RBAC: checks table access
backend/services/entity_resolution_service.py - Entity Resolution → Application Database: searches records
backend/services/entity_resolution_service.py - Entity Resolution → Audit Service: records failures
backend/services/entity_resolution_service.py - SQL Generation Routes → SQL Generation: calls
backend/routes/gemini.py - SQL Generation Routes → SQL Validation: validates generated SQL
backend/routes/gemini.py - SQL Generation Routes → Audit Service: records events
backend/routes/gemini.py - Audit Routes → Application Database: reads audit data
backend/routes/audit.py - Audit Service → Application Database: writes audit records
backend/services/audit_service.py - Dashboard Routes → Application Database: reads dashboard data
backend/routes/dashboard.py - OS Monitor Routes → OS Monitor Service: calls
backend/routes/os_monitor.py - OS Monitor Routes → Audit Service: records events
backend/routes/os_monitor.py - API Application → Request Schemas: uses request models
- Console Operator → Console Router: opens console
frontend/src/App.jsx - Console Router → Agent View: routes to
frontend/src/App.jsx - Console Router → RBAC View: routes to
frontend/src/App.jsx - Console Router → Audit Trail: routes to
frontend/src/App.jsx - Console Router → Dashboard: routes to
frontend/src/App.jsx - Console Router → System Monitor: routes to
frontend/src/App.jsx - Console Router → Logs and Violations: routes to
frontend/src/App.jsx - Agent View → API Client: requests data
frontend/src/pages/Agent.jsx - RBAC View → API Client: requests data
frontend/src/pages/RBAC.jsx - Audit Trail → API Client: requests events
frontend/src/pages/AuditTrail.jsx - Dashboard → API Client: requests data
- System Monitor → API Client: requests stats
- Logs and Violations → API Client: requests logs
- Agent Monitor → Access Matrix: checks access
AgentAccess-OS/monitor/agent_monitor.py - Agent Monitor → OS Audit Log: logs events
AgentAccess-OS/monitor/agent_monitor.py - Agent Monitor → Resource Limits: enforces limits
AgentAccess-OS/monitor/agent_monitor.py - Live Scheduler → Access Matrix: authorizes jobs
AgentAccess-OS/monitor/scheduler_live.py - Live Scheduler → Agent Monitor: monitors agents
AgentAccess-OS/monitor/scheduler_live.py - Live Scheduler → OS Audit Log: logs jobs
AgentAccess-OS/monitor/scheduler_live.py - Scheduler Simulator → Resource Limits: uses limits
AgentAccess-OS/monitor/scheduler_sim.py