How itz-vk-dude/pygent works
PHYGENT is a cyber-physical AI agent that monitors a workspace, predicts object motion, reasons about possible tasks, simulates and safety-checks actions, then may command a robot and learn from observed outcomes. Its documented loop is coordinated by the agent core; the web interface is launched separately by the application entry point. Edges from agent_core.py rely on its SOURCE INDEX references, while several detailed subsystem links follow the README workflow; unsampled implementation details are not inferred.
Main entry points: agent_core.py Agent loop · web_app.py Web interface · main.py Application entry · perception_engine.py Perception
Components 23
Runtime and state
- Application entry
main.py - Agent loop
agent/agent_core.py - Autonomy policy
agent/autonomy_manager.py - World state
world_model/state_manager.py
Sensing and data
- Camera input
physical_world/camera.py - Perception
perception/perception_engine.py - Data quality
data/quality.py - Audit database
data/database.py
Prediction and planning
- Hybrid prediction
prediction/hybrid_predictor.py - Agent reasoning
reasoning/reasoning_engine.py - Action simulation
simulation/candidate_actions.py
Safety and execution
- Action selection
decision/decision_engine.py - Safety gate
decision/safety.py - Arm kinematics
robotics/kinematics.py - Robot executor
robotics/executor.py - Serial controller
communication/serial_controller.py
Feedback and interface
- Outcome feedback
feedback/feedback_engine.py - Continual learning
learning/continual_learning.py - Web interface
interface/web_app.py - REST API
interface/api.py
Other components
- User
- Grok service
- Robot hardware
Connections 25
- Application entry → Agent loop: starts loop
main.py - Application entry → Web interface: starts web app
main.py - Web interface → REST API: uses API
interface/web_app.py - User → Web interface: interacts
README.md - Agent loop → Camera input: reads frames
agent/agent_core.py - Agent loop → Perception: processes frames
agent/agent_core.py - Perception → Data quality: quality-checks data
README.md - Agent loop → Data quality: checks quality
agent/agent_core.py - Agent loop → Audit database: records data
agent/agent_core.py - Agent loop → World state: updates state
agent/agent_core.py - Agent loop → Hybrid prediction: predicts motion
agent/agent_core.py - Agent loop → Agent reasoning: requests reasoning
agent/agent_core.py - Agent reasoning → Grok service: queries
reasoning/reasoning_engine.py - Agent loop → Action simulation: generates candidates
agent/agent_core.py - Action simulation → Arm kinematics: uses kinematics
simulation/candidate_actions.py - Agent loop → Action selection: selects action
agent/agent_core.py - Action selection → Safety gate: validates targets
decision/decision_engine.py - Safety gate → Arm kinematics: checks reachability
decision/safety.py - Agent loop → Autonomy policy: evaluates autonomy
agent/agent_core.py - Agent loop → Robot executor: executes action
agent/agent_core.py - Robot executor → Serial controller: sends commands
- Serial controller → Robot hardware: sends serial commands
communication/serial_controller.py - Agent loop → Outcome feedback: evaluates outcome
agent/agent_core.py - Outcome feedback → Continual learning: informs learning
README.md - Agent loop → Continual learning: updates models
agent/agent_core.py