michael-agent 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- michael_agent-1.0.0/PKG-INFO +64 -0
- michael_agent-1.0.0/README.md +33 -0
- michael_agent-1.0.0/michael_agent/__init__.py +7 -0
- michael_agent-1.0.0/michael_agent/main.py +103 -0
- michael_agent-1.0.0/michael_agent/monitor.py +80 -0
- michael_agent-1.0.0/michael_agent.egg-info/PKG-INFO +64 -0
- michael_agent-1.0.0/michael_agent.egg-info/SOURCES.txt +10 -0
- michael_agent-1.0.0/michael_agent.egg-info/dependency_links.txt +1 -0
- michael_agent-1.0.0/michael_agent.egg-info/requires.txt +9 -0
- michael_agent-1.0.0/michael_agent.egg-info/top_level.txt +1 -0
- michael_agent-1.0.0/setup.cfg +4 -0
- michael_agent-1.0.0/setup.py +45 -0
@@ -0,0 +1,64 @@
|
|
1
|
+
Metadata-Version: 2.4
|
2
|
+
Name: michael_agent
|
3
|
+
Version: 1.0.0
|
4
|
+
Summary: SmartRecruitAgent - A recruitment automation library
|
5
|
+
Home-page: https://github.com/yourusername/agent
|
6
|
+
Author: Michael Jone
|
7
|
+
Author-email: your_email@example.com
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
9
|
+
Classifier: License :: OSI Approved :: MIT License
|
10
|
+
Classifier: Operating System :: OS Independent
|
11
|
+
Requires-Python: >=3.7
|
12
|
+
Description-Content-Type: text/markdown
|
13
|
+
Requires-Dist: python-dotenv
|
14
|
+
Requires-Dist: langchain
|
15
|
+
Requires-Dist: langgraph
|
16
|
+
Requires-Dist: langchain-openai
|
17
|
+
Requires-Dist: PyPDF2
|
18
|
+
Requires-Dist: pymupdf
|
19
|
+
Requires-Dist: flask
|
20
|
+
Requires-Dist: requests
|
21
|
+
Requires-Dist: watchdog
|
22
|
+
Dynamic: author
|
23
|
+
Dynamic: author-email
|
24
|
+
Dynamic: classifier
|
25
|
+
Dynamic: description
|
26
|
+
Dynamic: description-content-type
|
27
|
+
Dynamic: home-page
|
28
|
+
Dynamic: requires-dist
|
29
|
+
Dynamic: requires-python
|
30
|
+
Dynamic: summary
|
31
|
+
|
32
|
+
# Michael Agent
|
33
|
+
|
34
|
+
SmartRecruitAgent - A recruitment automation library.
|
35
|
+
|
36
|
+
## Installation
|
37
|
+
|
38
|
+
You can install this library using pip:
|
39
|
+
|
40
|
+
```bash
|
41
|
+
pip install michael_agent
|
42
|
+
```
|
43
|
+
|
44
|
+
## Usage
|
45
|
+
|
46
|
+
Import the library and use its features:
|
47
|
+
|
48
|
+
```python
|
49
|
+
import michael_agent
|
50
|
+
|
51
|
+
# Example usage
|
52
|
+
michael_agent.agent_main()
|
53
|
+
```
|
54
|
+
|
55
|
+
## Features
|
56
|
+
|
57
|
+
- Recruitment automation
|
58
|
+
- Integration with LangChain and OpenAI
|
59
|
+
- PDF processing
|
60
|
+
- Flask-based dashboard
|
61
|
+
|
62
|
+
## License
|
63
|
+
|
64
|
+
This project is licensed under the MIT License.
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# Michael Agent
|
2
|
+
|
3
|
+
SmartRecruitAgent - A recruitment automation library.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
You can install this library using pip:
|
8
|
+
|
9
|
+
```bash
|
10
|
+
pip install michael_agent
|
11
|
+
```
|
12
|
+
|
13
|
+
## Usage
|
14
|
+
|
15
|
+
Import the library and use its features:
|
16
|
+
|
17
|
+
```python
|
18
|
+
import michael_agent
|
19
|
+
|
20
|
+
# Example usage
|
21
|
+
michael_agent.agent_main()
|
22
|
+
```
|
23
|
+
|
24
|
+
## Features
|
25
|
+
|
26
|
+
- Recruitment automation
|
27
|
+
- Integration with LangChain and OpenAI
|
28
|
+
- PDF processing
|
29
|
+
- Flask-based dashboard
|
30
|
+
|
31
|
+
## License
|
32
|
+
|
33
|
+
This project is licensed under the MIT License.
|
@@ -0,0 +1,103 @@
|
|
1
|
+
#!/usr/bin/env python3
|
2
|
+
"""
|
3
|
+
SmartRecruitAgent - Main Entry Point
|
4
|
+
Starts both the LangGraph workflow and Flask dashboard concurrently
|
5
|
+
"""
|
6
|
+
|
7
|
+
import os
|
8
|
+
import threading
|
9
|
+
import time
|
10
|
+
import logging
|
11
|
+
import traceback
|
12
|
+
from datetime import datetime
|
13
|
+
from dotenv import load_dotenv
|
14
|
+
|
15
|
+
# Load environment variables first
|
16
|
+
load_dotenv()
|
17
|
+
|
18
|
+
# Then import settings which may depend on environment variables
|
19
|
+
from .config import settings
|
20
|
+
|
21
|
+
# Import our logging utilities early to set up logging
|
22
|
+
from .utils.logging_utils import workflow_logger as logger
|
23
|
+
|
24
|
+
def ensure_directories():
|
25
|
+
"""Ensure all required directories exist"""
|
26
|
+
required_directories = [
|
27
|
+
settings.RESUME_WATCH_DIR,
|
28
|
+
settings.OUTPUT_DIR,
|
29
|
+
settings.LOG_DIR,
|
30
|
+
os.path.join(settings.LOG_DIR, "snapshots"),
|
31
|
+
settings.LANGGRAPH_CHECKPOINT_DIR,
|
32
|
+
settings.JOB_DESCRIPTIONS_DIR
|
33
|
+
]
|
34
|
+
|
35
|
+
for directory in required_directories:
|
36
|
+
os.makedirs(directory, exist_ok=True)
|
37
|
+
logger.info(f"Ensured directory exists: {directory}")
|
38
|
+
|
39
|
+
# Import node tracer after directories are created
|
40
|
+
from .utils import node_tracer
|
41
|
+
|
42
|
+
def start_langgraph():
|
43
|
+
"""Start the LangGraph workflow in a separate thread"""
|
44
|
+
try:
|
45
|
+
from .langgraph_workflow.graph_builder import start_workflow
|
46
|
+
logger.info("Starting LangGraph workflow engine...")
|
47
|
+
langgraph_app = start_workflow()
|
48
|
+
|
49
|
+
# Keep the thread alive with a simple loop
|
50
|
+
while True:
|
51
|
+
time.sleep(10)
|
52
|
+
except Exception as e:
|
53
|
+
logger.error(f"Error starting LangGraph workflow: {str(e)}")
|
54
|
+
logger.error(traceback.format_exc())
|
55
|
+
|
56
|
+
def start_flask_dashboard():
|
57
|
+
"""Start the Flask dashboard in a separate thread"""
|
58
|
+
try:
|
59
|
+
from .dashboard.app import app, socketio
|
60
|
+
port = int(os.getenv("FLASK_PORT", 5000))
|
61
|
+
logger.info(f"Starting Flask dashboard on port {port}...")
|
62
|
+
socketio.run(app, host='0.0.0.0', port=port, debug=False, allow_unsafe_werkzeug=True)
|
63
|
+
except Exception as e:
|
64
|
+
logger.error(f"Error starting Flask dashboard: {str(e)}")
|
65
|
+
logger.error(traceback.format_exc())
|
66
|
+
|
67
|
+
def main():
|
68
|
+
"""Main entry point for the application"""
|
69
|
+
logger.info("=" * 50)
|
70
|
+
logger.info("🚀 Starting SmartRecruitAgent")
|
71
|
+
logger.info(f"Date/Time: {datetime.now().isoformat()}")
|
72
|
+
logger.info("=" * 50)
|
73
|
+
|
74
|
+
ensure_directories()
|
75
|
+
|
76
|
+
port = int(os.getenv("FLASK_PORT", 5000))
|
77
|
+
logger.info(f"Dashboard will be available at: http://localhost:{port}")
|
78
|
+
|
79
|
+
try:
|
80
|
+
# Start LangGraph in a separate thread
|
81
|
+
langgraph_thread = threading.Thread(target=start_langgraph, name="LangGraphThread")
|
82
|
+
langgraph_thread.daemon = True
|
83
|
+
langgraph_thread.start()
|
84
|
+
|
85
|
+
# Give LangGraph more time to initialize
|
86
|
+
logger.info("Waiting for LangGraph to initialize...")
|
87
|
+
time.sleep(5)
|
88
|
+
|
89
|
+
logger.info("LangGraph initialization complete")
|
90
|
+
|
91
|
+
# Start Flask dashboard in the main thread
|
92
|
+
logger.info("Starting Flask dashboard in main thread...")
|
93
|
+
start_flask_dashboard()
|
94
|
+
except KeyboardInterrupt:
|
95
|
+
logger.info("Shutdown requested by user (Ctrl+C)")
|
96
|
+
except Exception as e:
|
97
|
+
logger.error(f"Fatal error in main: {str(e)}")
|
98
|
+
logger.error(traceback.format_exc())
|
99
|
+
finally:
|
100
|
+
logger.info("SmartRecruitAgent shutting down...")
|
101
|
+
|
102
|
+
if __name__ == "__main__":
|
103
|
+
main()
|
@@ -0,0 +1,80 @@
|
|
1
|
+
#!/usr/bin/env python3
|
2
|
+
"""
|
3
|
+
SmartRecruitAgent Workflow Monitor CLI
|
4
|
+
Command-line utility for monitoring workflow progress
|
5
|
+
"""
|
6
|
+
|
7
|
+
import os
|
8
|
+
import sys
|
9
|
+
import time
|
10
|
+
import argparse
|
11
|
+
import logging
|
12
|
+
from datetime import datetime
|
13
|
+
|
14
|
+
# Make sure we can import from our project
|
15
|
+
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
|
16
|
+
|
17
|
+
# Import our utilities
|
18
|
+
from utils.monitor_utils import monitor_active_jobs, show_job_details
|
19
|
+
|
20
|
+
# Configure logging
|
21
|
+
logging.basicConfig(level=logging.INFO)
|
22
|
+
logger = logging.getLogger(__name__)
|
23
|
+
|
24
|
+
def parse_args():
|
25
|
+
"""Parse command-line arguments"""
|
26
|
+
parser = argparse.ArgumentParser(description="SmartRecruitAgent Workflow Monitor")
|
27
|
+
|
28
|
+
# Create subparsers for different commands
|
29
|
+
subparsers = parser.add_subparsers(dest="command", help="Command to run")
|
30
|
+
|
31
|
+
# Monitor command
|
32
|
+
monitor_parser = subparsers.add_parser("monitor", help="Monitor active jobs")
|
33
|
+
monitor_parser.add_argument(
|
34
|
+
"--refresh", "-r",
|
35
|
+
type=int,
|
36
|
+
default=10,
|
37
|
+
help="Refresh interval in seconds (default: 10)"
|
38
|
+
)
|
39
|
+
|
40
|
+
# Job details command
|
41
|
+
details_parser = subparsers.add_parser("details", help="Show details for a specific job")
|
42
|
+
details_parser.add_argument(
|
43
|
+
"job_id",
|
44
|
+
help="The ID of the job to show details for"
|
45
|
+
)
|
46
|
+
|
47
|
+
return parser.parse_args()
|
48
|
+
|
49
|
+
def main():
|
50
|
+
"""Main entry point"""
|
51
|
+
args = parse_args()
|
52
|
+
|
53
|
+
if args.command == "monitor":
|
54
|
+
try:
|
55
|
+
# Show initial state
|
56
|
+
os.system('clear' if os.name == 'posix' else 'cls')
|
57
|
+
monitor_active_jobs()
|
58
|
+
|
59
|
+
# If refresh interval is provided, keep refreshing
|
60
|
+
if args.refresh > 0:
|
61
|
+
print(f"\nRefreshing every {args.refresh} seconds. Press Ctrl+C to exit.")
|
62
|
+
|
63
|
+
while True:
|
64
|
+
time.sleep(args.refresh)
|
65
|
+
os.system('clear' if os.name == 'posix' else 'cls')
|
66
|
+
monitor_active_jobs()
|
67
|
+
print(f"\nLast updated: {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}")
|
68
|
+
print(f"Refreshing every {args.refresh} seconds. Press Ctrl+C to exit.")
|
69
|
+
except KeyboardInterrupt:
|
70
|
+
print("\nExiting monitor.")
|
71
|
+
|
72
|
+
elif args.command == "details":
|
73
|
+
show_job_details(args.job_id)
|
74
|
+
|
75
|
+
else:
|
76
|
+
# Default to showing active jobs
|
77
|
+
monitor_active_jobs()
|
78
|
+
|
79
|
+
if __name__ == "__main__":
|
80
|
+
main()
|
@@ -0,0 +1,64 @@
|
|
1
|
+
Metadata-Version: 2.4
|
2
|
+
Name: michael_agent
|
3
|
+
Version: 1.0.0
|
4
|
+
Summary: SmartRecruitAgent - A recruitment automation library
|
5
|
+
Home-page: https://github.com/yourusername/agent
|
6
|
+
Author: Michael Jone
|
7
|
+
Author-email: your_email@example.com
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
9
|
+
Classifier: License :: OSI Approved :: MIT License
|
10
|
+
Classifier: Operating System :: OS Independent
|
11
|
+
Requires-Python: >=3.7
|
12
|
+
Description-Content-Type: text/markdown
|
13
|
+
Requires-Dist: python-dotenv
|
14
|
+
Requires-Dist: langchain
|
15
|
+
Requires-Dist: langgraph
|
16
|
+
Requires-Dist: langchain-openai
|
17
|
+
Requires-Dist: PyPDF2
|
18
|
+
Requires-Dist: pymupdf
|
19
|
+
Requires-Dist: flask
|
20
|
+
Requires-Dist: requests
|
21
|
+
Requires-Dist: watchdog
|
22
|
+
Dynamic: author
|
23
|
+
Dynamic: author-email
|
24
|
+
Dynamic: classifier
|
25
|
+
Dynamic: description
|
26
|
+
Dynamic: description-content-type
|
27
|
+
Dynamic: home-page
|
28
|
+
Dynamic: requires-dist
|
29
|
+
Dynamic: requires-python
|
30
|
+
Dynamic: summary
|
31
|
+
|
32
|
+
# Michael Agent
|
33
|
+
|
34
|
+
SmartRecruitAgent - A recruitment automation library.
|
35
|
+
|
36
|
+
## Installation
|
37
|
+
|
38
|
+
You can install this library using pip:
|
39
|
+
|
40
|
+
```bash
|
41
|
+
pip install michael_agent
|
42
|
+
```
|
43
|
+
|
44
|
+
## Usage
|
45
|
+
|
46
|
+
Import the library and use its features:
|
47
|
+
|
48
|
+
```python
|
49
|
+
import michael_agent
|
50
|
+
|
51
|
+
# Example usage
|
52
|
+
michael_agent.agent_main()
|
53
|
+
```
|
54
|
+
|
55
|
+
## Features
|
56
|
+
|
57
|
+
- Recruitment automation
|
58
|
+
- Integration with LangChain and OpenAI
|
59
|
+
- PDF processing
|
60
|
+
- Flask-based dashboard
|
61
|
+
|
62
|
+
## License
|
63
|
+
|
64
|
+
This project is licensed under the MIT License.
|
@@ -0,0 +1,10 @@
|
|
1
|
+
README.md
|
2
|
+
setup.py
|
3
|
+
michael_agent/__init__.py
|
4
|
+
michael_agent/main.py
|
5
|
+
michael_agent/monitor.py
|
6
|
+
michael_agent.egg-info/PKG-INFO
|
7
|
+
michael_agent.egg-info/SOURCES.txt
|
8
|
+
michael_agent.egg-info/dependency_links.txt
|
9
|
+
michael_agent.egg-info/requires.txt
|
10
|
+
michael_agent.egg-info/top_level.txt
|
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
michael_agent
|
@@ -0,0 +1,45 @@
|
|
1
|
+
from setuptools import setup, find_packages
|
2
|
+
|
3
|
+
setup(
|
4
|
+
name="michael_agent", # Replace with your library name
|
5
|
+
version="1.0.0", # Version number
|
6
|
+
description="SmartRecruitAgent - A recruitment automation library",
|
7
|
+
long_description=open("README.md").read(),
|
8
|
+
long_description_content_type="text/markdown",
|
9
|
+
author="Michael Jone",
|
10
|
+
author_email="your_email@example.com",
|
11
|
+
url="https://github.com/yourusername/agent", # Replace with your repo URL
|
12
|
+
packages=find_packages(exclude=["tests", "examples"]), # Automatically find subpackages
|
13
|
+
install_requires=[
|
14
|
+
"python-dotenv",
|
15
|
+
"langchain",
|
16
|
+
"langgraph",
|
17
|
+
"langchain-openai",
|
18
|
+
"PyPDF2",
|
19
|
+
"pymupdf",
|
20
|
+
"flask",
|
21
|
+
"requests",
|
22
|
+
"watchdog",
|
23
|
+
],
|
24
|
+
classifiers=[
|
25
|
+
"Programming Language :: Python :: 3",
|
26
|
+
"License :: OSI Approved :: MIT License",
|
27
|
+
"Operating System :: OS Independent",
|
28
|
+
],
|
29
|
+
python_requires=">=3.7",
|
30
|
+
)
|
31
|
+
|
32
|
+
"""
|
33
|
+
MIT License
|
34
|
+
|
35
|
+
Copyright (c) 2025 Michael Jone
|
36
|
+
|
37
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
38
|
+
of this software and associated documentation files (the "Software"), to deal
|
39
|
+
in the Software without restriction, including without limitation the rights
|
40
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
41
|
+
copies of the Software, and to permit persons to whom the Software is
|
42
|
+
furnished to do so, subject to the following conditions:
|
43
|
+
|
44
|
+
...
|
45
|
+
"""
|