2026-07-26 日报

Building Self-Evolving AI Agents with OpenSpace Using Skills, MCP, Lineage, and Low-Cost Reuse - MarkTechPost

Marktechpost

Building Self-Evolving AI Agents with OpenSpace Using Skills, MCP, Lineage, and Low-Cost Reuse - MarkTechPost

at", db_path); return con = sqlite3.connect(db_path) cur = con.cursor() tables = [r for r in cur.execute( "SELECT name FROM sqlite_master WHERE type='table'").fetchall()] print(f"📀 {db_path}\n tables: {tables}") for t in tables: try: cols = [c for c in cur.execute(f"PRAGMA table_info({t})").fetchall()] rows = cur.execute(f"SELECT FROM {t} LIMIT {max_rows}").fetchall() print(f"\n▶ {t} ({len(rows)} shown) cols={cols[:8]}{'…' if len(cols)>8 else ''}") for r in rows: print(" ", str(r)[:160]) except Exception as e: print(f" (skip {t}: {e})") con.close() runtime_db = os.path.join(WORKSPACE, ".openspace", "openspace.db") alt_db = os.path.join(REPO_DIR, ".openspace", "openspace.db") dump_db(runtime_db if os.path.exists(runtime_db) else alt_db) try: from openspace.skill_engine.registry import [...] import os, sys, subprocess, sqlite3, json, textwrap, shutil, time, pathlib ANTHROPIC_API_KEY = "" OPENAI_API_KEY = "" OPENSPACE_MODEL = "anthropic/claude-sonnet-4-5" OPENSPACE_CLOUD_KEY = "" assert sys.version_info >= (3, 12), ( f"OpenSpace needs Python 3.12+, Colab has {sys.version}. " "Runtime > Change runtime type, or use a fallback py312 venv." ) print("✅ Python:", sys.version.split()) REPO_DIR = "/content/OpenSpace" if not os.path.exists(REPO_DIR): subprocess.run( ["git", "clone", "--filter=blob:none", "--sparse", " REPO_DIR], check=True, ) subprocess.run( ["git", "sparse-checkout", "set", "--no-cone", "/", "!/assets/"], cwd=REPO_DIR, check=True, ) print("✅ Cloned to", REPO_DIR) print("Top-level:", sorted(os.listdir(REPO_DIR))) subprocess.run([sys.executable, "-m", "pip", "install", [...] if OPENSPACE_CLOUD_KEY: subprocess.run(["openspace-upload-skill", str(custom)], check=False) print("✅ Cloud CLI demo executed (upload).") else: print("ℹ️ Cloud skipped — set OPENSPACE_CLOUD_KEY to enable " "openspace-upload-skill / openspace-download-skill.") showcase_db = os.path.join(REPO_DIR, "showcase", ".openspace", "openspace.db") dump_db(showcase_db, max_rows=10) if os.path.exists(s

阅读原文