Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
4d199cc
refactor agent query message
dongyuanjushi Oct 7, 2024
8f6841c
update query response format
dongyuanjushi Oct 7, 2024
cd9f892
update
dongyuanjushi Oct 7, 2024
e3fd753
update agents
dongyuanjushi Oct 8, 2024
8242dfe
update test files
dongyuanjushi Oct 8, 2024
9dcda37
update response listener with event singal
dongyuanjushi Oct 9, 2024
39c3f28
Merge branch 'main' into v1.0
dongyuanjushi Oct 9, 2024
46f79d6
add linux installer
dongyuanjushi Oct 11, 2024
22828c6
feat: standard agent
2020-qqtcg Oct 12, 2024
92ff9e7
Merge branch 'main' into agent-standard
2020-qqtcg Oct 13, 2024
666d934
Merge branch 'main' into agent-standard
2020-qqtcg Oct 13, 2024
17d01f1
feat: add installer and update docs
dongyuanjushi Oct 14, 2024
16336ab
Merge branch 'main' into v1.0
dongyuanjushi Oct 14, 2024
3c4238c
add configuration file
dongyuanjushi Oct 14, 2024
e2ee970
Merge branch 'main' of github.com:dongyuanjushi/AIOS
dongyuanjushi Oct 14, 2024
b247b09
update installation script
dongyuanjushi Oct 14, 2024
de19cbf
update docs
dongyuanjushi Oct 15, 2024
470e7a9
Merge branch 'main' into v0.1.0
dongyuanjushi Oct 15, 2024
1767767
rm unused installation script
dongyuanjushi Oct 15, 2024
2019451
update
dongyuanjushi Oct 17, 2024
e89fb2b
update agents
dongyuanjushi Oct 17, 2024
e2e8077
Merge branch 'v0.1.0' into agent-memory
dongyuanjushi Oct 17, 2024
2506977
feat: standard agent
2020-qqtcg Oct 18, 2024
e5a2d92
Merge branch 'main' into agent-standard
2020-qqtcg Oct 18, 2024
c874469
fix: log mode
2020-qqtcg Oct 18, 2024
b988e09
Merge branch 'fix-param' into agent-standard
2020-qqtcg Oct 18, 2024
6c91e8c
Agent UI v1.5 (#6)
BRama10 Oct 22, 2024
bae4724
update
dongyuanjushi Oct 24, 2024
5b4839e
fix: standard agent
2020-qqtcg Oct 24, 2024
af19dbe
Merge branch 'main' into agent-standard
2020-qqtcg Oct 25, 2024
f1c01df
add experiments
dongyuanjushi Oct 30, 2024
6e42b33
update README
dongyuanjushi Oct 31, 2024
df481b9
update README
dongyuanjushi Oct 31, 2024
64a01fe
update
dongyuanjushi Oct 31, 2024
a5d662b
Merge branch 'v0.1.0' into v0.1.0
dongyuanjushi Nov 1, 2024
5df6d1e
update
dongyuanjushi Nov 1, 2024
4c5b135
update
dongyuanjushi Nov 3, 2024
7adcbf1
Merge branch 'main' into v0.1.0
dongyuanjushi Nov 3, 2024
1528327
Merge branch 'v0.1.0' of github.com:dongyuanjushi/AIOS into v0.1.0
dongyuanjushi Nov 3, 2024
dc0af57
Merge branch 'v0.1.0' into experiments
dongyuanjushi Nov 3, 2024
f1a4455
Merge branch 'agiresearch:main' into agent-standard
dongyuanjushi Nov 3, 2024
0c76d8e
feat: standard agent
2020-qqtcg Nov 5, 2024
e68c99b
Merge remote-tracking branch 'origin/agent-standard' into agent-standard
2020-qqtcg Nov 5, 2024
d0d2c28
feat: experiment
2020-qqtcg Nov 5, 2024
2160ef3
refactor kernel function
dongyuanjushi Nov 5, 2024
ba90958
update
dongyuanjushi Nov 6, 2024
f2335ba
feat: standard
2020-qqtcg Nov 8, 2024
7922c7b
Merge branch 'main' into agent-standard
2020-qqtcg Nov 8, 2024
e08c994
feat: standard
2020-qqtcg Nov 8, 2024
7a8c9d9
feat: standard
2020-qqtcg Nov 8, 2024
26ce683
feat: add file reader
2020-qqtcg Nov 12, 2024
e26b912
feat: add file reader
2020-qqtcg Nov 12, 2024
ea2c309
feat: gaia experiment
2020-qqtcg Nov 12, 2024
0489e11
feat: gaia experiment run
2020-qqtcg Nov 13, 2024
7abe018
feat: code env
2020-qqtcg Nov 14, 2024
d3e3ef8
Merge branch 'main' into agent-standard
2020-qqtcg Nov 14, 2024
cf960c1
feat: code env
2020-qqtcg Nov 14, 2024
25738e8
feat: code env
2020-qqtcg Nov 14, 2024
81d19d5
feat: merge
2020-qqtcg Nov 18, 2024
a15d855
Merge branch 'refs/heads/main' into agent-standard
2020-qqtcg Nov 19, 2024
3b4848e
feat: merge
2020-qqtcg Nov 19, 2024
52ebda3
feat: code example
2020-qqtcg Nov 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions agent_repl.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
import argparse
import warnings
from typing import List, Tuple

from fastapi import Depends
from dotenv import load_dotenv

from aios.hooks.modules.agent import useFactory
from aios.hooks.modules.llm import useCore
from aios.hooks.modules.scheduler import useFIFOScheduler
from aios.utils.utils import delete_directories, humanify_agent, parse_global_args
from aios.utils.state import useGlobalState

from pyopenagi.agents.interact import Interactor
from aios.utils.utils import delete_directories, parse_global_args
from pyopenagi.manager.manager import AgentManager

from dotenv import load_dotenv
import warnings

# load the args
warnings.filterwarnings("ignore")
parser = parse_global_args()
Expand Down
2 changes: 1 addition & 1 deletion agenthub/app/agents/ContentLayout/DatasetsHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ export function DatasetsHeader({ filteredCount = 0 }: DatasetsHeaderProps) {
</div>
</div>
)
}
}
4 changes: 2 additions & 2 deletions agenthub/app/agents/const.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const DatasetList: DatasetItem[] = [...Array(30)].map(() => ({
}))

