Skip to slide
165 / 170

CH 17 · Building the Full Mini-Harness · 06/11

Read as one page

Step 3: the entry point

# minharness/main.py
import sys
from .agent import MiniHarness

def main():
    project = sys.argv[1] if len(sys.argv) > 1 else "."
    agent = MiniHarness(project_root=project, mode="default")
    print("minharness ready. Type a request (Ctrl-C to quit).")
    try:
        while True:
            request = input("\n> ")
            print(agent.run(request))
    except KeyboardInterrupt:
        print("\nbye")

if __name__ == "__main__":
    main()

Finished this idea?

Your learning progress stays in this browser.