Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,18 @@ def call_llm(prompt: str) -> str:
from groq import Groq
api_key = os.environ.get('GROQ_API_KEY')
if not api_key:
raise RuntimeError("GROQ_API_KEY not set. Run: export GROQ_API_KEY=your-key")
for env_path in [os.path.join(ROOT, '.env'), os.path.expanduser('~/.env')]:
if os.path.exists(env_path):
with open(env_path) as f:
for line in f:
if line.strip().startswith('GROQ_API_KEY='):
api_key = line.split('=', 1)[1].strip().strip('"').strip("'")
os.environ['GROQ_API_KEY'] = api_key
break
if api_key:
break
if not api_key:
raise RuntimeError("GROQ_API_KEY not set. Run: export GROQ_API_KEY=your-key or set it in a .env file")
client = Groq(api_key=api_key)
response = client.chat.completions.create(
model='llama-3.3-70b-versatile',
Expand All @@ -131,6 +142,7 @@ def call_llm(prompt: str) -> str:
return response.choices[0].message.content



# ── THOUGHT PARSER ───────────────────────────────────────────────

def parse_thought(text: str) -> dict:
Expand Down
31 changes: 25 additions & 6 deletions data/compliance_state.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
{
"EMP-2026-0847": {
"employee_id": "EMP-2026-0847",
"code_of_conduct": "PENDING",
"data_handling_policy": "PENDING",
"security_guidelines": "PENDING",
"posh_training": "PENDING",
"last_updated": "2026-06-10T08:30:00Z",
"overall_status": "PENDING"
"code_of_conduct": "CLEARED",
"data_handling_policy": "CLEARED",
"security_guidelines": "CLEARED",
"posh_training": "CLEARED",
"last_updated": "2026-07-15T12:00:00Z",
"overall_status": "CLEARED"
},
"EMP-2022-0103": {
"employee_id": "EMP-2022-0103",
"code_of_conduct": "CLEARED",
"data_handling_policy": "CLEARED",
"security_guidelines": "CLEARED",
"posh_training": "CLEARED",
"last_updated": "2026-07-15T12:00:00Z",
"overall_status": "CLEARED"
},
"EMP-2026-0848": {
"employee_id": "EMP-2026-0848",
Expand All @@ -16,5 +25,15 @@
"posh_training": "PENDING",
"last_updated": "2026-06-10T09:15:00Z",
"overall_status": "PENDING"
},
"EMP-2026-0849": {
"employee_id": "EMP-2026-0849",
"code_of_conduct": "CLEARED",
"data_handling_policy": "CLEARED",
"security_guidelines": "CLEARED",
"posh_training": "CLEARED",
"last_updated": "2026-06-12T10:00:00Z",
"overall_status": "CLEARED"
}
}

29 changes: 28 additions & 1 deletion data/employees.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,15 @@
"manager_id": "EMP-2020-0042",
"manager_name": "Anita Krishnan",
"employment_type": "fulltime",
"location": "Hyderabad Engineering Hub"
"location": "Hyderabad Engineering Hub",
"access_profile": {
"github": "platform-manager",
"jira": "platform-project",
"confluence": "platform-space",
"slack_channels": ["platform-team", "engineering-managers", "all-engineering"]
}
},

"EMP-2026-0848": {
"employee_id": "EMP-2026-0848",
"name": "Rahul Mehta",
Expand All @@ -49,5 +56,25 @@
"confluence": "data-space-readonly",
"slack_channels": ["data-team", "all-engineering"]
}
},
"EMP-2026-0849": {
"employee_id": "EMP-2026-0849",
"name": "Arjun Reddy",
"email": "arjun.reddy@meridian.com",
"role": "Software Engineer",
"level": "L4",
"department": "Platform Engineering",
"manager_id": "EMP-2022-0103",
"manager_name": "Vikram Nair",
"employment_type": "fulltime",
"location": "Hyderabad Engineering Hub",
"start_date": "2026-06-15",
"access_profile": {
"github": "platform-team",
"jira": "platform-project",
"confluence": "platform-space",
"slack_channels": ["platform-team", "all-engineering"]
}
}
}