How edem-ai/agentchord works
AgentChord is a recovery-aware robotic manipulation system built on the EmbodiChain runtime. Its primary workflow structures a nominal task graph from instructions and scene observations, adds predicted-failure monitors and recovery branches, compiles the result into interruptible behaviors, then executes them in simulation or on a real robot. The repository also includes EmbodiChain simulation, perception, robot-control, learning, and manipulation-toolkit capabilities. Some subsystem links are documented in the README; unsampled implementation details are not inferred as direct calls.
Main entry points: controller.py CobotMagic controller · compile_agent.py Execution compilation · task_agent.py Task structuring · embodied_env.py Gym environments
Components 25
AgentChord planning
- Task structuring
embodichain/agents/hierarchy/task_agent.py - Recovery orchestration
embodichain/agents/hierarchy/recovery_agent.py - Execution compilation
embodichain/agents/hierarchy/compile_agent.py - Graph specification
embodichain/agents/agentchord/graph_spec.py - Atomic actions
embodichain/agents/agentchord/atom_actions.py - Failure monitors
embodichain/agents/agentchord/monitor_functions.py
Embodied runtime
- Simulation runner
embodichain/lab/scripts/run_agent.py - Gym environments
embodichain/lab/gym/envs/embodied_env.py - Environment managers
embodichain/lab/gym/envs/managers/manager_base.py - Simulation manager
embodichain/lab/sim/sim_manager.py - Simulation objects
embodichain/lab/sim/objects/articulation.py - Motion action engine
embodichain/lab/sim/atomic_actions/engine.py
Robot deployment
- Real-world runner
embodichain/deploy/run_agent_realworld.py - CobotMagic controller
embodichain/deploy/robots/cobotmagic/controller.py - ROS bridge
embodichain/deploy/robots/cobotmagic/ros_bridge.py - Pose perception
embodichain/deploy/perception/pose_estimation.py - SAM mask detection
embodichain/deploy/tools/sam3/mask_detector.py
Supporting capabilities
- RL training
embodichain/agents/rl/train.py - Dataset utilities
embodichain/data/dataset.py - Grasp generation
embodichain/toolkits/graspkit/pg_grasp/antipodal_generator.py - URDF assembly
embodichain/toolkits/urdf_assembly/urdf_assembly_manager.py - Configuration utilities
embodichain/utils/configclass.py - Logging
embodichain/utils/logger.py
Other components
- Task instruction
- LLM endpoint
Connections 27
- Task instruction → Task structuring: provides task
- Task structuring → Graph specification: builds graph
- Recovery orchestration → Graph specification: adds branches
- Task structuring → LLM endpoint: queries model
- Recovery orchestration → LLM endpoint: queries model
- Execution compilation → LLM endpoint: queries model
- Execution compilation → Graph specification: compiles graph
embodichain/agents/hierarchy/compile_agent.py - Execution compilation → Atomic actions: compiles behaviors
- Execution compilation → Failure monitors: compiles monitors
- Simulation runner → Execution compilation: runs agents
- Simulation runner → Gym environments: runs in
- Gym environments → Environment managers: uses managers
- Gym environments → Simulation manager: uses simulation
- Simulation manager → Simulation objects: manages objects
embodichain/lab/sim/sim_manager.py - Simulation runner → Motion action engine: executes actions
- Real-world runner → CobotMagic controller: starts controller
embodichain/deploy/run_agent_realworld.py - CobotMagic controller → ROS bridge: uses bridge
embodichain/deploy/robots/cobotmagic/controller.py - CobotMagic controller → Pose perception: estimates poses
embodichain/deploy/robots/cobotmagic/controller.py - Pose perception → SAM mask detection: requests masks
embodichain/deploy/perception/pose_estimation.py - CobotMagic controller → Task structuring: invokes agent
embodichain/deploy/robots/cobotmagic/controller.py - CobotMagic controller → Recovery orchestration: invokes agent
embodichain/deploy/robots/cobotmagic/controller.py - CobotMagic controller → Execution compilation: invokes agent
embodichain/deploy/robots/cobotmagic/controller.py - RL training → Gym environments: trains in
- Grasp generation → Pose perception: supports manipulation
- URDF assembly → Simulation objects: supplies robot models
- Configuration utilities → Environment managers: configures managers
embodichain/lab/gym/envs/managers/cfg.py - Real-world runner → Dataset utilities: loads data