Overview
Domain 4 covers the API-first way to build agents in OCI Enterprise AI: the OCI Responses API. It follows the OpenAI Responses request format, so you use the OpenAI SDK with an OCI base URL, OCI credentials and a project OCID, while requests run in OCI regions. You need to know how a project groups responses, conversations, files, containers and memory settings.
The section covers the four supported tool types (File Search, Code Interpreter, Function Calling and MCP Calling), the Files, Vector Stores and Containers APIs that support them, and how to keep multi-turn context with the Conversations API, project memory and compaction. Streaming and background mode for long tasks are in scope. It also covers Enterprise AI NL2SQL, which turns questions into validated SQL over Autonomous AI Database through a semantic store, with execution handled by the DBTools MCP Server.
How it's tested
Questions in this section often show a goal and a fragment of a Responses API request, then ask which tool type, parameter or supporting API completes it. Others describe a failure, such as lost context between turns or a long task timing out, and ask for the matching feature.
-
Pick the tool type
You match a need, such as searching uploaded PDFs, running a calculation or calling an internal service, to file_search, code_interpreter, function or mcp.
-
Keep the context
A multi-turn assistant forgets earlier turns or grows too large, and you choose the Conversations API, project memory or compaction.
-
Data access route
A business user asks questions about database tables, and you place NL2SQL, the semantic store and the DBTools MCP Server correctly.
An analyst agent must answer questions over policy PDFs and compute premiums from tables in those files. File Search over a vector store finds the relevant passages, and Code Interpreter runs Python on extracted figures inside an OCI-managed container. Function Calling would push the calculation into the team's own code without need, and NL2SQL applies to database tables, not uploaded documents.
Topics 5
Official topics from the Oracle outline, in outline order.
4.1 Build agent workflows with the OCI Responses APIEndpoints, projects, single and multi-step requests.
- What it means
- The OCI Responses API creates model responses and runs tool-based, multi-step workflows at the /responses path of the OCI OpenAI-compatible base URL. A project, identified by OCID, groups an agent's responses, conversations, files, containers and memory settings.
- What to understand
- You call responses.create with a model, input and optional tools. The API accepts text and image input and returns text output. API keys suit development and IAM authentication suits production. For long tasks, background mode returns immediately with a queued or in-progress status that you poll, retrieve or cancel; streaming returns events as they are produced and background streams can resume from a sequence number. Background execution keeps temporary response data in OCI even when store is false.
- How it shows up
- A scenario describes a long-running research request timing out and asks which request option to use.
- Common confusion
- Thinking background mode makes processing faster; it only changes how the client waits.
4.2 Use built-in tools in the Responses APIFile Search, Code Interpreter, Function Calling and MCP Calling.
- What it means
- OCI supports four tools[].type values: file_search to retrieve from files in a vector store, code_interpreter to run Python in an isolated OCI-managed container, function for functions your application runs, and mcp to call methods on a remote MCP server by URL.
- What to understand
- File Search and Code Interpreter are executed by OCI, while function calls return to your code for execution. MCP Calling lets the model use tools on an external server without writing a wrapper. Only these four types are supported, tool availability varies by region, and tools are configured through the API rather than the console. Other OCI capabilities such as NL2SQL are not added through the tools array.
- How it shows up
- Expect to match a business need to the correct tool type value.
- Common confusion
- Adding NL2SQL or web search as a tool type, or expecting OCI to run your function code.
4.3 Ground agents with Files and Vector StoresUploading documents and retrieving by meaning.
- What it means
- The Files API uploads documents for use as direct input or for retrieval. The Vector Stores API indexes those files so File Search can retrieve passages by semantic similarity. The Containers API provides sandboxed storage and execution space used with Code Interpreter.
- What to understand
- A typical flow uploads files, creates a vector store, attaches files so they are processed into chunks and embeddings, then passes the vector store to file_search in a request. Small documents can be sent directly as input_file content without retrieval. Retrieval keeps prompts small on large collections and lets answers reflect updated documents once re-indexed. All three foundational APIs are OpenAI-compatible.
- How it shows up
- A question asks how to let an agent answer from hundreds of manuals without pasting them into each prompt.
- Common confusion
- Assuming uploading a file automatically makes it searchable without a vector store.
4.4 Manage conversation state and agent memoryConversations API, project memory and compaction.
- What it means
- The Conversations API keeps multi-turn context managed by OCI: you create a conversation and pass its ID with each request. Memory is configured at the project level, with short-term memory for the current conversation and long-term memory for context across related interactions.
- What to understand
- Alternatively, applications can resend history or prior outputs themselves. Compaction shrinks history into a smaller encrypted representation. Explicit compaction calls /responses/compact synchronously and does not support store, background or stream. Automatic compaction is set with context_management of type compaction and a compact_threshold of at least 1000 tokens. Compaction consumes tokens and can lose detail, so set thresholds below the model limit with room for output.
- How it shows up
- A scenario describes a chat that becomes slow and costly after many turns and asks which feature to enable.
- Common confusion
- Configuring memory per request instead of at the project level, or setting a threshold below 1000 tokens.
4.5 Access enterprise data with NL2SQLSemantic stores, SQL generation and governed execution.
- What it means
- Enterprise AI NL2SQL converts natural-language questions into validated SQL over enterprise data in Oracle Autonomous AI Database without copying the data. A semantic enrichment layer maps business terms to tables, columns and joins.
- What to understand
- You create a semantic store backed by a structured-data vector store, configure connections and run enrichment. The GenerateSqlFromNl API returns SQL only and does not run it. Execution goes through the DBTools MCP Server, which authorizes and runs the query under existing database permissions and guardrails. This split keeps generation separate from data access control, which is a common exam theme.
- How it shows up
- Expect to identify which component executes generated SQL and whose permissions apply.
- Common confusion
- Believing GenerateSqlFromNl executes the query or bypasses database privileges.
High-yield concepts
The terms, rules and formulas this domain turns into questions most often.
-
OCI Responses API
OpenAI-compatible API for responses and agent workflows on OCI.
- Remember
- Same request syntax; OCI base URL, credentials and regions.
- Tested as
- Core of most agent questions.
- Trap
- Pointing SDKs at OpenAI's own endpoint.
-
Project
Container for responses, conversations, files, containers and memory settings.
- Remember
- Its OCID is required on calls.
- Tested as
- Setup and memory questions.
- Trap
- Treating it as a compartment.
-
file_search
Tool that retrieves from files in a vector store.
- Remember
- Executed by OCI.
- Tested as
- Document Q&A scenarios.
- Trap
- Using it for database tables.
-
code_interpreter
Tool that runs Python in an isolated OCI container.
- Remember
- Good for calculations and file analysis.
- Tested as
- Computation scenarios.
- Trap
- Writing a custom function instead.
-
function
Tool type where your application runs the function.
- Remember
- Results are sent back in a follow-up request.
- Tested as
- Custom logic scenarios.
- Trap
- Expecting OCI to execute it.
-
mcp
Tool type that calls methods on a remote MCP server.
- Remember
- Configured with a server URL.
- Tested as
- Shared enterprise tool scenarios.
- Trap
- Wrapping the server in custom code.
-
Vector Stores API
Indexes files for semantic retrieval.
- Remember
- Required for file_search over a collection.
- Tested as
- RAG setup questions.
- Trap
- Assuming uploads are searchable automatically.
-
Conversations API
OCI-managed multi-turn state.
- Remember
- Pass the conversation ID on each request.
- Tested as
- Context loss scenarios.
- Trap
- Resending full history needlessly.
-
Compaction
Shrinks history into an encrypted, smaller form.
- Remember
- Automatic threshold at least 1000 tokens.
- Tested as
- Long conversation cost questions.
- Trap
- Assuming no detail is lost.
-
Background mode
Lets processing continue after the call returns.
- Remember
- Poll, retrieve or cancel by response ID.
- Tested as
- Long task scenarios.
- Trap
- Thinking it reduces processing time.
-
GenerateSqlFromNl
NL2SQL API that returns SQL from a question.
- Remember
- Generates only; does not execute.
- Tested as
- Data access questions.
- Trap
- Expecting results rows back.
-
DBTools MCP Server
Executes generated SQL with database permissions.
- Remember
- Keeps execution under existing access controls.
- Tested as
- Governed data access questions.
- Trap
- Granting the model direct database access.
Side by side
Concepts candidates mix up, compared on the point that decides the answer.
Responses API tool types
| Concept | Meaning | Key difference | Common trap |
|---|---|---|---|
| file_search | Retrieves passages from vector store files | Run by OCI over your documents | Using it for live database queries |
| code_interpreter | Runs Python in a managed container | Run by OCI in isolation | Expecting access to your private network |
| function | Model requests a call your app performs | Run by your application | Assuming OCI executes it |
| mcp | Model calls methods on a remote MCP server | Run by the external server | Ignoring the server's own auth |
Keeping multi-turn context
| Concept | Meaning | Key difference | Common trap |
|---|---|---|---|
| Conversations API | OCI stores conversation state by ID | Service-managed state | Forgetting to pass the conversation ID |
| Client-managed history | App resends prior messages or outputs | App controls what is sent | Letting history grow unchecked |
| Compaction | Older turns reduced to a compact item | Saves tokens with some detail loss | Threshold set too close to model limit |
Answering from enterprise data
| Concept | Meaning | Key difference | Common trap |
|---|---|---|---|
| File Search over vector stores | Semantic retrieval from documents | Unstructured content | Loading tables as PDFs |
| NL2SQL with semantic store | Generates SQL over Autonomous AI Database | Structured data in place | Assuming SQL runs automatically |
Exam traps
Each trap is an answer that looks right. Learn the clue that should change your mind.
-
Any tool type works
- What candidates pick
- Add a web_search or nl2sql tool type to the request.
- Why it looks right
- Other platforms offer such tools.
- Why it's wrong
- OCI supports only file_search, code_interpreter, function and mcp; NL2SQL uses its own APIs.
Clue to watch for Options list tool names not in the four supported types.
-
OCI runs your function
- What candidates pick
- Expect the function result to appear without extra code.
- Why it looks right
- Built-in tools run automatically.
- Why it's wrong
- Function tool calls return to your application, which runs the code and sends the result back.
Clue to watch for The function touches internal systems only the app can reach.
-
GenerateSqlFromNl returns data
- What candidates pick
- Read result rows from the NL2SQL response.
- Why it looks right
- The name suggests a full query service.
- Why it's wrong
- It generates SQL only; the DBTools MCP Server runs the query under database permissions.
Clue to watch for Questions ask where execution and authorization happen.
-
Background mode is faster
- What candidates pick
- Enable background mode to cut response time.
- Why it looks right
- It sounds like parallel processing.
- Why it's wrong
- Background mode only lets the client return and poll; processing time is unchanged.
Clue to watch for The issue is a client or gateway timeout.
-
Memory set on each call
- What candidates pick
- Pass long-term memory options inside every request.
- Why it looks right
- Most options are request parameters.
- Why it's wrong
- Short-term and long-term memory are configured at the project level and applied to conversations in that project.
Clue to watch for The scenario mentions consistent memory across an application.
-
Upload equals indexed
- What candidates pick
- Upload documents with the Files API and call file_search immediately.
- Why it looks right
- Upload feels like the end of setup.
- Why it's wrong
- File Search reads from a vector store, so files must be added to one and processed first.
Clue to watch for Answers ignore newly uploaded content.
Answer framework
Use this order when designing or debugging a Responses API agent on OCI.
- Create or choose a project, configure memory and retention, and set the SDK with the OCI base URL, credentials and project OCID.
- Pick the model value that matches how the model is served: model ID, dedicated endpoint OCID or routing profile OCID.
- Map each capability to a supported tool type, and prepare Files, Vector Stores or Containers resources that the tools depend on.
- Choose how context persists across turns, using the Conversations API, project memory and automatic or explicit compaction.
- Route structured data questions through NL2SQL with a semantic store, and keep execution in the DBTools MCP Server under database permissions.
Practice question
Want more like this? The 1Z0-1158-26 practice test has questions for every domain.
Checklist
0 of 13
Tick each one you can do without notes. Your ticks stay in this browser.
Study strategy
Spend the largest block of your preparation here and make it practical. Create a Generative AI project in a supported region, generate an API key, and send a first responses.create call from the OpenAI Python SDK with the OCI base URL and project OCID.
Then add one tool at a time. Upload three PDFs, create a vector store and ask questions with file_search. Ask for a calculation and watch code_interpreter run it. Define a simple function, catch the call in your code and return a result. Point the mcp tool at a sample server. Keep a table of who executes each tool and what resource it needs.
Next, create a conversation and hold a ten-turn exchange, noting token use. Turn on automatic compaction with a threshold above 1000 and compare. Start a long request in background mode, poll it and cancel one.
Read the NL2SQL documentation end to end, even if you cannot build it, and sketch the path from question to semantic store to generated SQL to the DBTools MCP Server. Finish with scenario practice, because most marks here come from choosing the right tool or API under a stated constraint.
FAQ
How much of 1Z0-1158-26 is Domain 4, Building OCI Enterprise AI Agents?
Oracle does not publish weights. Third-party practice banks give this section the largest share, about a quarter of items, so plan the most study time here.
Is the OCI Responses API the same as OpenAI's?
It follows the same request format and works with the OpenAI SDK, but uses an OCI base URL, OCI credentials, a project OCID and OCI-hosted models.
Which tool types are supported?
Four: file_search, code_interpreter, function and mcp. Availability can vary by region, and tools are configured through the API.
How is this different from the older OCI Generative AI Agents service?
The Responses API is an OpenAI-compatible, API-first approach with tools and memory in projects. Study the current Enterprise AI agent docs rather than older console-based agent material.
Does NL2SQL run the SQL it generates?
No. GenerateSqlFromNl only returns SQL. The DBTools MCP Server executes it using existing database permissions and guardrails.
When should I use background mode?
For long tasks where a client or gateway would time out. It does not reduce processing time; you poll or stream the result later.
What is the minimum automatic compaction threshold?
The compact_threshold must be at least 1000 tokens. Set it below the model's context limit with room for output and later turns.
Other Artificial Intelligence & Machine Learning certifications
Where the same subject shows up in other exams. Cards marked "Same subject" open the matching domain.
Test your Domain 4 knowledge
You have covered the Responses API, projects, four tool types, vector stores, conversations, memory, compaction and NL2SQL. Test your tool and API choices now.
Keep going
- Training Training Built on your Weak areas
- Practice test Questions by domain, with explanations
- Mock exam Full length, timed like the real exam
- Readiness test Find your weakest domain in minutes
- Cheat sheet Key terms and formulas on one page
- Ask the 1Z0-1158-26 AI tutor Get any concept explained your way