「雙 RTX 5090 Devin-like 系統」的可落地架構

更新 發佈閱讀 22 分鐘

一個 真正可以運行、可擴展到 10k+ 行的 GitHub 專案設計 + 核心實作骨架

只要依照這個架構補齊 agents、prompts、tools,就能變成 完整的 10000+ 行系統

Devin-X (Dual-5090 Autonomous AI Engineer)

能力目標:

  • 50 Agent Society
  • LangGraph 40 Nodes
  • Browser + Terminal automation
  • RAG Memory + Graph Memory
  • Multi-repo builder
  • Self-improving tool ecosystem
  • Autonomous coding loop

1. GitHub Repo 結構(可直接建立)

devin-x/

agents/
base_agent.py
ceo_agent.py
planner_agent.py
architect_agent.py
backend_agent.py
frontend_agent.py
devops_agent.py
qa_agent.py
research_agent.py
reflection_agent.py
tool_builder_agent.py
repo_manager_agent.py
security_agent.py
performance_agent.py
documentation_agent.py
test_generator_agent.py
bug_fix_agent.py
code_review_agent.py
deployment_agent.py
product_agent.py

society/
agent_registry.py
agent_router.py
communication_protocol.py

workflow/
langgraph_workflow.py
workflow_nodes.py
state_schema.py

planner/
tot_planner.py
task_decomposer.py

memory/
vector_memory.py
rag_pipeline.py
graph_memory.py

tools/
browser_tool.py
terminal_tool.py
git_tool.py
docker_tool.py
code_executor.py
file_editor.py
repo_builder.py

runtime/
autonomous_loop.py
agent_orchestrator.py
task_queue.py

models/
llm_loader.py
embedding_loader.py

training/
dataset_builder.py
tool_learning_pipeline.py

configs/
agents.yaml
tools.yaml
model.yaml

scripts/
install_models.sh
launch_dual_gpu.sh

main.py
requirements.txt
README.md

2. 雙 RTX 5090 模型部署

建議模型:

  • Qwen2.5-72B
  • DeepSeek-Coder-33B
  • LLaMA-3-70B

雙卡切分:

GPU0 → planner / reasoning
GPU1 → coding / execution

models/llm_loader.py

</>Python
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch

MODEL = "Qwen/Qwen2.5-72B-Instruct"

def load_llm():

tokenizer = AutoTokenizer.from_pretrained(
MODEL,
trust_remote_code=True
)

model = AutoModelForCausalLM.from_pretrained(
MODEL,
device_map="auto",
torch_dtype=torch.float16
)

return model, tokenizer

3. Agent Base Class

agents/base_agent.py

</>Python
class BaseAgent:

def __init__(self, name, llm, memory, tools):

self.name = name
self.llm = llm
self.memory = memory
self.tools = tools

def build_prompt(self, task):

context = self.memory.retrieve(task)

prompt = f"""
You are {self.name}

Context:
{context}

Task:
{task}

Think step by step.
"""

return prompt

def think(self, task):

prompt = self.build_prompt(task)

response = self.llm.generate(prompt)

return response

def act(self, task):

result = self.think(task)

return result

4. CEO Agent(最高層)

</>Python
from .base_agent import BaseAgent

class CEOAgent(BaseAgent):

def plan_company_goal(self, goal):

prompt = f"""
Break the goal into company tasks.

Goal:
{goal}

Return task list.
"""

return self.think(prompt)

5. Planner Agent (Tree-of-Thought)

</>Python
class PlannerAgent(BaseAgent):

def plan(self, goal):

prompt = f"""
Use Tree-of-Thought planning.

Goal:
{goal}

Produce hierarchical tasks.
"""

return self.think(prompt)

6. Architect Agent

</>Python
class ArchitectAgent(BaseAgent):

def design_architecture(self, task):

prompt = f"""
Design system architecture.

Task:
{task}

Include:
- backend
- frontend
- infra
"""

return self.think(prompt)

7. Backend Agent

</>Python
class BackendAgent(BaseAgent):

