Sunday, October 25, 2026

The DBA’s Guide to Oracle Agentic AI Foundations (LangChain and the OpenAI Agents SDK)

Part 3: LangChain and the OpenAI Agents SDK – Your Agent Toolbox

Agentic AI Foundations Series · Part 3 of 6

Part 3: LangChain and the OpenAI Agents SDK – Your Agent Toolbox

1Z0-1157-26 exam prep for Oracle DBAs

You don't need to write code for this exam. You need to know which building block does which job.

LangChain: the Lego set

LangChain is a framework of reusable pieces you snap together. Think of building a RAG app over your EBS runbooks:

  1. Document loader reads the runbook PDFs.
  2. Text splitter cuts them into small chunks.
  3. Embeddings turn each chunk into a vector.
  4. Vector store saves the vectors (Oracle AI Vector Search works here).
  5. Retriever finds the chunks that match a question.
  6. Prompt template builds the prompt with variables like {question} and {context}.
  7. Chat model calls the LLM.
  8. Output parser turns the reply into clean JSON or a list.

The glue is LCEL, LangChain Expression Language. It joins steps with a pipe, just like Unix: prompt | model | parser.

For agents, add tools (any function, often marked with @tool) and memory (chat history).

LangGraph: when you need loops and branches

LangGraph models an agent as a flowchart:

  • Nodes = steps (call LLM, run tool).
  • Edges = arrows between steps; conditional edges choose the next step.
  • State = shared data passed around.
  • Checkpointer = saves progress so you can pause for human approval and resume, much like a restartable patch session.
Exam hook: Straight line = chain (LCEL). Loops, branches, multi-agent = LangGraph.

OpenAI Agents SDK: small and simple

This SDK has only a handful of primitives:

  • Agent – name + instructions + tools + model.
  • Runner – runs the loop (run, run_sync, run_streamed).
  • Function tool – a Python function turned into a tool with @function_tool.
  • Handoff – pass control to another agent (triage → billing).
  • Guardrails – input/output checks; a tripwire stops the run when triggered.
  • Sessions – automatic conversation memory.
  • Tracing – built-in log of every LLM call, tool call, and handoff.

It can also use MCP servers as tool sources and call agents as tools.

Remember for the exam

  • Text splitter = chunking; retriever = fetching relevant chunks.
  • LCEL pipe: prompt | model | parser.
  • LangGraph = nodes, edges, state, checkpointer.
  • Agents SDK: Agent, Runner, tools, handoffs, guardrails (tripwire), sessions, tracing.

Self-check

  1. Which LangChain component breaks documents into chunks? (Text splitter)
  2. Which OpenAI Agents SDK primitive executes the agent loop? (Runner)
  3. What saves LangGraph state so a run can pause and resume? (Checkpointer)

No comments: