mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
2d7926f867
Runnable companion to the "Build an Agentic Travel App with Oracle Agent Memory, Agent Spec, and CopilotKit" cookbook recipe: a portable Oracle Agent Spec agent on LangGraph over AG-UI, long-term memory on Oracle AI Database, and a CopilotKit V2 frontend with generative UI + human-in-the-loop. - agent/ Python (uv) Agent Spec agent + FastAPI AG-UI server - frontend/ Next.js CopilotKit V2 chat (flight cards, recall chip, HITL booking) - db/ Oracle AI Database (Free image) + cookbook-user init - docker-compose.yml for local Oracle; per-service railway.json for deploy Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
25 lines
899 B
TypeScript
25 lines
899 B
TypeScript
import { execFileSync } from "node:child_process";
|
|
import path from "node:path";
|
|
|
|
// Purge the demo user's durable memory before the suite so the cross-session
|
|
// recall test is deterministic (no stale facts from earlier runs). Runs the
|
|
// reset through the agent's venv via `uv`. Non-fatal: if it can't run, the
|
|
// suite still runs and any real DB problem surfaces in the tests themselves.
|
|
export default function globalSetup() {
|
|
const frontendDir = __dirname;
|
|
const agentDir = path.join(frontendDir, "..", "agent");
|
|
const script = path.join(frontendDir, "e2e", "reset-memory.py");
|
|
try {
|
|
const out = execFileSync(
|
|
"uv",
|
|
["run", "--directory", agentDir, "python", script],
|
|
{ encoding: "utf8", stdio: "pipe" },
|
|
);
|
|
process.stdout.write(out);
|
|
} catch (err) {
|
|
console.warn(
|
|
`[global-setup] memory reset skipped: ${(err as Error).message}`,
|
|
);
|
|
}
|
|
}
|