Skip to content

Rename MainLoop to AgentLoop throughout codebase#9

Merged
andreisavu merged 1 commit intomainfrom
claude/upgrade-weakincentives-refactor-M1Lt5
Jan 30, 2026
Merged

Rename MainLoop to AgentLoop throughout codebase#9
andreisavu merged 1 commit intomainfrom
claude/upgrade-weakincentives-refactor-M1Lt5

Conversation

@andreisavu
Copy link
Member

Summary

This PR renames all references to MainLoop to AgentLoop across the trivia agent codebase to align with the updated WINK framework terminology. This includes renaming the main entry point file from worker.py to agent_loop.py and updating all imports, type hints, and documentation.

Key Changes

  • File rename: src/trivia_agent/worker.pysrc/trivia_agent/agent_loop.py
  • Class rename: MainLoopAgentLoop in all type hints and base classes
  • Type renames:
    • MainLoopRequestAgentLoopRequest
    • MainLoopResultAgentLoopResult
    • MainLoopConfigAgentLoopConfig
  • Import updates: Updated all imports from weakincentives.runtime to use the new AgentLoop* types
  • Script entry point: Updated pyproject.toml to point trivia-agent command to agent_loop:main
  • Documentation: Updated all docstrings, comments, and README references from "MainLoop" to "AgentLoop"
  • Test file rename: tests/trivia_agent/test_worker.pytests/trivia_agent/test_agent_loop.py
  • Dependency update: Bumped weakincentives from v0.23.0 to v0.24.0 to support the new naming

Files Modified

  • Core agent loop: src/trivia_agent/agent_loop.py (renamed from worker.py)
  • Configuration and setup: pyproject.toml
  • Mailbox definitions: src/trivia_agent/mailboxes.py
  • Dispatch logic: src/trivia_agent/dispatch.py
  • Evaluation loop: src/trivia_agent/eval_loop.py
  • Adapters, feedback, isolation, and sections modules: Updated documentation
  • Tests: Renamed test file and updated all patch paths and imports
  • Documentation: AGENTS.md and README.md

Notes

  • All functionality remains unchanged; this is purely a naming/terminology update
  • The rename improves clarity by using "AgentLoop" to describe the production request processing loop
  • All imports have been reorganized to maintain consistency (e.g., in eval_loop.py and test files)

https://claude.ai/code/session_01VusjnNrDHPZxYzxjhjXr4K

Breaking changes from v0.24.0:
- Rename MainLoop to AgentLoop across all imports and references
- Rename MainLoopConfig to AgentLoopConfig
- Rename MainLoopRequest to AgentLoopRequest
- Rename MainLoopResult to AgentLoopResult

File renames:
- src/trivia_agent/worker.py -> src/trivia_agent/agent_loop.py
- tests/trivia_agent/test_worker.py -> tests/trivia_agent/test_agent_loop.py

Updated all import paths and docstrings to reflect the new naming.

https://claude.ai/code/session_01VusjnNrDHPZxYzxjhjXr4K
@andreisavu andreisavu merged commit 4511f2f into main Jan 30, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants