Commit Graph

9 Commits

Author SHA1 Message Date
QA Agent e743c28df7 docs(deepagents): add complete TypeScript state streaming examples
- Add full StateGraph + Annotation setup with CopilotKitStateAnnotation.spec
- Show complete tool implementation with proper ToolMessage handling
- Include graph compilation with nodes, edges, and routing logic
- Pattern examples after working shared-state-streaming.ts reference
- Fix both Deep Agents and LangGraph docs versions
- Include formatter fixes for JSON files

Fixes FAC-101
2026-07-07 13:41:03 -07:00
Mark 0addf1a3bd Merge branch 'main' into feat/oracle-langgraph-checkpointer 2026-06-30 01:07:51 -07:00
GeneralJerel 698f739e8a fix(examples): repair dangling HITL tool-calls + HTML-unescape persisted memory in oracle showcase
Ports two fixes from the canonical oracle-cookbook demo into the oracle-agent-memory
showcase agent (server.py was byte-identical to the demo's pre-fix version):

1. Dangling tool-calls: booking conversationally calls the book_flight HITL tool,
   which interrupts and emits an assistant tool_call awaiting the UI's Confirm/Cancel.
   If the traveler sends another chat message instead, the unanswered tool_call made
   the next turn 400 ("tool_call_ids did not have response messages"). _repair_dangling_tool_calls
   synthesizes a "not completed" tool result for any dangling call before the history
   reaches the graph. (Inverse of the duplicate-tool-block issue the history-replace
   already handled — documented in docs/known-issues/agentspec-multiturn-toolcall-correlation.md.)

2. HTML-escaped persistence: the agentspec exporter HTML-escapes streamed deltas
   (& < > -> &amp; &lt; &gt;); the SSE generator persisted them raw, so assistant
   replies were stored in Oracle Agent Memory as e.g. "fares &lt; $700".
   _clean_assistant_text html.unescapes the assembled text before persisting.

Both are reproduced + verified in oracle-cookbook (unit tests + in-browser); the ported
functions are byte-identical to the verified demo code.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-29 11:00:37 -07:00
GeneralJerel fac83b0ca6 feat(examples): add optional Oracle LangGraph checkpointer to oracle-agent-memory showcase
Flag-gated (LANGGRAPH_CHECKPOINTER=oracle, default memory) AsyncOracleSaver from
langgraph-oracledb for durable per-thread LangGraph graph state in Oracle,
complementing oracleagentmemory. Default-safe (in-memory fallback). Mirrors
jerelvelarde/oracle-cookbook#4. Draft, stacked on #5563.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-29 06:51:10 -07:00
GeneralJerel 54920c65be fix(showcase/oracle-agent-memory): background-persist lag + inline client-side booking
Sync the three travel-concierge UX fixes from the source repo
(jerelvelarde/oracle-cookbook#3) into the showcase:

- agent/concierge/server.py: persist memory in a serialized background task so
  the SSE stream closes at RUN_FINISHED instead of blocking ~2-13s on memory
  extraction + reconciliation (the post-generation loading lag). Adds a FastAPI
  lifespan drain + background-task failure surfacing.
- frontend/.../FlightOptions.tsx: "Select this flight" now drives confirm -> book
  entirely client-side, so the booking confirm card renders inline in view
  instead of off-screen via a fresh agent turn. The conversational book_flight
  HITL path is unchanged.
- frontend/e2e: add a covering test for the inline booking flow; rename
  sendAndPersist -> sendAndAwaitRun (stream-close is no longer a "memory written"
  signal now that persistence is backgrounded).

oxfmt --check + tsc --noEmit clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-25 15:53:32 -07:00
GeneralJerel 9023efb266 chore(oracle-agent-memory): drop committed package-lock.json
The standalone showcase installs with `npm install` (Nixpacks does this
automatically when there's no lockfile; the README already uses npm install).
Removing the 16.6k-line lockfile also clears the fork-pr-monitor security
alert, which flagged it as a "large added file." Verified: a fresh
`npm install` + `next build` succeeds with no committed lockfile.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-19 13:25:48 -07:00
GeneralJerel be7d674964 chore(oracle-agent-memory): genericize db image namespace
build-and-push.sh defaulted IMAGE to a personal GHCR namespace; use an
OWNER placeholder (still IMAGE-overridable) so the showcase ships no
personal/private registry path. Resolves the pre-merge follow-up.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-18 18:52:04 -07:00
GeneralJerel 1b9ab035ce fix(oracle-agent-memory): ASSM tablespace (ORA-43853) + thread auto-titling
Synced from the cookbook dev repo (verified live on Railway + Playwright):

- db/init/01-create-user.sql: create the `cookbook` user on a dedicated
  ASSM tablespace (cookbook_ts) as its DEFAULT, instead of inheriting
  SYSTEM/MSSM (FREEPDB1's default on the Free :latest-lite image). JSON and
  VECTOR columns are SecureFile-backed and cannot live in an MSSM
  tablespace, so the old user failed schema creation with ORA-43853 and
  memory never persisted. Self-heals a user stranded on SYSTEM
  (drop+recreate); leaves a working ASSM user (local :latest USERS) alone.

- frontend: a new thread is named from its OWN first message, not the
  previous thread's. ThreadTitler now titles off the agent's message/run
  events gated on agent.threadId === activeThreadId, replacing a useEffect
  keyed on activeThreadId that read the shared, agentId-scoped transcript
  while it still held the prior thread's messages during a switch. Adds a
  Playwright regression test (e2e/thread-title.spec.ts).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-18 17:50:12 -07:00
GeneralJerel 2d7926f867 feat(examples): add oracle-agent-memory showcase
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>
2026-06-18 15:35:58 -07:00