From 84c6663e4d8f8be2d0ce2e80e8d3d5929263152b Mon Sep 17 00:00:00 2001 From: gyt Date: Thu, 9 Jul 2026 13:28:40 -0400 Subject: [PATCH] Initial commit: myai agent framework --- .gitignore | 10 +++++++++ 2game.py | 46 ++++++++++++++++++++++++++++++++++++++ agents/agents.cfg | 3 +++ contacts.toml | 11 +++++++++ etc/compute_nodes.cfg.toml | 11 +++++++++ etc/system.cfg.toml | 12 ++++++++++ game.py | 46 ++++++++++++++++++++++++++++++++++++++ workflows/workflows.cfg | 3 +++ 8 files changed, 142 insertions(+) create mode 100644 .gitignore create mode 100755 2game.py create mode 100644 agents/agents.cfg create mode 100644 contacts.toml create mode 100644 etc/compute_nodes.cfg.toml create mode 100644 etc/system.cfg.toml create mode 100755 game.py create mode 100644 workflows/workflows.cfg diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..08e5ffe --- /dev/null +++ b/.gitignore @@ -0,0 +1,10 @@ +# Downloaded repos (not original work) +download/ + +# Agent data (local state) +agent_data/ + +# Python +__pycache__/ +*.pyc +.venv/ diff --git a/2game.py b/2game.py new file mode 100755 index 0000000..2d4b784 --- /dev/null +++ b/2game.py @@ -0,0 +1,46 @@ +# Define Rooms +rooms = { + 'start': { + 'name': 'Start', + 'description': "You find yourself in the dimly lit hallway. The walls are bare and you notice several doors leading to different rooms.", + 'north': 'hallway' + }, + 'hallway': { + 'name': 'Hallway', + 'description': "A long corridor with no visible exits." + } +} + +# Define Player State +player = { + 'current_room': 'start', + 'inventory': [] +} + +def move(current_room, direction): + return rooms[current_room][direction] + +def look(): + print(f"Current Room: {player['current_room']]}\n") + print(rooms[player['current_room']]['name']]) + if player['current_room'] == 'hallway': + print("There are several doors leading to different rooms.") + else: + print("You see a door to the north.") + +while True: + action = input("What do you want to do? Type 'look', 'move north', or 'quit' to exit: ") + + if action == 'look': + look() + elif action == 'move north': + current_room_name = player['current_room'] + result = move(current_room_name, 'north') + if isinstance(result, str): + print(result) + else: + player['current_room'] = result + look() + elif action == 'quit': + print("Goodbye!") + break diff --git a/agents/agents.cfg b/agents/agents.cfg new file mode 100644 index 0000000..70d490f --- /dev/null +++ b/agents/agents.cfg @@ -0,0 +1,3 @@ + +main = "./" +cache = "./.agents" diff --git a/contacts.toml b/contacts.toml new file mode 100644 index 0000000..5d6563d --- /dev/null +++ b/contacts.toml @@ -0,0 +1,11 @@ +[[contacts]] +name = "user" +email = "user@localhost" +telegram = "@user" +is_family_member = false +added_by = "user" +tags = [] +notes = "OpenDAN user" +now = "2026-06-02 03:27:58" +relationship = "Principal" + diff --git a/etc/compute_nodes.cfg.toml b/etc/compute_nodes.cfg.toml new file mode 100644 index 0000000..64eefcd --- /dev/null +++ b/etc/compute_nodes.cfg.toml @@ -0,0 +1,11 @@ +[[llama]] +url = "http://127.0.0.1:8081" +model_name = "Qwen2.5-3B-Instruct-Q4_K_M" + +[[llama]] +url = "http://127.0.0.1:8082" +model_name = "bge-small-en-v1.5-q8_0" + +[[llama]] +url = "http://127.0.0.1:8083" +model_name = "Llama-3.2-1B-Instruct-Q4_K_M" diff --git a/etc/system.cfg.toml b/etc/system.cfg.toml new file mode 100644 index 0000000..29cc3e5 --- /dev/null +++ b/etc/system.cfg.toml @@ -0,0 +1,12 @@ +username = "user" +user_telegram = "@user" +user_email = "user@localhost" +user_notes = "OpenDAN user" + +llm_default_model = "Qwen2.5-3B-Instruct-Q4_K_M" +llm_plan_model = "Qwen2.5-3B-Instruct-Q4_K_M" +llm_outline_model = "Qwen2.5-3B-Instruct-Q4_K_M" +llm_swift_model = "Llama-3.2-1B-Instruct-Q4_K_M" + +"feature.llama" = "True" +"feature.aigc" = "True" diff --git a/game.py b/game.py new file mode 100755 index 0000000..4831980 --- /dev/null +++ b/game.py @@ -0,0 +1,46 @@ +# Define Rooms +rooms = { + 'start': { + 'name': 'Start', + 'description': "You find yourself in the dimly lit hallway. The walls are bare and you notice several doors leading to different rooms.", + 'north': 'hallway' + }, + 'hallway': { + 'name': 'Hallway', + 'description': "A long corridor with no visible exits." + } +} + +# Define Player State +player = { + 'current_room': 'start', + 'inventory': [] +} + +def move(current_room, direction): + return rooms[current_room][direction] + +def look(): + current_room_name = player['current_room'] + print(rooms[current_room_name]['name']]) + if current_room_name == 'hallway': + print("There are several doors leading to different rooms.") + else: + print("You see a door to the north.") + +while True: + action = input("What do you want to do? Type 'look', 'move north', or 'quit' to exit: ") + + if action == 'look': + look() + elif action == 'move north': + current_room_name = player['current_room'] + result = move(current_room_name, 'north') + if isinstance(result, str): + print(result) + else: + player['current_room'] = result + look() + elif action == 'quit': + print("Goodbye!") + break diff --git a/workflows/workflows.cfg b/workflows/workflows.cfg new file mode 100644 index 0000000..70d490f --- /dev/null +++ b/workflows/workflows.cfg @@ -0,0 +1,3 @@ + +main = "./" +cache = "./.agents"