{"id":82406,"date":"2026-06-22T23:02:12","date_gmt":"2026-06-22T23:02:12","guid":{"rendered":"https:\/\/www.europesays.com\/ai\/82406\/"},"modified":"2026-06-22T23:02:12","modified_gmt":"2026-06-22T23:02:12","slug":"deploy-langgraph-agents-on-oci-enterprise-ai","status":"publish","type":"post","link":"https:\/\/www.europesays.com\/ai\/82406\/","title":{"rendered":"Deploy LangGraph agents on OCI Enterprise AI"},"content":{"rendered":"<p>Agentic workflows become enterprise systems when they begin serving real workflows. A LangGraph proof of concept can validate state transitions, model calls, and routing logic quickly, but production deployment adds a different contract: an HTTP endpoint, runtime identity, environment-specific configuration, versioned releases, and scaling controls. OCI Generative AI hosted applications provide that managed runtime layer, allowing platform teams to deploy the agent as a containerized service while application teams keep the graph logic focused and portable.<\/p>\n<p>OCI Generative AI, Oracle Cloud Infrastructure\u2019s Enterprise AI platform, provides a managed path for building, deploying, and governing AI applications at scale. For agentic applications, two OCI building blocks matter here: projects and hosted applications with deployments. Projects organize agent-related artifacts and settings. Applications define how a hosted agent workload runs and how clients reach it. Deployments release a specific container image into that application runtime. See the\u00a0<a href=\"https:\/\/docs.oracle.com\/en-us\/iaas\/Content\/generative-ai\/overview.htm\" rel=\"nofollow noopener\" target=\"_blank\">OCI Generative AI overview<\/a>,\u00a0<a href=\"https:\/\/docs.oracle.com\/en-us\/iaas\/Content\/generative-ai\/projects.htm\" rel=\"nofollow noopener\" target=\"_blank\">projects<\/a>, and\u00a0<a href=\"https:\/\/docs.oracle.com\/en-us\/iaas\/Content\/generative-ai\/applications-deployments.htm\" rel=\"nofollow noopener\" target=\"_blank\">hosted applications and deployments<\/a>\u00a0documentation.<\/p>\n<p><img fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"590\" src=\"https:\/\/www.europesays.com\/ai\/wp-content\/uploads\/2026\/06\/architecture-slide-official-service-names-1024x590.png\" alt=\"\" class=\"wp-image-3935\"  \/>Figure 1: Package the LangGraph agent as a FastAPI container, then deploy it as an OCI Generative AI hosted application.<\/p>\n<p>From prototype to managed service<\/p>\n<p>LangGraph is useful because it makes agent workflow explicit: nodes hold work, edges hold flow, and state moves through the graph. That is valuable for support triage, document processing, human-review routing, tool orchestration, or any workflow where the model is only one step in a larger process.<\/p>\n<p>But enterprise teams need more than graph logic. They need a managed HTTP endpoint, identity controls, scaling settings, environment variables, versioned releases, and a clear way to connect to other OCI resources. OCI Generative AI hosted applications give that operational layer while letting teams keep their agent code in a standard container. The result is a cleaner ownership split: developers own the Python graph and API contract; OCI manages the hosted runtime concerns.<\/p>\n<p>How OCI organizes the hosted agent<\/p>\n<p>OCI Generative AI turns that operational wrapper into three concrete resources: a project, an application, and a deployment.<\/p>\n<p>The project comes first. It organizes agent-specific artifacts such as responses, conversations, files, and containers. At runtime, the app uses the project OCID to send OCI OpenAI-compatible API calls in the right project context. Projects also help isolate artifacts for lifecycle and compliance boundaries.<\/p>\n<p>The application defines the managed runtime for the workload, including scaling, managed storage, networking, authentication, and runtime environment variables. This is where platform teams make deployment-time decisions such as public or private endpoint access, replica limits, and which environment variables the container receives.<\/p>\n<p>The deployment is the versioned release of that application, based on a container image and tag. Within a hosted application, one active deployment serves the application endpoint at a time. This is the part that lets teams roll forward to a new image without changing the application identity that clients call.<\/p>\n<p>Turn LangGraph into a hosted service<\/p>\n<p>The key engineering step is to give the graph a small HTTP contract. In this implementation, FastAPI provides that wrapper. The application code in\u00a0<a href=\"https:\/\/blogs.oracle.com\/code\/oci-langgraph-hosted-agent\/src\/sample_langgraph_fastapi_agent.py\" rel=\"nofollow noopener\" target=\"_blank\">code\/oci-langgraph-hosted-agent\/src\/sample_langgraph_fastapi_agent.py<\/a>\u00a0uses:<\/p>\n<p>GET \/health\u00a0for a basic liveness response<\/p>\n<p>GET \/ready\u00a0to confirm required runtime configuration is present<\/p>\n<p>POST \/invoke\u00a0to run the LangGraph workflow<\/p>\n<p>The app listens on\u00a00.0.0.0:8080, which gives the hosted runtime a predictable container port for HTTP traffic. The graph has three nodes: classify a support ticket, route the state, then either draft a customer reply or create an urgent handoff. The model node calls the OCI Responses API through OCI\u2019s OpenAI-compatible endpoint using IAM-based authentication:<\/p>\n<p>import httpx<br \/>\nfrom openai import OpenAI<br \/>\nfrom oci_openai import OciResourcePrincipalAuth<\/p>\n<p>client = OpenAI(<br \/>\n    base_url=f&#8221;https:\/\/inference.generativeai.{region}.oci.oraclecloud.com\/openai\/v1&#8243;,<br \/>\n    api_key=&#8221;not-used&#8221;,<br \/>\n    project=os.environ[&#8220;OCI_GENAI_PROJECT_OCID&#8221;],<br \/>\n    http_client=httpx.Client(auth=OciResourcePrincipalAuth(), timeout=30.0),<br \/>\n)<\/p>\n<p>response = client.responses.create(<br \/>\n    model=model,<br \/>\n    store=False,<br \/>\n    input=prompt,<br \/>\n)<br \/>\nreturn response.output_text.strip()<\/p>\n<p>The\u00a0api_key=&#8221;not-used&#8221;\u00a0value is only a placeholder required by the OpenAI client constructor. The request is signed by the\u00a0http_client\u00a0through\u00a0OciResourcePrincipalAuth, so the container does not carry a long-lived model credential.<\/p>\n<p>OCI Responses API is the primary OpenAI-compatible API for interacting with supported models and agentic workflows. It supports structured outputs, supported tools, and project-scoped calls through the\u00a0\/responses\u00a0endpoint. The OpenAI-compatible base URL is\u00a0https:\/\/inference.generativeai.${region}.oci.oraclecloud.com\/openai\/v1. See the\u00a0<a href=\"https:\/\/docs.oracle.com\/en-us\/iaas\/Content\/generative-ai\/responses-api.htm\" rel=\"nofollow noopener\" target=\"_blank\">OCI Responses API<\/a>\u00a0and\u00a0<a href=\"https:\/\/docs.oracle.com\/en-us\/iaas\/Content\/generative-ai\/openai-compatible-api.htm\" rel=\"nofollow noopener\" target=\"_blank\">OCI OpenAI-compatible endpoints<\/a>\u00a0documentation.<\/p>\n<p>For local development, the application can run with\u00a0stub\u00a0mode for offline testing or\u00a0session\u00a0mode, where\u00a0OciSessionAuth\u00a0signs OCI requests through an OCI CLI profile. In the hosted deployment, set\u00a0OCI_GENAI_AUTH_MODE=resource_principal\u00a0so\u00a0OciResourcePrincipalAuth\u00a0signs requests with the resource principal provided by OCI. The deployment flow includes the dynamic group and policies for that runtime identity. See\u00a0<a href=\"https:\/\/docs.oracle.com\/en-us\/iaas\/Content\/generative-ai\/oci-genai-auth.htm\" rel=\"nofollow noopener\" target=\"_blank\">Generative AI IAM-based authentication<\/a>.<\/p>\n<p>Deployment flow<\/p>\n<p>The operational flow is:<\/p>\n<p>1. Create or reuse an OCI Generative AI project.<\/p>\n<p>2. Build the FastAPI + LangGraph application in\u00a0code\/oci-langgraph-hosted-agent\u00a0into a Linux container image.<\/p>\n<p>3. Push the image to OCIR.<\/p>\n<p>4. Configure IAM for deployment automation and for the hosted runtime identity.<\/p>\n<p>5. Create an OCI Generative AI hosted application with scaling, networking, authentication, storage, and environment variables.<\/p>\n<p>6. Create a hosted deployment that points to the container image and tag.<\/p>\n<p>7. Invoke\u00a0\/health,\u00a0\/ready, and then the agent endpoint.<\/p>\n<p>The OCI CLI exposes this flow directly. The following shell variables keep environment-specific values reusable across commands:<\/p>\n<p>&gt; export OCI_COMPARTMENT_OCID=&#8221;ocid1.compartment.oc1..exampleuniqueID&#8221;<br \/>\n&gt; export OCI_REGION=&#8221;us-ashburn-1&#8243;<br \/>\n&gt; export OCI_REGION_KEY=&#8221;iad&#8221;<br \/>\n&gt; export OCI_TENANCY_NAMESPACE=&#8221;exampletenancy&#8221;<br \/>\n&gt; export OCI_GENAI_MODEL=&#8221;google.gemini-2.5-pro&#8221;<br \/>\n&gt; export ENTERPRISE_AI_PROJECT_NAME=&#8221;langgraph-agent-project&#8221;<br \/>\n&gt; export ENTERPRISE_AI_HOSTED_APPLICATION_NAME=&#8221;langgraph-agent-app&#8221;<br \/>\n&gt; export ENTERPRISE_AI_HOSTED_DEPLOYMENT_NAME=&#8221;langgraph-agent-v1&#8243;<br \/>\n&gt; export ENTERPRISE_AI_HOSTED_IDENTITY_DOMAIN_URL=&#8221;https:\/\/idcs-.identity.oraclecloud.com:443&#8243;<br \/>\n&gt; export ENTERPRISE_AI_HOSTED_IDENTITY_DOMAIN_AUDIENCE=&#8221;https:\/\/langgraph-agent-app&#8221;<br \/>\n&gt; export ENTERPRISE_AI_HOSTED_IDENTITY_DOMAIN_SCOPE=&#8221;invoke&#8221;<br \/>\n&gt; export ENTERPRISE_AI_OCIR_REPOSITORY_NAME=&#8221;oci-langgraph-hosted-agent&#8221;<br \/>\n&gt; export ENTERPRISE_AI_DOCKER_IMAGE_URI=&#8221;${OCI_REGION_KEY}.ocir.io\/${OCI_TENANCY_NAMESPACE}\/${ENTERPRISE_AI_OCIR_REPOSITORY_NAME}&#8221;<br \/>\n&gt; export ENTERPRISE_AI_DOCKER_IMAGE_TAG=&#8221;0.1.0&#8243;<br \/>\n&gt; export ENTERPRISE_AI_DOCKER_BUILD_PLATFORM=&#8221;linux\/amd64&#8243;<\/p>\n<p>This article uses\u00a0google.gemini-2.5-pro\u00a0as the example model ID. For other environments, confirm the target model and region in the current OCI documentation for\u00a0<a href=\"https:\/\/docs.oracle.com\/en-us\/iaas\/Content\/generative-ai\/pretrained-models.htm\" rel=\"nofollow noopener\" target=\"_blank\">offered pretrained foundational models<\/a>\u00a0and\u00a0<a href=\"https:\/\/docs.oracle.com\/en-us\/iaas\/Content\/generative-ai\/model-endpoint-regions.htm\" rel=\"nofollow noopener\" target=\"_blank\">Generative AI models by region<\/a>.<\/p>\n<p>Create the project:<\/p>\n<p>&gt; export ENTERPRISE_AI_PROJECT_OCID=&#8221;$(oci generative-ai generative-ai-project create \\<br \/>\n  &#8211;compartment-id &#8220;$OCI_COMPARTMENT_OCID&#8221; \\<br \/>\n  &#8211;display-name &#8220;$ENTERPRISE_AI_PROJECT_NAME&#8221; \\<br \/>\n  &#8211;region &#8220;$OCI_REGION&#8221; \\<br \/>\n  &#8211;query &#8216;data.id&#8217; \\<br \/>\n  &#8211;raw-output)&#8221;<\/p>\n<p>The create command stores the project OCID in\u00a0ENTERPRISE_AI_PROJECT_OCID. Print the value and fetch the resource to confirm its lifecycle state:<\/p>\n<p>&gt; printf &#8216;Project OCID: %s\\n&#8217; &#8220;$ENTERPRISE_AI_PROJECT_OCID&#8221;<br \/>\n&gt; oci generative-ai generative-ai-project get \\<br \/>\n&gt;  &#8211;generative-ai-project-id &#8220;$ENTERPRISE_AI_PROJECT_OCID&#8221; \\<br \/>\n&gt;  &#8211;region &#8220;$OCI_REGION&#8221; \\<br \/>\n&gt;  &#8211;query &#8216;data.{id:id,displayName:&#8221;display-name&#8221;,lifecycleState:&#8221;lifecycle-state&#8221;}&#8217;<\/p>\n<p>To verify the project in the OCI Console, open the navigation menu, select Analytics &amp; AI, then Generative AI, and open Projects. Select the target compartment to view the project and its lifecycle state.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"411\" src=\"https:\/\/www.europesays.com\/ai\/wp-content\/uploads\/2026\/06\/oci-generative-ai-project-created-redacted-1024x411.png\" alt=\"\" class=\"wp-image-3936\"  \/>Figure 2: The project appears in the OCI Generative AI Projects list after creation.<\/p>\n<p>The example application is available in the\u00a0<a href=\"https:\/\/github.com\/srikanth311\/oci-langgraph-hosted-agent\" rel=\"nofollow noopener\" target=\"_blank\">oci-langgraph-hosted-agent GitHub repository<\/a>. Clone the repo, then build the application image from the repo folder:<\/p>\n<p>The build command requires Docker to be installed and running on the local machine. On macOS or Windows, start Docker Desktop before running the command. Build the image for the Linux platform expected by the hosted runtime:<\/p>\n<p>&gt; git clone https:\/\/github.com\/srikanth311\/oci-langgraph-hosted-agent.git<br \/>\n&gt; cd oci-langgraph-hosted-agent<br \/>\n&gt; docker build &#8211;platform &#8220;$ENTERPRISE_AI_DOCKER_BUILD_PLATFORM&#8221; \\<br \/>\n&gt;   -t oci-langgraph-hosted-agent:latest .<\/p>\n<p>The relevant FastAPI routes are small.\u00a0\/ready\u00a0checks runtime configuration before traffic reaches the agent, and\u00a0\/invoke\u00a0passes request state into the compiled LangGraph graph:<\/p>\n<p>@app.get(&#8220;\/health&#8221;)<br \/>\ndef health() -&gt; dict[str, str]:<br \/>\n    return {&#8220;status&#8221;: &#8220;ok&#8221;}<\/p>\n<p>@app.get(&#8220;\/ready&#8221;)<br \/>\ndef ready():<br \/>\n    missing = _missing_ready_values()<br \/>\n    if missing:<br \/>\n        return JSONResponse(<br \/>\n            status_code=503,<br \/>\n            content={&#8220;status&#8221;: &#8220;not_ready&#8221;, &#8220;missing&#8221;: missing},<br \/>\n        )<br \/>\n    return {&#8220;status&#8221;: &#8220;ready&#8221;, &#8220;auth_mode&#8221;: _auth_mode()}<\/p>\n<p>@app.post(&#8220;\/invoke&#8221;, response_model=InvokeResponse)<br \/>\ndef invoke(payload: InvokeRequest) -&gt; InvokeResponse:<br \/>\n    run_id = str(uuid4())<br \/>\n    final_state = agent_graph.invoke(<br \/>\n        {<br \/>\n            &#8220;run_id&#8221;: run_id,<br \/>\n            &#8220;customer_id&#8221;: payload.customer_id,<br \/>\n            &#8220;ticket&#8221;: payload.ticket,<br \/>\n            &#8220;trace&#8221;: [],<br \/>\n        }<br \/>\n    )<br \/>\n    return InvokeResponse(<br \/>\n        run_id=run_id,<br \/>\n        category=final_state[&#8220;category&#8221;],<br \/>\n        severity=final_state[&#8220;severity&#8221;],<br \/>\n        routed_to=final_state[&#8220;routed_to&#8221;],<br \/>\n        response=final_state[&#8220;response&#8221;],<br \/>\n        trace=final_state[&#8220;trace&#8221;],<br \/>\n    )<\/p>\n<p>Existing LangGraph applications can use the same hosted-service contract: expose\u00a0GET \/health,\u00a0GET \/ready, and\u00a0POST \/invoke, read runtime settings from environment variables, and make the container listen on\u00a00.0.0.0:8080.<\/p>\n<p>Tag and push the image to OCIR:<\/p>\n<p>&gt; docker tag oci-langgraph-hosted-agent:latest \\<br \/>\n&gt;  &#8220;$ENTERPRISE_AI_DOCKER_IMAGE_URI:$ENTERPRISE_AI_DOCKER_IMAGE_TAG&#8221;<br \/>\n&gt; docker push     &#8220;$ENTERPRISE_AI_DOCKER_IMAGE_URI:$ENTERPRISE_AI_DOCKER_IMAGE_TAG&#8221;<\/p>\n<p>Confirm that the exact repository name and tag are visible in OCIR before creating the hosted deployment. An empty result here means the deployment will not be able to pull the image:<\/p>\n<p>&gt; oci artifacts container image list \\<br \/>\n&gt;  &#8211;compartment-id &#8220;$OCI_COMPARTMENT_OCID&#8221; \\<br \/>\n&gt;  &#8211;repository-name &#8220;$ENTERPRISE_AI_OCIR_REPOSITORY_NAME&#8221; \\<br \/>\n&gt;  &#8211;image-version &#8220;$ENTERPRISE_AI_DOCKER_IMAGE_TAG&#8221; \\<br \/>\n&gt;  &#8211;region &#8220;$OCI_REGION&#8221; \\<br \/>\n&gt;  &#8211;query &#8216;data.items[].{displayName:&#8221;display-name&#8221;,version:version,digest:digest,lifecycleState:&#8221;lifecycle-state&#8221;}&#8217;<\/p>\n<p>To verify the pushed image in the OCI Console, open Developer Services, then Containers &amp; Artifacts, then Container Registry. Select the same region and compartment, open the repository named in\u00a0ENTERPRISE_AI_DOCKER_IMAGE_URI, and inspect the image tag. The repository list shows aggregate repository details; the image tag and digest are visible inside the repository. See\u00a0<a href=\"https:\/\/docs.oracle.com\/en-us\/iaas\/Content\/Registry\/Tasks\/registryviewingimagedetails.htm\" rel=\"nofollow noopener\" target=\"_blank\">Viewing image details<\/a>.<\/p>\n<p>IAM and runtime access<\/p>\n<p>Before creating the hosted application and deployment, configure IAM for two paths: the deployment automation that creates OCI Generative AI resources, and the hosted runtime that pulls the image and calls OCI services after the container is running. OCI IAM does not require a role embedded in the container. Instead, use policies for the deployment group and a dynamic group for hosted applications and deployments so the running workload can act as a resource principal.<\/p>\n<p>The IAM commands use sample values for the tenancy OCID, group name, dynamic group name, policy name, and compartment names. Replace them with tenancy-specific values before running the commands:<\/p>\n<p>OCI_TENANCY_OCID: Use the tenancy OCID from the Console Tenancy Details page. OCI documents where to find it in\u00a0<a href=\"https:\/\/docs.oracle.com\/en-us\/iaas\/Content\/General\/Concepts\/identifiers.htm\" rel=\"nofollow noopener\" target=\"_blank\">Resource Identifiers<\/a>.<\/p>\n<p>PLATFORM_ENGINEERS_GROUP_NAME: Use the IAM group that should create and manage the OCI Generative AI project, hosted application, and hosted deployment. Create or review groups with\u00a0<a href=\"https:\/\/docs.oracle.com\/en-us\/iaas\/Content\/Identity\/Tasks\/managinggroups.htm\" rel=\"nofollow noopener\" target=\"_blank\">Managing Groups<\/a>.<\/p>\n<p>PLATFORM_ENGINEERS_POLICY_NAME\u00a0and\u00a0HOSTED_AGENT_POLICY_NAME: Use policy names approved by the tenancy IAM naming standard. Policies are created and updated with\u00a0<a href=\"https:\/\/docs.oracle.com\/en-us\/iaas\/Content\/Identity\/Tasks\/managingpolicies.htm\" rel=\"nofollow noopener\" target=\"_blank\">Managing Policies<\/a>.<\/p>\n<p>HOSTED_AGENT_DYNAMIC_GROUP_NAME: Use an approved runtime dynamic group when one already covers OCI Generative AI hosted applications and deployments. Otherwise, create the dynamic group shown below. Dynamic groups and matching rules are described in\u00a0<a href=\"https:\/\/docs.oracle.com\/en-us\/iaas\/Content\/Identity\/Tasks\/managingdynamicgroups.htm\" rel=\"nofollow noopener\" target=\"_blank\">Managing Dynamic Groups<\/a>.<\/p>\n<p>APP_COMPARTMENT_NAME,\u00a0IMAGE_COMPARTMENT_NAME, and\u00a0DATA_COMPARTMENT_NAME: Use the compartments that contain the hosted application resources, the OCIR repository, and any data resources the agent reads. Policy statements can use compartment names, or\u00a0id \u00a0when automation should avoid name ambiguity. See\u00a0<a href=\"https:\/\/docs.oracle.com\/en-us\/iaas\/Content\/Identity\/Tasks\/managingcompartments.htm\" rel=\"nofollow noopener\" target=\"_blank\">Managing Compartments<\/a>.<\/p>\n<p>&gt; export OCI_TENANCY_OCID=&#8221;ocid1.tenancy.oc1..exampleuniqueID&#8221;<br \/>\n&gt; export PLATFORM_ENGINEERS_GROUP_NAME=&#8221;ai-platform-engineers&#8221;<br \/>\n&gt; export PLATFORM_ENGINEERS_POLICY_NAME=&#8221;ai-platform-engineers-genai-policy&#8221;<br \/>\n&gt; export HOSTED_AGENT_DYNAMIC_GROUP_NAME=&#8221;hosted-agent-runtime-dg&#8221;<br \/>\n&gt; export HOSTED_AGENT_POLICY_NAME=&#8221;hosted-agent-runtime-policy&#8221;<br \/>\n&gt; export APP_COMPARTMENT_NAME=&#8221;AIApplications&#8221;<br \/>\n&gt; export IMAGE_COMPARTMENT_NAME=&#8221;ContainerImages&#8221;<br \/>\n&gt; export DATA_COMPARTMENT_NAME=&#8221;AgentData&#8221;<\/p>\n<p>For deployment automation that creates projects, applications, and deployments, grant the required Generative AI permissions in the target compartment. A broad sandbox policy can use\u00a0manage generative-ai-family; production policies should usually narrow access to the specific resource types and operations:<\/p>\n<p>&gt; allow group ai-platform-engineers to manage generative-ai-project in compartment AIApplications<br \/>\n&gt; allow group ai-platform-engineers to manage generative-ai-hosted-application in compartment AIApplications<br \/>\n&gt; allow group ai-platform-engineers to manage generative-ai-hosted-deployment in compartment AIApplications<\/p>\n<p>Create that policy in the tenancy:<\/p>\n<p>&gt; oci iam policy create \\<br \/>\n&gt;   &#8211;compartment-id &#8220;$OCI_TENANCY_OCID&#8221; \\<br \/>\n&gt;   &#8211;name &#8220;$PLATFORM_ENGINEERS_POLICY_NAME&#8221; \\<br \/>\n&gt;   &#8211;description &#8220;Allow platform engineers to manage OCI Generative AI hosted agent resources&#8221; \\<br \/>\n&gt;   &#8211;statements &#8220;[<br \/>\n&gt;     \\&#8221;allow group ${PLATFORM_ENGINEERS_GROUP_NAME} to manage generative-ai-project in compartment ${APP_COMPARTMENT_NAME}\\&#8221;,<br \/>\n&gt;     \\&#8221;allow group ${PLATFORM_ENGINEERS_GROUP_NAME} to manage generative-ai-hosted-application in compartment ${APP_COMPARTMENT_NAME}\\&#8221;,<br \/>\n&gt;     \\&#8221;allow group ${PLATFORM_ENGINEERS_GROUP_NAME} to manage generative-ai-hosted-deployment in compartment ${APP_COMPARTMENT_NAME}\\&#8221;<br \/>\n&gt;   ]&#8221;<\/p>\n<p>For the running hosted agent, use a dynamic group that includes OCI Generative AI hosted applications and deployments. Dynamic groups let OCI resources act as principal actors, and matching rules determine group membership. OCI documents a tenancy maximum of 50 dynamic groups, so governed tenancies often reuse approved runtime dynamic groups instead of creating a new group for every test. See\u00a0<a href=\"https:\/\/docs.oracle.com\/en-us\/iaas\/Content\/Identity\/Tasks\/managingdynamicgroups.htm\" rel=\"nofollow noopener\" target=\"_blank\">Managing Dynamic Groups<\/a>.<\/p>\n<p>any {resource.type=&#8221;generativeaihostedapplication&#8221;,<br \/>\n     resource.type=&#8221;generativeaihosteddeployment&#8221;}<\/p>\n<p>List existing dynamic groups before creating another tenancy-level identity object:<\/p>\n<p>oci iam dynamic-group list \\<br \/>\n  &#8211;compartment-id &#8220;$OCI_TENANCY_OCID&#8221; \\<br \/>\n  &#8211;all \\<br \/>\n  &#8211;query &#8220;data[].{name:name,id:id,state:\\&#8221;lifecycle-state\\&#8221;}&#8221; \\<br \/>\n  &#8211;output table<\/p>\n<p>Inspect the matching rule for a candidate group:<\/p>\n<p>&gt; oci iam dynamic-group get \\<br \/>\n&gt;   &#8211;dynamic-group-id &#8220;&#8221; \\<br \/>\n&gt;   &#8211;query &#8220;data.{name:name,rule:\\&#8221;matching-rule\\&#8221;,state:\\&#8221;lifecycle-state\\&#8221;}&#8221; \\<br \/>\n&gt;   &#8211;output table<\/p>\n<p>If a dedicated runtime dynamic group already includes hosted applications and deployments, set\u00a0HOSTED_AGENT_DYNAMIC_GROUP_NAME\u00a0to that group name and continue with the policy statement. Create a new dynamic group only when no approved reusable group exists:<\/p>\n<p>&gt; oci iam dynamic-group create \\<br \/>\n&gt;   &#8211;compartment-id &#8220;$OCI_TENANCY_OCID&#8221; \\<br \/>\n&gt;   &#8211;name &#8220;$HOSTED_AGENT_DYNAMIC_GROUP_NAME&#8221; \\<br \/>\n&gt;   &#8211;description &#8220;OCI Generative AI hosted agent runtime identities&#8221; \\<br \/>\n&gt;   &#8211;matching-rule &#8220;any {resource.type=&#8221;generativeaihostedapplication&#8221;, resource.type=&#8221;generativeaihosteddeployment&#8221;}&#8221;<\/p>\n<p>If creation returns\u00a0You have reached the object limit of DynamicResourceGroups, the tenancy has reached its dynamic-group quota. Reuse an approved existing dynamic group, or have an IAM administrator retire unused groups or request the needed limit change before retrying.<\/p>\n<p>Then grant that dynamic group only the access the container needs. At minimum, deployments need image access through OCIR and access to vulnerability scan results so OCI can validate the image before deployment. If the agent calls OCI Generative AI with\u00a0OciResourcePrincipalAuth, grant access to the Generative AI resources used for inference. If the agent reads Object Storage, add Object Storage read access:<\/p>\n<p>&gt; allow dynamic-group hosted-agent-runtime-dg to read repos in compartment ContainerImages<br \/>\n&gt; allow dynamic-group hosted-agent-runtime-dg to read container-scan-results in compartment ContainerImages<br \/>\n&gt; allow dynamic-group hosted-agent-runtime-dg to use generative-ai-family in compartment AIApplications<br \/>\n&gt; allow dynamic-group hosted-agent-runtime-dg to read object-family in compartment AgentData<\/p>\n<p>Create the policy with the same statements only when the selected policy name does not already exist:<\/p>\n<p>&gt; oci iam policy create \\<br \/>\n&gt;   &#8211;compartment-id &#8220;$OCI_TENANCY_OCID&#8221; \\<br \/>\n&gt;   &#8211;name &#8220;$HOSTED_AGENT_POLICY_NAME&#8221; \\<br \/>\n&gt;   &#8211;description &#8220;Allow hosted agent deployments to pull images and call OCI services&#8221; \\<br \/>\n&gt;   &#8211;statements &#8220;[<br \/>\n&gt;     \\&#8221;allow dynamic-group ${HOSTED_AGENT_DYNAMIC_GROUP_NAME} to read repos in compartment ${IMAGE_COMPARTMENT_NAME}\\&#8221;,<br \/>\n&gt;     \\&#8221;allow dynamic-group ${HOSTED_AGENT_DYNAMIC_GROUP_NAME} to read container-scan-results in compartment ${IMAGE_COMPARTMENT_NAME}\\&#8221;,<br \/>\n&gt;     \\&#8221;allow dynamic-group ${HOSTED_AGENT_DYNAMIC_GROUP_NAME} to use generative-ai-family in compartment ${APP_COMPARTMENT_NAME}\\&#8221;,<br \/>\n&gt;     \\&#8221;allow dynamic-group ${HOSTED_AGENT_DYNAMIC_GROUP_NAME} to read object-family in compartment ${DATA_COMPARTMENT_NAME}\\&#8221;<br \/>\n&gt;   ]&#8221;<\/p>\n<p>If the policy already exists, inspect its statements and add only the missing permissions through the standard IAM change process instead of creating a duplicate policy:<\/p>\n<p>&gt; oci iam policy list \\<br \/>\n&gt;   &#8211;compartment-id &#8220;$OCI_TENANCY_OCID&#8221; \\<br \/>\n&gt;   &#8211;all \\<br \/>\n&gt;   &#8211;query &#8220;data[?name==&#8217;${HOSTED_AGENT_POLICY_NAME}&#8217;].{name:name,id:id,state:\\&#8221;lifecycle-state\\&#8221;}&#8221; \\<br \/>\n&gt;   &#8211;output table<\/p>\n<p>See\u00a0<a href=\"https:\/\/docs.oracle.com\/en-us\/iaas\/Content\/generative-ai\/deploy-permissions.htm\" rel=\"nofollow noopener\" target=\"_blank\">permissions for deploying applications<\/a>\u00a0and\u00a0<a href=\"https:\/\/docs.oracle.com\/en-us\/iaas\/Content\/generative-ai\/iam-policies.htm\" rel=\"nofollow noopener\" target=\"_blank\">IAM policies for OCI Generative AI<\/a>.<\/p>\n<p>For outbound access from the hosted agent to OCI services, authorize the deployed agent application with IAM policies as a resource principal. The platform injects a Resource Principal Session Token into the container runtime, avoiding long-lived credentials in the container. See\u00a0<a href=\"https:\/\/docs.oracle.com\/en-us\/iaas\/Content\/generative-ai\/aurthentication.htm\" rel=\"nofollow noopener\" target=\"_blank\">Authentication for hosted agents<\/a>.<\/p>\n<p>Create the hosted application and deployment<\/p>\n<p>The hosted application command accepts a compartment, display name, environment variables, scaling config, networking config, inbound auth config, and storage config. The\u00a0file:\/\/\u00a0values in the command point to local JSON payload files. Create those files in the same directory where the OCI CLI command runs.<\/p>\n<p>Inbound authentication uses an OCI Identity Domain confidential application configured for OAuth client credentials. In the Console, open Identity &amp; Security, then Domains, select the identity domain, open Integrated applications, and create or select a confidential application. Use its domain URL, primary audience, and scope in the\u00a0ENTERPRISE_AI_HOSTED_IDENTITY_DOMAIN_*\u00a0variables. See\u00a0<a href=\"https:\/\/docs.oracle.com\/en-us\/iaas\/Content\/Identity\/applications\/add-confidential-application.htm\" rel=\"nofollow noopener\" target=\"_blank\">Adding a confidential application<\/a>.<\/p>\n<p>One prerequisite in the inbound authentication setup is access to the identity-domain signing certificate\/JWKS endpoint. Enterprise AI uses this endpoint to validate OAuth bearer-token signatures before forwarding a request to the hosted container. If client access is disabled, the request can fail at the platform layer before the FastAPI app receives it. Enable this access up front and verify it with\u00a0curl\u00a0before creating or invoking the hosted application.<\/p>\n<p>In OCI Console, use this path:<\/p>\n<p>Open Identity &amp; Security, then Domains.<\/p>\n<p>Select the identity domain used for the hosted application\u2019s inbound authentication.<\/p>\n<p>Open Settings.<\/p>\n<p>Open Access signing certificate.<\/p>\n<p>Enable client access to the signing certificate\/JWKS endpoint.<\/p>\n<p>Save the change and allow it to propagate.<\/p>\n<p>Then verify that the endpoint returns HTTP 200:<\/p>\n<p>&gt; curl -k -I &#8220;${ENTERPRISE_AI_HOSTED_IDENTITY_DOMAIN_URL%:443}\/admin\/v1\/SigningCert\/jwk&#8221;<\/p>\n<p>The expected result is HTTP 200. If the endpoint returns HTTP 401, client access is still disabled or the URL points to a different identity domain than the one used by\u00a0inbound_auth.json.<\/p>\n<p>env.json\u00a0injects runtime settings into the container. For this sample, those settings tell the app which OCI region, project, model, and authentication mode to use:<\/p>\n<p>&gt; cat &gt; env.json &lt; [<br \/>\n&gt;   {&#8220;name&#8221;: &#8220;OCI_GENAI_REGION&#8221;, &#8220;type&#8221;: &#8220;PLAINTEXT&#8221;, &#8220;value&#8221;: &#8220;$OCI_REGION&#8221;},<br \/>\n&gt;   {&#8220;name&#8221;: &#8220;OCI_GENAI_PROJECT_OCID&#8221;, &#8220;type&#8221;: &#8220;PLAINTEXT&#8221;, &#8220;value&#8221;: &#8220;$ENTERPRISE_AI_PROJECT_OCID&#8221;},<br \/>\n&gt;   {&#8220;name&#8221;: &#8220;OCI_GENAI_MODEL&#8221;, &#8220;type&#8221;: &#8220;PLAINTEXT&#8221;, &#8220;value&#8221;: &#8220;$OCI_GENAI_MODEL&#8221;},<br \/>\n&gt;   {&#8220;name&#8221;: &#8220;OCI_GENAI_AUTH_MODE&#8221;, &#8220;type&#8221;: &#8220;PLAINTEXT&#8221;, &#8220;value&#8221;: &#8220;resource_principal&#8221;}<br \/>\n&gt; ]<br \/>\n&gt; EOF<\/p>\n<p>scaling.json\u00a0sets the initial replica limits and autoscaling metric for the hosted application:<\/p>\n<p>&gt; cat &gt; scaling.json &lt; {<br \/>\n&gt;   &#8220;minReplica&#8221;: 1,<br \/>\n&gt;   &#8220;maxReplica&#8221;: 2,<br \/>\n&gt;   &#8220;scalingType&#8221;: &#8220;CONCURRENCY&#8221;,<br \/>\n&gt;   &#8220;targetConcurrencyThreshold&#8221;: 4<br \/>\n&gt; }<br \/>\n&gt; EOF<\/p>\n<p>networking.json\u00a0selects a public inbound endpoint and OCI-managed outbound networking for the hosted application:<\/p>\n<p>&gt; cat &gt; networking.json &lt; {<br \/>\n&gt;   &#8220;inboundNetworkingConfig&#8221;: {<br \/>\n&gt;     &#8220;endpointMode&#8221;: &#8220;PUBLIC&#8221;<br \/>\n&gt;   },<br \/>\n&gt;    &#8220;outboundNetworkingConfig&#8221;: {<br \/>\n&gt;    &#8220;networkMode&#8221;: &#8220;MANAGED&#8221;<br \/>\n&gt;   }<br \/>\n&gt; }<br \/>\n&gt; EOF<\/p>\n<p>inbound_auth.json\u00a0binds the hosted application endpoint to the identity-domain OAuth settings used by client applications:<\/p>\n<p>cat &gt; inbound_auth.json &lt;<\/p>\n<p>&gt; export ENTERPRISE_AI_HOSTED_APPLICATION_OCID=&#8221;$(oci generative-ai hosted-application create \\<br \/>\n&gt;   &#8211;compartment-id &#8220;$OCI_COMPARTMENT_OCID&#8221; \\<br \/>\n&gt;   &#8211;display-name &#8220;$ENTERPRISE_AI_HOSTED_APPLICATION_NAME&#8221; \\<br \/>\n&gt;   &#8211;environment-variables file:\/\/env.json \\<br \/>\n&gt;   &#8211;scaling-config file:\/\/scaling.json \\<br \/>\n&gt;   &#8211;networking-config file:\/\/networking.json \\<br \/>\n&gt;   &#8211;inbound-auth-config file:\/\/inbound_auth.json \\<br \/>\n&gt;   &#8211;region &#8220;$OCI_REGION&#8221; \\<br \/>\n&gt;   &#8211;query &#8216;data.id&#8217; \\<br \/>\n&gt;  &#8211;raw-output)&#8221;<\/p>\n<p>The create command stores the hosted application OCID in\u00a0ENTERPRISE_AI_HOSTED_APPLICATION_OCID. Print the value and fetch the resource to confirm its lifecycle state:<\/p>\n<p>&gt; printf &#8216;Hosted application OCID: %s\\n&#8217; &#8220;$ENTERPRISE_AI_HOSTED_APPLICATION_OCID&#8221;<br \/>\n&gt; oci generative-ai hosted-application get \\<br \/>\n&gt;   &#8211;hosted-application-id &#8220;$ENTERPRISE_AI_HOSTED_APPLICATION_OCID&#8221; \\<br \/>\n&gt;   &#8211;region &#8220;$OCI_REGION&#8221; \\<br \/>\n&gt;   &#8211;query &#8216;data.{id:id,displayName:&#8221;display-name&#8221;,lifecycleState:&#8221;lifecycle-state&#8221;}&#8217;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"465\" src=\"https:\/\/www.europesays.com\/ai\/wp-content\/uploads\/2026\/06\/oci-hosted-application-active-deployment-1024x465.png\" alt=\"\" class=\"wp-image-3937\"  \/>Figure 3: The hosted application appears in OCI Generative AI Applications after creation.<\/p>\n<p>If the application already exists, query the hosted application collection by display name:<\/p>\n<p>&gt; export ENTERPRISE_AI_HOSTED_APPLICATION_OCID=&#8221;$(oci generative-ai hosted-application-collection list-hosted-applications \\<br \/>\n&gt;   &#8211;compartment-id &#8220;$OCI_COMPARTMENT_OCID&#8221; \\<br \/>\n&gt;   &#8211;display-name &#8220;$ENTERPRISE_AI_HOSTED_APPLICATION_NAME&#8221; \\<br \/>\n&gt;   &#8211;sort-by timeCreated \\<br \/>\n&gt;   &#8211;sort-order DESC \\<br \/>\n&gt;   &#8211;region &#8220;$OCI_REGION&#8221; \\<br \/>\n&gt;   &#8211;query &#8216;data.items[0].id&#8217; \\<br \/>\n&gt;   &#8211;raw-output)&#8221;<\/p>\n<p>Then create a hosted deployment with the application OCID and container image:<\/p>\n<p>&gt; export ENTERPRISE_AI_HOSTED_DEPLOYMENT_OCID=&#8221;$(oci generative-ai hosted-deployment create-hosted-deployment-single-docker-artifact \\<br \/>\n&gt;   &#8211;hosted-application-id &#8220;$ENTERPRISE_AI_HOSTED_APPLICATION_OCID&#8221; \\<br \/>\n&gt;   &#8211;compartment-id &#8220;$OCI_COMPARTMENT_OCID&#8221; \\<br \/>\n&gt;   &#8211;display-name &#8220;$ENTERPRISE_AI_HOSTED_DEPLOYMENT_NAME&#8221; \\<br \/>\n&gt;   &#8211;active-artifact-container-uri &#8220;$ENTERPRISE_AI_DOCKER_IMAGE_URI&#8221; \\<br \/>\n&gt;   &#8211;active-artifact-tag &#8220;$ENTERPRISE_AI_DOCKER_IMAGE_TAG&#8221; \\<br \/>\n&gt;   &#8211;region &#8220;$OCI_REGION&#8221; \\<br \/>\n&gt;   &#8211;query &#8216;data.id&#8217; \\<br \/>\n&gt;   &#8211;raw-output)&#8221;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"476\" src=\"https:\/\/www.europesays.com\/ai\/wp-content\/uploads\/2026\/06\/img5-1024x476.png\" alt=\"\" class=\"wp-image-3938\"  \/>Figure 4: The hosted application Deployment tab lists the container artifact after the deployment is created.<\/p>\n<p>The create response can show the deployment in\u00a0CREATING\u00a0while OCI prepares the artifact. Print the deployment OCID and check the lifecycle state:<\/p>\n<p>&gt; printf &#8216;Hosted deployment OCID: %s\\n&#8217; &#8220;$ENTERPRISE_AI_HOSTED_DEPLOYMENT_OCID&#8221;<br \/>\n&gt; oci generative-ai hosted-deployment get \\<br \/>\n&gt;   &#8211;hosted-deployment-id &#8220;$ENTERPRISE_AI_HOSTED_DEPLOYMENT_OCID&#8221; \\<br \/>\n&gt;   &#8211;region &#8220;$OCI_REGION&#8221; \\<br \/>\n&gt;   &#8211;query &#8216;data.{id:id,displayName:&#8221;display-name&#8221;,lifecycleState:&#8221;lifecycle-state&#8221;,artifactStatus:&#8221;active-artifact&#8221;.status,tag:&#8221;active-artifact&#8221;.tag}&#8217;<\/p>\n<p>If the deployment artifact shows\u00a0Failed\u00a0with an image-pull error, first verify that the pushed OCIR tag exists and that the hosted runtime dynamic group has\u00a0read repos\u00a0and\u00a0read container-scan-results\u00a0access in the image compartment. After correcting the image tag or IAM policy, push a new tag and add it as a new artifact on the same hosted deployment:<\/p>\n<p>&gt; export ENTERPRISE_AI_DOCKER_IMAGE_TAG=&#8221;$(date +%Y%m%d%H%M%S)&#8221;<br \/>\n&gt; docker build &#8211;platform &#8220;$ENTERPRISE_AI_DOCKER_BUILD_PLATFORM&#8221; \\<br \/>\n&gt;   -t oci-langgraph-hosted-agent:latest .<br \/>\n&gt; docker tag oci-langgraph-hosted-agent:latest \\<br \/>\n&gt;   &#8220;$ENTERPRISE_AI_DOCKER_IMAGE_URI:$ENTERPRISE_AI_DOCKER_IMAGE_TAG&#8221;<br \/>\n&gt; docker push &#8220;$ENTERPRISE_AI_DOCKER_IMAGE_URI:$ENTERPRISE_AI_DOCKER_IMAGE_TAG&#8221;<br \/>\n&gt; oci generative-ai hosted-deployment add-artifact-create-single-docker-artifact-details \\<br \/>\n&gt;   &#8211;hosted-deployment-id &#8220;$ENTERPRISE_AI_HOSTED_DEPLOYMENT_OCID&#8221; \\<br \/>\n&gt;   &#8211;artifact-container-uri &#8220;$ENTERPRISE_AI_DOCKER_IMAGE_URI&#8221; \\<br \/>\n&gt;   &#8211;artifact-tag &#8220;$ENTERPRISE_AI_DOCKER_IMAGE_TAG&#8221; \\<br \/>\n&gt;   &#8211;region &#8220;$OCI_REGION&#8221;<\/p>\n<p>For complete CLI parameter details, see the OCI CLI references for\u00a0<a href=\"https:\/\/docs.oracle.com\/en-us\/iaas\/tools\/oci-cli\/latest\/oci_cli_docs\/cmdref\/generative-ai\/hosted-application\/create.html\" rel=\"nofollow noopener\" target=\"_blank\">creating hosted applications<\/a>\u00a0and\u00a0<a href=\"https:\/\/docs.oracle.com\/en-us\/iaas\/tools\/oci-cli\/latest\/oci_cli_docs\/cmdref\/generative-ai\/hosted-deployment\/create-hosted-deployment-single-docker-artifact.html\" rel=\"nofollow noopener\" target=\"_blank\">creating single-Docker-artifact hosted deployments<\/a>.<\/p>\n<p>Validate the hosted agent<\/p>\n<p>After the deployment becomes active, run two checks before handing the endpoint to client applications. The first check confirms the container is reachable and the runtime configuration is complete.<\/p>\n<p>The OAuth flow has two separate responsibilities. During application setup,\u00a0inbound_auth.json\u00a0passes the identity domain URL plus the OAuth audience and scope for the hosted application. Oracle defines the audience as the service or API that the access token is intended for, and the token is accepted only when its audience claim matches the target resource server. Oracle defines scope as the permissions or actions the access token allows. During invocation, a client application requests an access token from that same identity domain by using the confidential application\u2019s client ID, client secret,\u00a0grant_type=client_credentials, and scope, then sends the returned token to the hosted application endpoint in the HTTP\u00a0Authorization: Bearer &#8230;\u00a0header. This inbound OAuth step is separate from outbound resource-principal authentication, which the container uses later when it calls OCI services.<\/p>\n<p>The following OAuth inputs are needed only by the client or deployment automation that invokes the hosted application. They are not container runtime settings and should not be baked into the image. In the OCI IAM identity domain used by the hosted application, open the integrated confidential application configured for the hosted application, confirm that OAuth client credentials are enabled, activate the application, and open OAuth configuration:<\/p>\n<p>ENTERPRISE_AI_HOSTED_OAUTH_CLIENT_ID: Copy the confidential application\u2019s client ID.<\/p>\n<p>ENTERPRISE_AI_HOSTED_OAUTH_CLIENT_SECRET: Copy the client secret and store it in deployment automation or a secret store, not in source control.<\/p>\n<p>ENTERPRISE_AI_HOSTED_OAUTH_TOKEN_SCOPE: Use the exact scope value accepted by the confidential application, typically the primary audience plus the configured scope name.<\/p>\n<p>ENTERPRISE_AI_HOSTED_TOKEN_URL: Append\u00a0\/oauth2\/v1\/token\u00a0to the identity domain URL associated with the hosted application.<\/p>\n<p>See\u00a0<a href=\"https:\/\/docs.oracle.com\/en-us\/iaas\/Content\/generative-ai\/app-authentication.htm\" rel=\"nofollow noopener\" target=\"_blank\">Setting up Authentication for Agentic Support<\/a>,\u00a0<a href=\"https:\/\/docs.oracle.com\/en-us\/iaas\/Content\/generative-ai\/create-application.htm#Authentication\" rel=\"nofollow noopener\" target=\"_blank\">Creating an Application<\/a>, and\u00a0<a href=\"https:\/\/docs.oracle.com\/en-us\/iaas\/Content\/generative-ai\/invoke-app.htm\" rel=\"nofollow noopener\" target=\"_blank\">Invoking Applications<\/a>.<\/p>\n<p>&gt; export ENTERPRISE_AI_HOSTED_INVOKE_BASE=&#8221;https:\/\/application.generativeai.${OCI_REGION}.oci.oraclecloud.com\/20251112\/hostedApplications\/${ENTERPRISE_AI_HOSTED_APPLICATION_OCID}\/actions\/invoke&#8221;<br \/>\n&gt; export ENTERPRISE_AI_HOSTED_OAUTH_CLIENT_ID=&#8221;&#8221;<br \/>\n&gt; export ENTERPRISE_AI_HOSTED_OAUTH_CLIENT_SECRET=&#8221;&#8221;<br \/>\n&gt; export ENTERPRISE_AI_HOSTED_OAUTH_TOKEN_SCOPE=&#8221;&#8221;<br \/>\n&gt; export ENTERPRISE_AI_HOSTED_TOKEN_URL=&#8221;${ENTERPRISE_AI_HOSTED_IDENTITY_DOMAIN_URL%:443}\/oauth2\/v1\/token&#8221;<br \/>\n&gt; export ENTERPRISE_AI_HOSTED_ACCESS_TOKEN=&#8221;$(<br \/>\n&gt;   curl -sS -X POST &#8220;$ENTERPRISE_AI_HOSTED_TOKEN_URL&#8221; \\<br \/>\n&gt;     -H &#8220;Content-Type: application\/x-www-form-urlencoded&#8221; \\<br \/>\n&gt;     &#8211;data-urlencode &#8220;client_id=${ENTERPRISE_AI_HOSTED_OAUTH_CLIENT_ID}&#8221; \\<br \/>\n&gt;     &#8211;data-urlencode &#8220;client_secret=${ENTERPRISE_AI_HOSTED_OAUTH_CLIENT_SECRET}&#8221; \\<br \/>\n&gt;     &#8211;data-urlencode &#8220;grant_type=client_credentials&#8221; \\<br \/>\n&gt;     &#8211;data-urlencode &#8220;scope=${ENTERPRISE_AI_HOSTED_OAUTH_TOKEN_SCOPE}&#8221; \\<br \/>\n  | python3 -c &#8216;import json,sys; print(json.load(sys.stdin)[&#8220;access_token&#8221;])&#8217;<br \/>\n)&#8221;<br \/>\n&gt; curl -fsS \\<br \/>\n&gt;   -H &#8220;Authorization: Bearer ${ENTERPRISE_AI_HOSTED_ACCESS_TOKEN}&#8221; \\<br \/>\n&gt;   &#8220;${ENTERPRISE_AI_HOSTED_INVOKE_BASE}\/health&#8221;<br \/>\n&gt; curl -fsS \\<br \/>\n&gt;   -H &#8220;Authorization: Bearer ${ENTERPRISE_AI_HOSTED_ACCESS_TOKEN}&#8221; \\<br \/>\n&gt;   &#8220;${ENTERPRISE_AI_HOSTED_INVOKE_BASE}\/ready&#8221;<\/p>\n<p>The second check sends a representative support ticket through the LangGraph workflow and verifies that the application route returns the expected response shape. The sample application in this post exposes\u00a0POST \/invoke. For an existing container image, keep\u00a0ENTERPRISE_AI_HOSTED_INVOKE_BASE\u00a0as the hosted application invoke base and set\u00a0ENTERPRISE_AI_HOSTED_APP_ROUTE\u00a0to the HTTP route exposed by that container. The\u00a0<a href=\"https:\/\/docs.oracle.com\/en-us\/iaas\/Content\/generative-ai\/invoke-app-http.htm\" rel=\"nofollow noopener\" target=\"_blank\">OCI HTTP invocation guide<\/a>\u00a0shows the same pattern by appending a container-defined route, such as\u00a0\/chat, to the hosted application URL.<\/p>\n<p>&gt; export ENTERPRISE_AI_HOSTED_APP_ROUTE=&#8221;\/invoke&#8221;<br \/>\n&gt; curl -fsS \\<br \/>\n&gt;   -X POST \\<br \/>\n&gt;   -H &#8220;Authorization: Bearer ${ENTERPRISE_AI_HOSTED_ACCESS_TOKEN}&#8221; \\<br \/>\n&gt;   -H &#8220;Content-Type: application\/json&#8221; \\<br \/>\n&gt;   -H &#8220;Accept: application\/json&#8221; \\<br \/>\n&gt;   &#8220;${ENTERPRISE_AI_HOSTED_INVOKE_BASE}${ENTERPRISE_AI_HOSTED_APP_ROUTE}&#8221; \\<br \/>\n&gt;   -d &#8216;{<br \/>\n&gt;     &#8220;ticket_id&#8221;: &#8220;TICKET-1001&#8221;,<br \/>\n&gt;     &#8220;customer_tier&#8221;: &#8220;enterprise&#8221;,<br \/>\n&gt;     &#8220;message&#8221;: &#8220;Production checkout is failing after the latest release.&#8221;<br \/>\n&gt;   }&#8217;<\/p>\n<p>Successful responses from\u00a0\/health\u00a0and\u00a0\/ready\u00a0validate the service contract. A successful response from the application route validates the deployed image, environment variables, resource-principal authentication, model access, and the LangGraph path used by the sample request.<\/p>\n<p>Conclusion<\/p>\n<p>With this pattern, a LangGraph proof of concept can become a managed, governed, versioned service while preserving the agent logic that developers already built. The HTTP wrapper gives the graph a service contract; FastAPI keeps that wrapper small in this implementation. OCI Generative AI projects give model and agent calls an organizational boundary. Hosted applications and deployments give platform teams a managed runtime for scaling, networking, authentication, environment variables, and release control.<\/p>\n<p>The FastAPI + LangGraph application under\u00a0code\/oci-langgraph-hosted-agent\u00a0gives teams a concrete starting point: configure OCI Responses API settings, build the container, and deploy it as a hosted application. From there, extend the graph one node at a time: add tools, add review routing, connect Object Storage or a system of record, and measure the workflow before making it more complex.<\/p>\n","protected":false},"excerpt":{"rendered":"Agentic workflows become enterprise systems when they begin serving real workflows. A LangGraph proof of concept can validate&hellip;\n","protected":false},"author":2,"featured_media":82407,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[405,11052,7537,11053,7342,7343,7344],"class_list":["post-82406","post","type-post","status-publish","format-standard","has-post-thumbnail","category-agentic-ai","tag-ai-agents","tag-ai-in-business","tag-artificial-intelligence-agents","tag-best-practices","tag-oracle-ai","tag-oracle-cloud-infrastructure-oci","tag-technical-solutions"],"_links":{"self":[{"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/posts\/82406","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/comments?post=82406"}],"version-history":[{"count":0,"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/posts\/82406\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/media\/82407"}],"wp:attachment":[{"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/media?parent=82406"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/categories?post=82406"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/tags?post=82406"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}