agiresearch / AIOS

AIOS: AI Agent Operating System
https://aios.foundation
MIT License
3.47k stars 416 forks source link

[Bug] No such file or directory agent when requesting agent #357

Open joshprk opened 2 days ago

joshprk commented 2 days ago

Checked other resources

Describe your current environment

OS: NixOS 24.11 Unstable GPU: N/A CUDA: N/A LLM Backend: Google LLM Provider: gemini-1.5-flash Cerebrum installed from source Python 3.11, using venv

Describe the bug

Any attempt to run an agent fails with this written in the kernel:

INFO:     127.0.0.1:37684 - "GET /core/status HTTP/1.1" 200 OK
<aios.llm_core.cores.api.google.GeminiLLM object at 0x7fff12a98690>
INFO:     127.0.0.1:37694 - "POST /core/factory/setup HTTP/1.1" 200 OK
{246341: <Future at 0x7fff1270b690 state=running>}
INFO:     127.0.0.1:37698 - "POST /agents/submit HTTP/1.1" 200 OK
Saved agent to cache: /home/joshua/.cache/cerebrum/a79a7411-2e66-4eb1-8536-6f3109d9b38f/local.agent
[Errno 2] No such file or directory: '/home/joshua/.cache/cerebrum/temp/__None/agent.py'
INFO:     127.0.0.1:37704 - "GET /agents/246341/status HTTP/1.1" 200 OK
[Errno 2] No such file or directory: '/home/joshua/.cache/cerebrum/temp/__None/agent.py'
INFO:     127.0.0.1:37718 - "GET /agents/246341/status HTTP/1.1" 200 OK
[Errno 2] No such file or directory: '/home/joshua/.cache/cerebrum/temp/__None/agent.py'
INFO:     127.0.0.1:37724 - "GET /agents/246341/status HTTP/1.1" 200 OK
[Errno 2] No such file or directory: '/home/joshua/.cache/cerebrum/temp/__None/agent.py'
INFO:     127.0.0.1:37734 - "GET /agents/246341/status HTTP/1.1" 200 OK
[Errno 2] No such file or directory: '/home/joshua/.cache/cerebrum/temp/__None/agent.py'
INFO:     127.0.0.1:37740 - "GET /agents/246341/status HTTP/1.1" 200 OK
[Errno 2] No such file or directory: '/home/joshua/.cache/cerebrum/temp/__None/agent.py'
INFO:     127.0.0.1:37750 - "GET /agents/246341/status HTTP/1.1" 200 OK
^CINFO:     Shutting down

This includes running aios-basic-demo, aios-concurrent-demo, and the test.py from Cerebrum.

evison commented 1 day ago

I have the same issue too.

xiaoyu1215 commented 1 day ago

Hi, I also have this issue, but i have sovled this issue: You can use existing agent path in cerebrum command: --agent cerebrum/example/agents/academic_agent/agent.py

After this, I met another issue:

Saved agent to cache:  /.cache/cerebrum/c52c8123-7022-454f-83ca-7e744c165c1a/local.agent
cannot import name 'send_request' from 'aios.hooks.syscall' (/AIOS/aios/hooks/syscall.py)
INFO:     127.0.0.1:39894 - "GET /agents/985440/status HTTP/1.1" 200 OK
cannot import name 'send_request' from 'aios.hooks.syscall' (/AIOS/aios/hooks/syscall.py)
INFO:     127.0.0.1:39894 - "GET /agents/985440/status HTTP/1.1" 200 OK
cannot import name 'send_request' from 'aios.hooks.syscall' (/AIOS/aios/hooks/syscall.py)
INFO:     127.0.0.1:39894 - "GET /agents/985440/status HTTP/1.1" 200 OK
cannot import name 'send_request' from 'aios.hooks.syscall' (/AIOS/aios/hooks/syscall.py)
INFO:     127.0.0.1:39894 - "GET /agents/985440/status HTTP/1.1" 200 OK
...
XiangZhang-zx commented 23 hours ago

I also have the same issue. However, running the command python aios_demo.py --llm_name gpt-4o-mini --llm_backend openai --agent example/academic_agent --task "tell me what the AIOS paper is about?" works successfully.

XiangZhang-zx commented 22 hours ago
Screenshot 2024-12-03 at 11 01 13 AM