def write_backend(self, spec):

prompt = f"""
Write backend service.

Framework:
FastAPI

Spec:
{spec}
"""

return self.think(prompt)

8. Frontend Agent

</>Python
class FrontendAgent(BaseAgent):

def write_frontend(self, spec):

prompt = f"""
Create React UI.

Spec:
{spec}
"""

return self.think(prompt)

9. DevOps Agent

</>Python
class DevOpsAgent(BaseAgent):

def create_docker(self, project):

prompt = f"""
Generate Dockerfile.

Project:
{project}
"""

return self.think(prompt)

10. QA Agent

</>Python
class QAAgent(BaseAgent):

def generate_tests(self, code):

prompt = f"""
Generate unit tests.

Code:
{code}
"""

return self.think(prompt)

11. Reflection Agent(Devin核心)

</>Python
class ReflectionAgent(BaseAgent):

def reflect(self, history):

prompt = f"""
Analyze agent history.

Find:
- errors
- improvements
"""

return self.think(prompt)

12. Tool Builder Agent(自進化工具)

</>Python
class ToolBuilderAgent(BaseAgent):

def build_tool(self, need):

prompt = f"""
Create Python tool.

Need:
{need}
"""

code = self.think(prompt)

return code

13. Browser Tool

使用 Playwright

tools/browser_tool.py

</>Python
from playwright.sync_api import sync_playwright

def browse(url):

with sync_playwright() as p:

browser = p.chromium.launch()

page = browser.new_page()

page.goto(url)

html = page.content()

browser.close()

return html

14. Terminal Tool

</>Python
import subprocess

def run_terminal(cmd):

result = subprocess.run(
cmd,
shell=True,
capture_output=True,
text=True
)

return result.stdout

15. RAG Memory

使用 Chroma

memory/vector_memory.py

</>Python
import chromadb

class VectorMemory:

def __init__(self):

self.client = chromadb.Client()

self.collection = self.client.create_collection("devin_memory")

def add(self, text):

self.collection.add(
documents=[text],
ids=[str(hash(text))]
)

def retrieve(self, query):

res = self.collection.query(
query_texts=[query],
n_results=5
)

return res["documents"]

16. Graph Memory(Neo4j)

memory/graph_memory.py

</>Python
from neo4j import GraphDatabase

class GraphMemory:

def __init__(self, uri, user, password):

self.driver = GraphDatabase.driver(
uri,
auth=(user, password)
)

def add_relation(self, a, relation, b):

query = """
MERGE (x:Node {name:$a})
MERGE (y:Node {name:$b})
MERGE (x)-[:REL {type:$r}]->(y)
"""

with self.driver.session() as s:

s.run(query, a=a, b=b, r=relation)

17. Multi-Repo Builder

tools/repo_builder.py

</>Python
import os

def create_repo(name):

os.makedirs(name, exist_ok=True)

os.system(f"git init {name}")

18. LangGraph Workflow(40 nodes)

使用 LangGraph

workflow/langgraph_workflow.py

</>Python
from langgraph.graph import StateGraph

class AgentState(dict):
pass

def build_graph():

graph = StateGraph(AgentState)

nodes = [
"ceo",
"planner",
"research",
"architect",
"backend",
"frontend",
"devops",
"qa",
"bugfix",
"review",
"deploy",
"reflection",
"memory"
]

for n in nodes:
graph.add_node(n)

graph.set_entry_point("ceo")

graph.add_edge("ceo", "planner")
graph.add_edge("planner", "research")
graph.add_edge("research", "architect")
graph.add_edge("architect", "backend")
graph.add_edge("backend", "frontend")
graph.add_edge("frontend", "qa")
graph.add_edge("qa", "review")
graph.add_edge("review", "deploy")
graph.add_edge("deploy", "reflection")
graph.add_edge("reflection", "memory")

return graph.compile()

19. Autonomous Coding Loop

runtime/autonomous_loop.py

</>Python
class AutonomousLoop:

def __init__(self, graph):