export const AgentList: AgentItem[] = [];
// export const AgentList =
// export const AgentList =

export const AgentListGenerator: () => Promise<AgentItem[]> = async () => {
try {
Expand Down Expand Up @@ -395,4 +395,4 @@ export const DatasetLanguages = [
'xx',
'us',
'ua',
]
]
2 changes: 1 addition & 1 deletion agenthub/app/agents/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ export default function Datasets() {
</div>
</div>
)
}
}
2 changes: 1 addition & 1 deletion agenthub/app/agents/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ export interface AgentItem {
createdAt: string;
numDownloads: number;
numFavorites: number;
}
}
18 changes: 9 additions & 9 deletions agenthub/app/chat/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const ChatInterface: React.FC = () => {
thinking: false
};

setChats(prevChats => prevChats.map(chat =>
setChats(prevChats => prevChats.map(chat =>
chat.id === activeChat
? { ...chat, messages: [...chat.messages, newMessage] }
: chat
Expand All @@ -98,19 +98,19 @@ const ChatInterface: React.FC = () => {
thinking: true
};

setChats(prevChats => prevChats.map(chat =>
setChats(prevChats => prevChats.map(chat =>
chat.id === activeChat
? { ...chat, messages: [...chat.messages, botMessage] }
: chat
));

const res = await processAgentCommand(parseNamedContent(parseText(content))[0] as AgentCommand);

setChats(prevChats => prevChats.map(chat =>
setChats(prevChats => prevChats.map(chat =>
chat.id === activeChat
? {
...chat,
messages: chat.messages.map(message =>
messages: chat.messages.map(message =>
message.id === messageId
? { ...message, thinking: false, text: res.content }
: message
Expand Down Expand Up @@ -186,8 +186,8 @@ const ChatInterface: React.FC = () => {

// Add updateChatName function
const updateChatName = (chatId: number, newName: string) => {
setChats(prevChats =>
prevChats.map(chat =>
setChats(prevChats =>
prevChats.map(chat =>
chat.id === chatId ? { ...chat, name: newName } : chat
)
);
Expand Down Expand Up @@ -217,10 +217,10 @@ const ChatInterface: React.FC = () => {
darkMode={darkMode}
/>
<div className="flex flex-col flex-grow pb-4">
<Header
darkMode={darkMode}
<Header
darkMode={darkMode}
setDarkMode={setDarkMode}
title={chats.find(chat => chat.id === activeChat)?.name || 'Chat'}
title={chats.find(chat => chat.id === activeChat)?.name || 'Chat'}
/>
<MessageList messages={activeMessages} darkMode={darkMode} />
<div className='w-full flex h-fit justify-center'>
Expand Down
2 changes: 1 addition & 1 deletion agenthub/components/agentchat/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ export const Header: React.FC<HeaderProps> = ({ darkMode, setDarkMode, title })
</div>
</div>
);
};
};
44 changes: 22 additions & 22 deletions agenthub/components/agentchat/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,49 +18,49 @@ export interface SidebarProps {
export const Sidebar: React.FC<SidebarProps> = ({ chats, activeChat, setActiveChat, addChat, updateChatName, deleteChat, darkMode }) => {
const [editingId, setEditingId] = useState<number | null>(null);
const [editingName, setEditingName] = useState('');

const categoryStyle = "text-xs font-semibold uppercase tracking-wide text-gray-500 mb-2 mt-4 px-2 flex justify-between items-center";
const channelStyle = `flex items-center justify-between rounded px-2 py-1.5 text-sm font-medium transition-colors duration-200 ease-in-out cursor-pointer`;
const activeChannelStyle = darkMode ? 'bg-gray-700 text-white' : 'bg-gray-300 text-gray-900';
const inactiveChannelStyle = darkMode ? 'text-gray-400 hover:bg-gray-700 hover:text-gray-200' : 'text-gray-700 hover:bg-gray-200 hover:text-gray-900';

const startEditing = (chat: Chat) => {
setEditingId(chat.id);
setEditingName(chat.name);
};

const cancelEditing = () => {
setEditingId(null);
setEditingName('');
};

const saveEditing = () => {
if (editingId !== null && editingName.trim() !== '') {
updateChatName(editingId, editingName.trim());
setEditingId(null);
}
};

const handleDelete = (chatId: number, e: React.MouseEvent) => {
e.stopPropagation();
if (window.confirm('Are you sure you want to delete this channel?')) {
deleteChat(chatId);
}
};

return (
<div className={`w-60 flex-shrink-0 ${darkMode ? 'bg-gray-800' : 'bg-gray-100'} p-3 flex flex-col`}>
<div className={`p-4 ${darkMode ? 'bg-gray-700' : 'bg-gray-200'} rounded-lg mb-4`}>
<h2 className={`font-bold ${darkMode ? 'text-white' : 'text-gray-800'}`}>Your AIOS Workspace</h2>
</div>

<div className="flex-grow overflow-y-auto">
<div className={categoryStyle}>
Channels
<Tooltip label="Add Channel" position="right">
<ActionIcon
onClick={addChat}
variant="subtle"
<ActionIcon
onClick={addChat}
variant="subtle"
color={darkMode ? "gray" : "dark"}
className="hover:bg-gray-600 cursor-pointer"
>
Expand Down Expand Up @@ -99,32 +99,32 @@ export const Sidebar: React.FC<SidebarProps> = ({ chats, activeChat, setActiveCh
</div>
<div className="flex items-center">
<Tooltip label="Rename Channel" position="right">
<ActionIcon
<ActionIcon
onClick={(e) => {
e.stopPropagation();
startEditing(chat);
}}
variant="subtle"
}}
variant="subtle"
color={darkMode ? "gray" : "dark"}
size="sm"
className="ml-1"
>
<Edit2
size={14}
className={darkMode ? "text-blue-400 hover:text-blue-300" : "text-blue-600 hover:text-blue-500"}
<Edit2
size={14}
className={darkMode ? "text-blue-400 hover:text-blue-300" : "text-blue-600 hover:text-blue-500"}
/>
</ActionIcon>
</Tooltip>
<Tooltip label="Delete Channel" position="right">
<ActionIcon
onClick={(e) => handleDelete(chat.id, e)}
variant="subtle"
<ActionIcon
onClick={(e) => handleDelete(chat.id, e)}
variant="subtle"
size="sm"
className="ml-1"
>
<Trash2
size={14}
className="text-red-400 hover:text-red-300"
<Trash2
size={14}
className="text-red-400 hover:text-red-300"
/>
</ActionIcon>
</Tooltip>
Expand Down
2 changes: 1 addition & 1 deletion agenthub/components/homepage/Products.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const BuiltWithSupabase = () => {
<div className="text-2xl pt-6">
Try out our many features
</div>

</div>
<div className="mt-16 grid grid-cols-12 gap-5">
{Examples.slice(0, 2).map((example: any, i: number) => {
Expand Down
2 changes: 1 addition & 1 deletion agenthub/interfaces/agentchat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ export interface Chat {
id: number;
name: string;
messages: Message[];
}
}
9 changes: 6 additions & 3 deletions agenthub/lib/env.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
export const inDevEnvironment = !!process && process.env.NODE_ENV === 'development';
// export const serverUrl = inDevEnvironment ? 'http://localhost:8000' : 'https://myapp-y5z35kuonq-uk.a.run.app'
export const baseUrl = inDevEnvironment ? 'http://localhost:3000' : 'https://my.aios.foundation'
export const baseUrl = process.env.NODE_ENV === 'development'
? 'http://localhost:3000'
: 'https://my.aios.foundation';
// export const serverUrl = inDevEnvironment ? 'http://localhost:8000' : 'http://35.232.56.61:8000'
export const serverUrl = 'http://35.232.56.61:8000';

export const serverUrl = process.env.NODE_ENV === 'development'
? 'http://localhost:8000'
: 'https://api.aios.chat';
10 changes: 5 additions & 5 deletions agenthub/public/MentionListV2Light.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
overflow: auto;
padding: 0.4rem;
position: relative;

button {
align-items: center;
background-color: transparent;
display: flex;
gap: 0.25rem;
text-align: left;
width: 100%;

.item-text {
color: #000000 !important;
}
Expand All @@ -27,7 +27,7 @@
&:hover.is-selected {
background-color: var(--gray-3);
}

&.is-selected {
background-color: var(--gray-2);
}
Expand All @@ -38,7 +38,7 @@
:first-child {
margin-top: 0;
}

.mention {
background-color: var(--purple-light);
border-radius: 0.4rem;
Expand All @@ -54,4 +54,4 @@
box-decoration-break: clone;
color: var(--purple);
padding: 0.1rem 0.3rem;
}
}
6 changes: 1 addition & 5 deletions aios/context/simple_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,8 @@

from aios.context.base import BaseContextManager

import os

import torch

# import shutil
from threading import Lock

class SimpleContextManager(BaseContextManager):
def __init__(self):
Expand All @@ -21,7 +17,7 @@ def start(self):
def gen_snapshot(self, pid, context):
# file_path = os.path.join(self.context_dir, f"process-{pid}.pt")
# torch.save(context, file_path)
self.context_dict[str(pid)] = context
self.context_dic[str(pid)] = context

def gen_recover(self, pid):
# file_path = os.path.join(self.context_dir, f"process-{pid}.pt")
Expand Down
14 changes: 9 additions & 5 deletions aios/hooks/llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,9 @@ def aios_starter(
max_gpu_memory,
eval_device,
max_new_tokens,
log_mode,
scheduler_log_mode,
agent_log_mode,
llm_kernel_log_mode,
use_backend
):
"""
Expand All @@ -151,7 +153,9 @@ def aios_starter(
max_gpu_memory (str): The maximum amount of GPU memory to use.
eval_device (str): The device to evaluate the LLM on.
max_new_tokens (int): The maximum number of new tokens to generate.
log_mode (str): The log mode.
agent_log_mode:
llm_kernel_log_mode:
scheduler_log_mode:
use_backend (str): The backend to use for running the LLM kernel.

Yields:
Expand All @@ -164,15 +168,15 @@ def aios_starter(
max_gpu_memory=max_gpu_memory,
eval_device=eval_device,
max_new_tokens=max_new_tokens,
log_mode=log_mode,
log_mode=llm_kernel_log_mode,
use_backend=use_backend
)

# run agents concurrently for maximum efficiency using a scheduler
submit_agent, await_agent_execution = useFactory(
log_mode=log_mode,
log_mode=agent_log_mode,
max_workers=64
)

with fifo_scheduler(llm=llm, log_mode=log_mode, get_queue_message=None):
with fifo_scheduler(llm=llm, log_mode=scheduler_log_mode, get_queue_message=None):
yield submit_agent, await_agent_execution
Loading