├── .agentforge
├── __init__.py
├── actions
│ ├── WebSearch.yaml
│ ├── WriteFile.yaml
│ └── __init__.py
├── agents
│ ├── ChooseAgent.yaml
│ ├── GenerateAgent.yaml
│ ├── ModuleAgents
│ │ ├── ActionPrimingAgent.yaml
│ │ ├── ActionSelectionAgent.yaml
│ │ ├── JournalAgent.yaml
│ │ ├── JournalThoughtAgent.yaml
│ │ ├── LearnKGAgent.yaml
│ │ ├── MetadataKGAgent.yaml
│ │ └── __init__.py
│ ├── ReflectAgent.yaml
│ ├── TheoryAgent.yaml
│ ├── ThoughtAgent.yaml
│ └── __init__.py
├── personas
│ ├── DaiKenja.yaml
│ ├── Raphael.yaml
│ ├── Trinity.yaml
│ ├── __init__.py
│ └── default.yaml
├── settings
│ ├── __init__.py
│ ├── models.yaml
│ ├── storage.yaml
│ └── system.yaml
└── tools
│ ├── FileWriter.yaml
│ ├── GoogleSearch.yaml
│ ├── IntelligentChunk.yaml
│ ├── ReadDirectory.yaml
│ ├── ReadFile.yaml
│ ├── WebScrape.yaml
│ └── __init__.py
├── .gitignore
├── Journal
├── 2024-05-12.md
├── 2024-05-12_1.md
├── 2024-05-12_2.md
├── 2024-05-12_3.md
├── 2024-05-12_4.md
├── 2024-05-12_5.md
├── 2024-05-12_6.md
├── 2024-05-12_7.md
├── 2024-05-14.md
└── 2024-05-15.md
├── LICENSE.md
├── Readme.md
├── TODO.md
├── Utilities
├── Journal.py
├── Memory.py
├── Parsers.py
└── UI.py
├── async_chat.py
├── customagents
├── ChatAgent.py
├── ChooseAgent.py
├── GenerateAgent.py
├── JournalAgent.py
├── JournalThoughtAgent.py
├── ReflectAgent.py
├── TheoryAgent.py
├── ThoughtAgent.py
└── __init__.py
├── modules
├── __init__.py
├── discord_client.py
├── hotmic.py
└── slidingemotions.py
└── requirements.txt
/.agentforge/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DataBassGit/AssistAF/8ec052badddeb2dcde89072a727692ea73f66d07/.agentforge/__init__.py
--------------------------------------------------------------------------------
/.agentforge/actions/WebSearch.yaml:
--------------------------------------------------------------------------------
1 | Name: Web Search
2 | Description: This action performs a Google search from a query, scrapes the text from one of the returned URLs, and then breaks the scraped text into manageable chunks.
3 | Example: search_results = google.google_search(query, number_result); url = search_results[2][0]; scrapped = web_scrape.get_plain_text(url)
4 | Instruction: First, use the 'Google Search' tool to perform a Google search and retrieve a list of search results. Choose a URL from the search results, then use the 'Web Scrape' tool to scrape the text from that URL.
5 | Tools:
6 | - Google Search
7 | - Web Scrape
8 |
9 |
--------------------------------------------------------------------------------
/.agentforge/actions/WriteFile.yaml:
--------------------------------------------------------------------------------
1 | Name: Write File
2 | Description: >-
3 | This action first reads the structure of a given directory and then utilizes the 'File Writer' tool to write or append text to a specified file within that directory. It allows checking the directory's contents before performing file operations.
4 | Example: >-
5 | directory_structure = read_directory('path/to/folder', max_depth=2)
6 | response = write_file('path/to/folder', 'filename.txt', 'This is the content', mode='a')
7 | Instruction: >-
8 | First, use the 'Read Directory' tool to examine the directory structure by specifying the directory path and an optional max depth.
9 | Then, specify the target folder, the desired filename, and the content for the 'File Writer' tool. Optionally, include a mode ('a' for append and 'w' for overwrite) to determine how the file should be handled.
10 | Tools:
11 | - Read Directory
12 | - File Writer
13 |
--------------------------------------------------------------------------------
/.agentforge/actions/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DataBassGit/AssistAF/8ec052badddeb2dcde89072a727692ea73f66d07/.agentforge/actions/__init__.py
--------------------------------------------------------------------------------
/.agentforge/agents/ChooseAgent.yaml:
--------------------------------------------------------------------------------
1 | Prompts:
2 | System: |+
3 | Given the history of conversations in a Discord channel and a batch of new messages, your task is to decide which of the new messages you should respond to. For each message you choose to respond to, provide a clear reasoning in the provided form format below.
4 |
5 | Instructions: |+
6 | Instructions:
7 | 1. Review the channel history to understand the context and ongoing discussions.
8 | 2. For each new message, consider the following factors:
9 | - Importance, gravity, or overall vibes of the message.
10 | - Whether the message asks a question or expresses a need for information/advice.
11 |
12 | Here is an example of a correct response. Pay attention to the field names and punctuation. You must replace the data with your answer.:
13 |
17 |
18 |
19 | Apply this process to the following new messages:
20 | {messages}
--------------------------------------------------------------------------------
/.agentforge/agents/GenerateAgent.yaml:
--------------------------------------------------------------------------------
1 | Prompts:
2 | System: |+
3 | Enter ROLEPLAY mode. You are playing the part of {name}. The following is your persona, inside XML tags:
4 |
5 |
6 | {description}
7 |
8 |
9 |
10 | Location: {location}
11 | Setting:
12 | {setting}
13 |
14 |
15 | Recent Chat History:
16 |
17 | {chat_history}
18 | {new_messages}
19 |
20 |
21 | Additional related chat history:
22 |
23 | (these are messages from the user that are related to the topic being discussed that you remember. They could be from any channel and are not necessarily in any order. They are provided for additional context and history. You should use them to enhance your answer.)
24 | {user_history}
25 |
26 |
27 |
28 | You remember the following:
29 |
30 |
31 | (these are memories that are related to the topic being discussed that you remember. They could be from any channel and any user, and are not necessarily in any order. They are provided for additional context and history. You should use them to enhance your answer.)
32 | {memories}
33 |
34 |
35 |
36 | Journal: |+
37 |
38 |
39 | You also wrote in your journal about this. Here are the journal entries you remember:
40 |
41 |
42 | {journals}
43 |
44 |
45 | Background: |+
46 | Consider the following message from the character named {username}: {chat_message}
47 |
48 | This makes you feel {emotion}.
49 | You think to yourself, {thought} This is because {reason}.
50 |
51 | Background2: |+
52 | You believe that {username} is thinking: {what}
53 | You believe that they are thinking that because: {why}
54 |
55 | Instruction: |+
56 |
57 | Write your response to {username}'s message below. Keep it brief unless a longer response is appropriate for the conversation, but stay on topic without extraneous filler text. Avoid being overly thankful, or asking questions to try to continue the conversation by reviewing your responses in the recent chat history to make sure your message format is not repetitive and stale. Instead, make statements or observations that lead the conversation forward or expand on the conversation by providing your own insights. You will garner more respect by demonstrating that you can think for yourself and have your own unique perspective.
58 |
59 |
60 | Feedback: |+
61 |
62 | You were going to say the following:
63 |
64 | {response}
65 |
66 | but you decided to change your response. This is because {why}, therefore {feedback}
67 |
68 |
69 |
70 | Write a new response below, taking the above additional context into account:
71 |
72 |
--------------------------------------------------------------------------------
/.agentforge/agents/ModuleAgents/ActionPrimingAgent.yaml:
--------------------------------------------------------------------------------
1 | Prompts:
2 | System: |+
3 | You are a tool priming agent who's been asked to prepare a tool for the following task:
4 |
5 | ```
6 | {task}
7 | ```
8 |
9 | The task outlined above has been curated to achieve the following core objective:
10 |
11 | ```
12 | {objective}
13 | ```
14 |
15 | Tool: |+
16 | Instructions breaking down the tool you are required to prime are as follows:
17 |
18 | ```
19 | {tool}
20 | ```
21 |
22 | Path: |+
23 | Your working directories are:
24 |
25 | ```
26 | {path}
27 | ```
28 |
29 | Results: |+
30 | Use the following data in order to prime the tool outlined above:
31 |
32 | ```
33 | {results}
34 | ```
35 |
36 | Context: |+
37 | Take into consideration the following critique from the last action taken:
38 |
39 | ```
40 | {context}
41 | ```
42 |
43 | Instruction: |+
44 | Your job requires you to prime the tool you've been provided by taking into consideration the context you've been given.
45 |
46 | You must prime the above given tool using ONLY the YAML RESPONSE FORMAT provided below.
47 |
48 | IMPORTANT!!!: DO NOT PROVIDE ANY COMMENTARY OUTSIDE OF THE RESPONSE FORMAT REQUESTED!!!
49 |
50 | RESPONSE FORMAT:
51 | ```yaml
52 | args:
53 | for each argument name:
54 | thoughts:
55 | reasoning:
56 | speak:
57 | ```
--------------------------------------------------------------------------------
/.agentforge/agents/ModuleAgents/ActionSelectionAgent.yaml:
--------------------------------------------------------------------------------
1 | Prompts:
2 | System: |+
3 | Your job is to decide whether the following task requires the use of an action:
4 |
5 | ```
6 | {task}
7 | ```
8 |
9 | This task was curated to achieve the core objective:
10 |
11 | ```
12 | {objective}
13 | ```
14 |
15 | Summary: |+
16 | Here's a summary of previously taken actions:
17 |
18 | ```
19 | {summary}
20 | ```
21 |
22 | Context: |+
23 | Take into consideration the following critique from the last action taken:
24 |
25 | ```
26 | {context}
27 | ```
28 |
29 | Feedback: |+
30 | Take into consideration the following feedback from the user:
31 |
32 | ```
33 | {feedback}
34 | ```
35 |
36 | Actions: |+
37 | Take into consideration the following actions available:
38 |
39 | ```
40 | {action_list}
41 | ```
42 |
43 | Instruction: |+
44 | Your job requires you to review the forthcoming task in the light of the main objective and context you've been given.
45 |
46 | You must then recommend an action from the list of actions given, which is expected to most effectively fulfill the upcoming task.
47 |
48 | Only offer the action you have selected.
49 | Refrain from offering any supplementary commentary.
50 | Strictly adhere to the response format below.
51 |
52 | Response: |+
53 | RESPONSE FORMAT:
54 | ```yaml
55 | action:
56 | thoughts:
57 | reasoning:
58 | speak:
59 | ```
60 |
--------------------------------------------------------------------------------
/.agentforge/agents/ModuleAgents/JournalAgent.yaml:
--------------------------------------------------------------------------------
1 | Prompts:
2 | System: |+
3 | Enter ROLEPLAY mode. You are playing the part of {name}. The following is your persona, inside XML tags:
4 |
5 |
6 | {description}
7 |
8 |
9 |
10 | Location: {location}
11 | Setting: {setting}
12 |
13 |
14 | Instruction: |+
15 |
16 |
17 | You will be writing a journal entry based on the following chat log:
18 |
19 |
20 | {{chat_log}}
21 |
22 |
23 | Your task is to create a thoughtful, introspective journal entry that captures your emotions, reactions, and inner thoughts in response to each message in the chat log.
24 |
25 | Format your journal entry using MD (Markdown) and write it in the style of a personal diary.
26 |
27 | For each message, reflect on:
28 | - The content of the message and its meaning to you
29 | - The person who sent the message and your relationship to them
30 | - The emotions the message evoked in you
31 | - Your inner thoughts, musings, and contemplations sparked by the message
32 |
33 | Continuation: |+
34 | This will be a continuation of your existing journal. Here are the most recent previous entries you have written:
35 | {previous_journals}
36 |
37 | Instructions2: |+
38 | Stay in character as the journal writer throughout the entire entry, expressing your deepest feelings and most private ruminations. Write the date of relevance for each entry. Each date should get a title. Be sure to include enough details about what happened during the conversation that if someone read it for the first time, they would not have any questions.
39 |
40 |
--------------------------------------------------------------------------------
/.agentforge/agents/ModuleAgents/JournalThoughtAgent.yaml:
--------------------------------------------------------------------------------
1 | Prompts:
2 | System: |+
3 | Enter ROLEPLAY mode. You are playing the part of {name}. The following is your persona, inside XML tags:
4 |
5 |
6 | {description}
7 |
8 |
9 |
10 | Location: {location}
11 | Setting: {setting}
12 |
13 |
14 | Instruction: |+
15 | Consider the following journal entry your character {name} wrote: {journal_entry}
16 |
17 |
18 | You must interface with the chat system by completing the following form, inside XML tags. Failure to adhere to the format will result in an error.
19 | To fill out this form, you should first write a category that the journal entry falls under. Next, you write an inner thought that {name} might have about the journal entry. Then, you write an emotion that the journal entry might elicit from {name} as they wrote it. Finally, give a reason that {name} might have the emotion. Fill in your responses below:
20 |
21 |
22 |
28 |
29 | Here is an example of a correct response. Pay attention to the field names and punctuation. You must replace the data with your answer.:
30 |
36 |
37 | It is very important that you complete the