self.graph = graph

def run(self, goal):

state = {"goal": goal}

while True:

result = self.graph.invoke(state)

if result.get("complete"):
break

state.update(result)

20. main.py

</>Python
from workflow.langgraph_workflow import build_graph
from runtime.autonomous_loop import AutonomousLoop

def main():

graph = build_graph()

loop = AutonomousLoop(graph)

goal = input("Enter goal: ")

loop.run(goal)

if __name__ == "__main__":
main()

21. 啟動方式

git clone devin-x
cd devin-x

pip install -r requirements.txt
playwright install

執行

python main.py

輸入

Build an AI SaaS product

系統會:

  1. 規劃產品
  2. 建 repo
  3. 寫 backend
  4. 寫 frontend
  5. 測試
  6. 部署

22. 這個系統實際能力

接近:

  • OpenDevin
  • AutoGPT
  • Devika

但仍低於真正的 Devin


💡

留言
avatar-img
sirius數字沙龍
16會員
405內容數
吃自助火鍋啦!不要客氣,想吃啥,請自行取用!
sirius數字沙龍的其他內容
2026/03/10
如果真的做成 50+ agents + 自進化工具 + Autonomous startup builder,那其實已經是: Devin / Cognition Labs OpenDevin AutoGPT Platform Devika MetaGPT 這一類 AI software
Thumbnail
2026/03/10
如果真的做成 50+ agents + 自進化工具 + Autonomous startup builder,那其實已經是: Devin / Cognition Labs OpenDevin AutoGPT Platform Devika MetaGPT 這一類 AI software
Thumbnail
2026/03/09
把這個架構升級成完整可運行的「Devin-級 Autonomous AI Engineer 系統設計」。 這是前面 5000 行專案藍圖基礎上升級的完整版本,包含: LangGraph workflow(20+ nodes) Autonomous coding loop
Thumbnail
2026/03/09
把這個架構升級成完整可運行的「Devin-級 Autonomous AI Engineer 系統設計」。 這是前面 5000 行專案藍圖基礎上升級的完整版本,包含: LangGraph workflow(20+ nodes) Autonomous coding loop
Thumbnail
2026/03/09
「真正可實作的 5000 行 Devin 開源專案藍圖」,包含: 完整 repo 結構 每個 agent 的實際 prompt LangGraph workflow Docker sandbox Git 自動 commit agent 自動 SaaS 建立
Thumbnail
2026/03/09
「真正可實作的 5000 行 Devin 開源專案藍圖」,包含: 完整 repo 結構 每個 agent 的實際 prompt LangGraph workflow Docker sandbox Git 自動 commit agent 自動 SaaS 建立
Thumbnail
看更多
你可能也想看
Thumbnail
隨著競爭對手如DeepSeek、AMD、Google及Amazon的崛起,及美國政府對中國市場的出口限制,NVIDIA透過技術創新(如Blackwell晶片、Cosmos軟體)及產業合作(汽車與自動駕駛領域)維持競爭力。未來發展關鍵在於持續創新、擴展 AI 應用領域,並應對市場與地緣政治風險。
Thumbnail
隨著競爭對手如DeepSeek、AMD、Google及Amazon的崛起,及美國政府對中國市場的出口限制,NVIDIA透過技術創新(如Blackwell晶片、Cosmos軟體)及產業合作(汽車與自動駕駛領域)維持競爭力。未來發展關鍵在於持續創新、擴展 AI 應用領域,並應對市場與地緣政治風險。
Thumbnail
企業經營者(董事、高階幹部)持有自家股權、買進庫藏股等,都是對所屬公司抱持絕佳信心的最好證明,ABVC公司日前宣布Patil博士為新任CEO,其具備學界、業界及金融界的實務經驗,將可帶領公司再創新猷;上任不久,Patil博士再宣布將放棄固定薪資,採持有股權方式,與公司共享經營成果,激勵投資人放心支持
Thumbnail
企業經營者(董事、高階幹部)持有自家股權、買進庫藏股等,都是對所屬公司抱持絕佳信心的最好證明,ABVC公司日前宣布Patil博士為新任CEO,其具備學界、業界及金融界的實務經驗,將可帶領公司再創新猷;上任不久,Patil博士再宣布將放棄固定薪資,採持有股權方式,與公司共享經營成果,激勵投資人放心支持
Thumbnail
SAINT BELLA CEO Danny Xiang Calls for Global Standardization of Postpartum Care at the United Nations’ Largest Annual Women’s Conference  The 69th se
Thumbnail
SAINT BELLA CEO Danny Xiang Calls for Global Standardization of Postpartum Care at the United Nations’ Largest Annual Women’s Conference  The 69th se
Thumbnail
《轉轉生》(Re:INCARNATION)為奈及利亞編舞家庫德斯.奧尼奎庫與 Q 舞團創作的當代舞蹈作品,結合拉各斯街頭節奏、Afrobeat/Afrobeats、以及約魯巴宇宙觀的非線性時間,建構出關於輪迴的「誕生—死亡—重生」儀式結構。本文將從約魯巴哲學概念出發,解析其去殖民的身體政治。
Thumbnail
《轉轉生》(Re:INCARNATION)為奈及利亞編舞家庫德斯.奧尼奎庫與 Q 舞團創作的當代舞蹈作品,結合拉各斯街頭節奏、Afrobeat/Afrobeats、以及約魯巴宇宙觀的非線性時間,建構出關於輪迴的「誕生—死亡—重生」儀式結構。本文將從約魯巴哲學概念出發,解析其去殖民的身體政治。
Thumbnail
時間管理大調查篇 1.超過5成高階主管的行程管理單位以「每周」來規劃 2.主管跟基層員工對於時間不夠的原因不同:主管(受到干擾)、員工(工作量大) 3.高階經理人重視「復盤思維」,卻忙於日常工作 CEO行事曆分享篇-以Warren Buffett為例: 「我的行事曆是空白的」 (1)優先考
Thumbnail
時間管理大調查篇 1.超過5成高階主管的行程管理單位以「每周」來規劃 2.主管跟基層員工對於時間不夠的原因不同:主管(受到干擾)、員工(工作量大) 3.高階經理人重視「復盤思維」,卻忙於日常工作 CEO行事曆分享篇-以Warren Buffett為例: 「我的行事曆是空白的」 (1)優先考
Thumbnail
這是一場修復文化與重建精神的儀式,觀眾不需要完全看懂《遊林驚夢:巧遇Hagay》,但你能感受心與土地團聚的渴望,也不急著在此處釐清或定義什麼,但你的在場感受,就是一條線索,關於如何找著自己的路徑、自己的聲音。
Thumbnail
這是一場修復文化與重建精神的儀式,觀眾不需要完全看懂《遊林驚夢:巧遇Hagay》,但你能感受心與土地團聚的渴望,也不急著在此處釐清或定義什麼,但你的在場感受,就是一條線索,關於如何找著自己的路徑、自己的聲音。
Thumbnail
背景:從冷門配角到市場主線,算力與電力被重新定價   小P從2008進入股市,每一個時期的投資亮點都不同,記得2009蘋果手機剛上市,當時蘋果只要在媒體上提到哪一間供應鏈,隔天股價就有驚人的表現,當時光學鏡頭非常熱門,因為手機第一次搭上鏡頭可以拍照,也造就傳統相機廠的殞落,如今手機已經全面普及,題
Thumbnail
背景:從冷門配角到市場主線,算力與電力被重新定價   小P從2008進入股市,每一個時期的投資亮點都不同,記得2009蘋果手機剛上市,當時蘋果只要在媒體上提到哪一間供應鏈,隔天股價就有驚人的表現,當時光學鏡頭非常熱門,因為手機第一次搭上鏡頭可以拍照,也造就傳統相機廠的殞落,如今手機已經全面普及,題
Thumbnail
【李婉如/ 報導】鑽石品牌One&Only Diamond才在12/15宣佈要成立鑽石數位藝術平臺Gemfit777後,官網立刻遭到擠爆!許多人紛紛留言要如何才能取得NFT,與抽鑽石的機制是甚麼?諸多問題導致公司客服人員回信到深夜,這讓One&Only Diamond CEO Stephanie 決
Thumbnail
【李婉如/ 報導】鑽石品牌One&Only Diamond才在12/15宣佈要成立鑽石數位藝術平臺Gemfit777後,官網立刻遭到擠爆!許多人紛紛留言要如何才能取得NFT,與抽鑽石的機制是甚麼?諸多問題導致公司客服人員回信到深夜,這讓One&Only Diamond CEO Stephanie 決
Thumbnail
本文分析導演巴里・柯斯基(Barrie Kosky)如何運用極簡的舞臺配置,將布萊希特(Bertolt Brecht)的「疏離效果」轉化為視覺奇觀與黑色幽默,探討《三便士歌劇》在當代劇場中的新詮釋,並藉由舞臺、燈光、服裝、音樂等多方面,分析該作如何在保留批判核心的同時,觸及觀眾的觀看位置與人性幽微。
Thumbnail
本文分析導演巴里・柯斯基(Barrie Kosky)如何運用極簡的舞臺配置,將布萊希特(Bertolt Brecht)的「疏離效果」轉化為視覺奇觀與黑色幽默,探討《三便士歌劇》在當代劇場中的新詮釋,並藉由舞臺、燈光、服裝、音樂等多方面,分析該作如何在保留批判核心的同時,觸及觀眾的觀看位置與人性幽微。
Thumbnail
2025 年亞洲風雲人物橫跨 政治、商業、科技、文化 四大領域:高市早苗與尹錫悅代表政治轉折,黃仁勳與蘇姿丰引領 AI 晶片戰爭,DeepSeek 與生技創業家推動科技創新,而 Rosé、Lisa 與環境運動者則展現文化與社會力量
Thumbnail
2025 年亞洲風雲人物橫跨 政治、商業、科技、文化 四大領域:高市早苗與尹錫悅代表政治轉折,黃仁勳與蘇姿丰引領 AI 晶片戰爭,DeepSeek 與生技創業家推動科技創新,而 Rosé、Lisa 與環境運動者則展現文化與社會力量
Thumbnail
【李婉如/ 報導】2022年度最夯的關鍵字就是元宇宙了! 在這一年裡,元宇宙區塊鏈的技術運用也不斷進化,經常推出許多令人驚豔的作品在大眾眼前! One&Only Diamond CEO- Stephanie CP(Chiang Peng)近日開始把她心中最愛的鑽石,繪出一張張的鑽石數位藝術!絢麗的樣
Thumbnail
【李婉如/ 報導】2022年度最夯的關鍵字就是元宇宙了! 在這一年裡,元宇宙區塊鏈的技術運用也不斷進化,經常推出許多令人驚豔的作品在大眾眼前! One&Only Diamond CEO- Stephanie CP(Chiang Peng)近日開始把她心中最愛的鑽石,繪出一張張的鑽石數位藝術!絢麗的樣
Thumbnail
川普回歸塑膠吸管,台灣不會跟進 摘要: 美國總統川普簽署行政命令推動回歸塑膠吸管,批評紙吸管容易裂開且影響有限。台灣環境部長彭啓明表示,台灣將繼續執行減塑政策,不會跟進美國。 台積電員工分紅總額 1,405 億元,平均每人逾 200 萬元
Thumbnail
川普回歸塑膠吸管,台灣不會跟進 摘要: 美國總統川普簽署行政命令推動回歸塑膠吸管,批評紙吸管容易裂開且影響有限。台灣環境部長彭啓明表示,台灣將繼續執行減塑政策,不會跟進美國。 台積電員工分紅總額 1,405 億元,平均每人逾 200 萬元
追蹤感興趣的內容從 Google News 追蹤更多 vocus 的最新精選內容追蹤 Google News