About Building Agents in OCI Generative AI

Learn how to use agents in OCI Generative AI, including how to build agents with the OCI Responses API.

Use the OCI Responses API to build agents in your application. The OCI Responses API is the OCI-native API for agentic workflows and supports orchestration, tools, and memory without requiring you to deploy the agent as a managed application.

You can build agents directly through the OCI Responses API by combining these capabilities:

Agent memory

You can use these resources with the OCI Responses API directly. This makes it possible to build sophisticated agents without deploying any infrastructure or managing a separate hosted runtime.

Agent Tools

  • File Search lets models retrieve relevant information from a Vector Store and generate accurate, relevant responses. By creating vector stores and adding files to them, you enable both semantic and keyword-based search across your data.
  • SQL Search (NL2SQL) enables the OCI Responses API to interact with federated enterprise data without moving or copying customer data. Natural language is translated into SQL queries, and a semantic enrichment layer maps business terms to underlying fields and joins.
  • Code Interpreter lets models write and run Python code in a sandboxed environment for complex tasks such as data analysis, coding, and mathematics. It includes more than 420 preinstalled Python libraries and runs with no external network access.
  • Local Function Calling lets the OCI Responses API invoke functions defined in your application. The API returns control to your application with a JSON payload describing which function to call and which parameters to use, and your application resumes execution after returning the function output.
  • Remote MCP Calling lets the OCI Responses API invoke tools hosted on a remote MCP server directly from the platform, removing the extra client-side round trip required by standard function calling.

Agent Memory

  • Short-term memory uses the Responses API and Conversations API to simplify conversation state management across multiple turns in a conversation.
  • Long-term memory provides durable memory across conversations through a unique subject_id within a project.
  • Short-term memory optimization condenses chat history into retained memory, helping reduce latency and token usage in long conversations.

Low-Level Agentic Building Blocks

  • Vector Stores API converts documents into searchable embeddings and stores them in a managed index so agents can retrieve the most relevant passages for a user's question.
  • Files API lets you securely upload and manage documents and other data that an agent can use during task execution.
  • Connector API lets you use data stored in Object Storage buckets with Vector Stores. The Vector Store Connector can continuously synchronize data from Object Storage into a Vector Store at scale.
  • Containers API provides secure, stateful sandboxes for isolated code execution and data processing.
  • Container Files API lets agents persist and manage data directly within container execution environments across multiple steps of a task.

Projects

A project is an OCI resource that organizes agent-specific artifacts created through the Generative AI service, including responses, conversations, files, and containers. Projects are isolated from each other, so artifacts in one project aren’t accessible from another project. A project is required to call the OCI Responses API for agent-related tasks.

A project setting can include:

  • Data retention for responses and conversations
  • Long-term memory settings
  • Conversation history compaction (short-term memory compaction) settings