Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
179 commits
Select commit Hold shift + click to select a range
92a4bb2
Merge branch 'fbpce'
fboufis Dec 5, 2024
8b58239
Merge branch 'main' of github.com:oracle-devrel/technology-engineering
fboufis Dec 11, 2024
c7dee09
Merge branch 'main' of github.com:oracle-devrel/technology-engineering
fboufis Oct 16, 2025
806e19b
2
Daniel-Jamil Oct 17, 2025
2dd5b50
Merge branch 'main' of github.com:oracle-devrel/technology-engineering
fboufis Oct 20, 2025
de402f7
Update OCVS-Disaster-Recovery-Solution-Definition-Template.md
YoannJOracle Oct 22, 2025
23b364d
Update README.md
YoannJOracle Oct 22, 2025
5f14f97
Bump pypdf in /ai/generative-ai-service/hr-goal-alignment/files
dependabot[bot] Oct 22, 2025
d4d1ed3
Update README.md
YoannJOracle Oct 23, 2025
6f36f1d
Update README.md
YoannJOracle Oct 23, 2025
86d481e
Update README.md
YoannJOracle Oct 23, 2025
333df0c
Update README.md
YoannJOracle Oct 23, 2025
decf28c
Update README.md
YoannJOracle Oct 23, 2025
43c6bd1
Update README.md
YoannJOracle Oct 23, 2025
4acfcf9
update to file name
aliottoman Oct 28, 2025
37931aa
Create README.md
esciunzi Oct 28, 2025
b75100f
Bump starlette in /ai/gen-ai-agents/custom-rag-agent
dependabot[bot] Oct 28, 2025
56194ba
Mastering Cloud Cost Control with OCI Log Analytics asset
esciunzi Oct 29, 2025
422d88f
New Asset
Daniel-Jamil Oct 29, 2025
36990b8
Date updates
Daniel-Jamil Oct 29, 2025
e9dcc9a
Merge branch 'main' into Daniel03
Daniel-Jamil Oct 29, 2025
f422d6e
Bump fastmcp in /ai/gen-ai-agents/mcp-oci-integration
dependabot[bot] Oct 29, 2025
4d2bc97
content review
AlexanderHodicke Oct 30, 2025
9da3003
newAssets
mdijkens-oracle Oct 31, 2025
a1438a0
Merge pull request #2224 from oracle-devrel/newAssets
MarcGueury Oct 31, 2025
8c3d654
added crewai integration, rel 1
luigisaetta Oct 31, 2025
c3c8092
Update README.md
YoannJOracle Oct 31, 2025
f4e48a6
Merge pull request #2226 from oracle-devrel/lsa_crewai01
anshoracle Oct 31, 2025
3fa4b06
Add .gitignore for complex-document-rag folder
brnil6 Nov 3, 2025
d40ffb5
Update PDF chunker and entity extraction
brnil6 Nov 3, 2025
0f2b173
Adopt upstream README as base and integrate local updates
brnil6 Nov 3, 2025
91ccb05
Add screenshot reference to README
brnil6 Nov 3, 2025
6fd99ae
Add image to README
brnil6 Nov 3, 2025
5e79380
Merge branch 'main' into dependabot/pip/ai/gen-ai-agents/mcp-oci-inte…
AlexanderHodicke Nov 4, 2025
439fbd5
Merge pull request #2223 from oracle-devrel/dependabot/pip/ai/gen-ai-…
AlexanderHodicke Nov 4, 2025
e2fb609
Merge branch 'main' into dependabot/pip/ai/gen-ai-agents/custom-rag-a…
AlexanderHodicke Nov 4, 2025
4a07bd3
Merge pull request #2219 from oracle-devrel/dependabot/pip/ai/gen-ai-…
AlexanderHodicke Nov 4, 2025
a7d8e28
Merge branch 'main' into dependabot/pip/ai/generative-ai-service/hr-g…
AlexanderHodicke Nov 4, 2025
c05ad44
Merge pull request #2199 from oracle-devrel/dependabot/pip/ai/generat…
AlexanderHodicke Nov 4, 2025
2fb9618
Bump fastmcp from 2.9.2 to 2.13.0 in /ai/gen-ai-agents/custom-rag-agent
dependabot[bot] Nov 4, 2025
c29a267
Merge branch 'main' into dependabot/pip/ai/gen-ai-agents/custom-rag-a…
AlexanderHodicke Nov 4, 2025
f187e01
Merge pull request #2228 from oracle-devrel/dependabot/pip/ai/gen-ai-…
AlexanderHodicke Nov 4, 2025
05640c5
Bump starlette
dependabot[bot] Nov 4, 2025
7df89c8
Merge branch 'main' into patch-7
AlexanderHodicke Nov 4, 2025
d57f6ae
Merge pull request #2197 from YoannJOracle/patch-7
AlexanderHodicke Nov 4, 2025
bc6959d
Merge branch 'main' into patch-8
AlexanderHodicke Nov 4, 2025
d82497b
Merge pull request #2198 from YoannJOracle/patch-8
AlexanderHodicke Nov 4, 2025
676a9aa
Merge branch 'main' into patch-9
AlexanderHodicke Nov 4, 2025
dec8809
Merge pull request #2202 from YoannJOracle/patch-9
AlexanderHodicke Nov 4, 2025
355d68f
Merge branch 'main' into patch-10
AlexanderHodicke Nov 4, 2025
2a106ad
Merge pull request #2203 from YoannJOracle/patch-10
AlexanderHodicke Nov 4, 2025
563dae0
Merge branch 'main' into patch-11
AlexanderHodicke Nov 4, 2025
d8e08e2
Merge pull request #2204 from YoannJOracle/patch-11
AlexanderHodicke Nov 4, 2025
cd0a55c
Merge branch 'main' into patch-12
AlexanderHodicke Nov 4, 2025
c97996e
Merge pull request #2205 from YoannJOracle/patch-12
AlexanderHodicke Nov 4, 2025
0a99667
Merge branch 'main' into patch-13
AlexanderHodicke Nov 4, 2025
ea04557
Merge pull request #2206 from YoannJOracle/patch-13
AlexanderHodicke Nov 4, 2025
bfb7925
Merge branch 'main' into patch-16
AlexanderHodicke Nov 4, 2025
4b9bd52
Merge pull request #2225 from YoannJOracle/patch-16
AlexanderHodicke Nov 4, 2025
aeda5dc
Merge branch 'main' into patch-14
AlexanderHodicke Nov 4, 2025
e7d1eda
Merge pull request #2207 from YoannJOracle/patch-14
AlexanderHodicke Nov 4, 2025
533eb37
Merge branch 'main' into dependabot/pip/cloud-infrastructure/compute-…
AlexanderHodicke Nov 4, 2025
202faad
Merge pull request #2229 from oracle-devrel/dependabot/pip/cloud-infr…
AlexanderHodicke Nov 4, 2025
a42bf7a
Merge branch 'main' into feat/complex-doc-rag-sync
aliottoman Nov 4, 2025
c595538
Merge pull request #2227 from oracle-devrel/feat/complex-doc-rag-sync
aliottoman Nov 4, 2025
7a6fb4c
Merge branch 'main' into update-name-issue
AlexanderHodicke Nov 4, 2025
bdfb2e1
Merge pull request #2216 from oracle-devrel/update-name-issue
AlexanderHodicke Nov 4, 2025
8d5b77a
Updated to latest cis benchmark script v3.1.0
lvbirgelen Nov 4, 2025
b17d39e
Updated to latest cis benchmark script v3.1.0
lvbirgelen Nov 4, 2025
9ff4de3
Merge branch 'main' into lvb-new--cis-script-version
lvbirgelen Nov 4, 2025
1ea3c73
Merge branch 'main' into esciunzi-patch-1
NicolaCimitile Nov 4, 2025
25674fb
Added details for new Videos (One from Developer Coaching and another…
Nov 4, 2025
65e1342
Merge pull request #2231 from oracle-devrel/amal
mihai-tudor-oracle Nov 4, 2025
c935249
Merge branch 'main' into lvb-new--cis-script-version
lvbirgelen Nov 4, 2025
1c8b3db
Enhance README with Oracle AI Vector Search details
uschwinn Nov 4, 2025
b6a29e2
Merge pull request #2230 from oracle-devrel/lvb-new--cis-script-version
AlexanderHodicke Nov 4, 2025
86c7158
Merge branch 'main' into uschwinn-patch-35
iosyed Nov 4, 2025
b5b0f82
Merge pull request #2232 from oracle-devrel/uschwinn-patch-35
iosyed Nov 4, 2025
e879af3
Update README.md
al3xne Nov 4, 2025
a1e0524
Bump starlette from 0.47.2 to 0.49.1 in /ai/gen-ai-agents/travel-agent
dependabot[bot] Nov 4, 2025
8b5fe82
Update README.md
NicolaCimitile Nov 5, 2025
d165fee
Merge pull request #2235 from oracle-devrel/NicolaCimitile-patch-1
AlexanderHodicke Nov 5, 2025
edc480f
Merge branch 'main' into esciunzi-patch-1
AlexanderHodicke Nov 5, 2025
7710d5f
Merge pull request #2220 from oracle-devrel/esciunzi-patch-1
AlexanderHodicke Nov 5, 2025
fc147d0
Update README.md
NicolaCimitile Nov 5, 2025
ea34e3f
Merge pull request #2236 from oracle-devrel/NicolaCimitile-patch-1
AlexanderHodicke Nov 5, 2025
d4fb256
Update README.md
NicolaCimitile Nov 5, 2025
d2c8fb8
Update README.md
NicolaCimitile Nov 5, 2025
cdddad5
Merge branch 'main' into NicolaCimitile-patch-2
AlexanderHodicke Nov 5, 2025
f80cbca
Merge pull request #2237 from oracle-devrel/NicolaCimitile-patch-2
AlexanderHodicke Nov 5, 2025
fc1f940
Merge branch 'main' into NicolaCimitile-patch-3
AlexanderHodicke Nov 5, 2025
100c464
Merge pull request #2238 from oracle-devrel/NicolaCimitile-patch-3
AlexanderHodicke Nov 5, 2025
7d12f76
Bump langgraph-checkpoint in /ai/gen-ai-agents/travel-agent
dependabot[bot] Nov 5, 2025
306c6c3
commit
oraclevaibhav Nov 7, 2025
2c75e0b
Merge branch 'main' into dependabot/pip/ai/gen-ai-agents/travel-agent…
AlexanderHodicke Nov 7, 2025
2ce0344
Merge pull request #2234 from oracle-devrel/dependabot/pip/ai/gen-ai-…
AlexanderHodicke Nov 7, 2025
5e86be0
Merge branch 'main' into dependabot/pip/ai/gen-ai-agents/travel-agent…
AlexanderHodicke Nov 7, 2025
f83f5ac
Merge pull request #2239 from oracle-devrel/dependabot/pip/ai/gen-ai-…
AlexanderHodicke Nov 7, 2025
8c5cf80
Bump starlette in /ai/gen-ai-agents/mcp-oci-integration
dependabot[bot] Nov 7, 2025
87892c6
Bump langgraph-checkpoint
dependabot[bot] Nov 7, 2025
217b78d
Initial content
AssafRab Nov 9, 2025
08bf941
Merge branch 'main' into Assaf-webinar
AssafRab Nov 9, 2025
db715f8
commit8
oraclevaibhav Nov 10, 2025
d9136b2
Merge branch 'main' into vaibhav-openshift-02
AlexanderHodicke Nov 10, 2025
5c69dc4
Merge pull request #2246 from oracle-devrel/vaibhav-openshift-02
AlexanderHodicke Nov 10, 2025
e3523a9
added
oraclevaibhav Nov 10, 2025
a6aa6a2
slight-change
oraclevaibhav Nov 10, 2025
71bfaba
Merge branch 'main' into vaibhav-openshift-03
AlexanderHodicke Nov 10, 2025
e462e44
Merge pull request #2247 from oracle-devrel/vaibhav-openshift-03
AlexanderHodicke Nov 10, 2025
a50b4a2
Merge branch 'main' into vaibhav-openshift-04
AlexanderHodicke Nov 10, 2025
f662c05
Merge pull request #2248 from oracle-devrel/vaibhav-openshift-04
AlexanderHodicke Nov 10, 2025
3af43f6
updating files structure
AssafRab Nov 10, 2025
5c2a3c2
Add review date to project README
iosyed Nov 10, 2025
16fe4e5
Update README with license and copyright information
iosyed Nov 10, 2025
42790d3
Delete data-platform/data-science/oracle-data-science/your-first-data…
iosyed Nov 10, 2025
d27dc33
Merge branch 'main' into Assaf-webinar
iosyed Nov 10, 2025
bfe3f7f
Merge pull request #2245 from oracle-devrel/Assaf-webinar
iosyed Nov 10, 2025
085fa21
pushing without the pdf
AssafRab Nov 10, 2025
ffc6f5b
Merge pull request #2249 from oracle-devrel/assaf-webinar2
iosyed Nov 11, 2025
5e74c4c
dedicated cloud updates
fboufis Nov 11, 2025
084035f
MC terraform code
Ej4z4K Nov 11, 2025
bc6042a
Merge branch 'main' into mc_updates_101125
Ej4z4K Nov 11, 2025
71308a9
Merge pull request #2251 from oracle-devrel/mc_updates_101125
Vikramkurma Nov 11, 2025
6938eb2
outdated asset
AlexanderHodicke Nov 11, 2025
388b1c1
Review IAM content and update as necessary
mgere-oracle Nov 11, 2025
414d1ca
changes to pages, added resources, cleaned
bobpeulen Nov 11, 2025
bd4953b
Merge branch 'main' into open_source_bpx
bobpeulen Nov 11, 2025
1662d79
Merge pull request #2252 from oracle-devrel/iam-updates-november
ocisec-coder Nov 11, 2025
486bf5a
Merge branch 'main' into open_source_bpx
AlexanderHodicke Nov 11, 2025
ee23ac1
Merge pull request #2253 from oracle-devrel/open_source_bpx
AlexanderHodicke Nov 11, 2025
e4ae4f1
Merge branch 'main' into fbpce2
vandijm Nov 11, 2025
559f0c6
Merge pull request #2250 from oracle-devrel/fbpce2
vandijm Nov 11, 2025
f57df0f
commit
oraclevaibhav Nov 12, 2025
5806653
Merge branch 'main' into vaibhav-openshift-05
fhasan80 Nov 12, 2025
92209a8
Merge pull request #2254 from oracle-devrel/vaibhav-openshift-05
fhasan80 Nov 12, 2025
b8186e0
commit
oraclevaibhav Nov 12, 2025
755027d
Merge pull request #2255 from oracle-devrel/vaibhav-openshift-06
fhasan80 Nov 12, 2025
79841b4
Date Updates
Daniel-Jamil Nov 12, 2025
49f4be6
Merge branch 'main' into Daniel04
fhasan80 Nov 12, 2025
3f5a8bc
commit
oraclevaibhav Nov 12, 2025
953736a
commit
oraclevaibhav Nov 12, 2025
aaa135e
Merge pull request #2257 from oracle-devrel/vaibhav-openshift-07
fhasan80 Nov 12, 2025
7847824
Update README.md
Daniel-Jamil Nov 12, 2025
8175768
Merge branch 'main' into Daniel04
fhasan80 Nov 12, 2025
419c945
commit
oraclevaibhav Nov 12, 2025
7e03096
commit
oraclevaibhav Nov 12, 2025
800575b
Merge pull request #2258 from oracle-devrel/Daniel04
AlexanderHodicke Nov 12, 2025
403ee84
commit
oraclevaibhav Nov 12, 2025
1d72883
Merge branch 'main' into vaibhav-osd-06
fhasan80 Nov 12, 2025
48f7d89
Update README.md
RichardORCL Nov 12, 2025
e2c1b1f
Update README.md
RichardORCL Nov 12, 2025
452c047
Changed Directory name
ppaolucc-it Nov 12, 2025
ee71fb3
Update README.md
RichardORCL Nov 12, 2025
ffef074
Update README.md
RichardORCL Nov 12, 2025
fa6c36e
Update Oracle-Cloud-Migration-Solution-Definition-Template.md
RichardORCL Nov 12, 2025
5c41b49
Merge remote-tracking branch 'origin/main' into new-name-folder-oracl…
ppaolucc-it Nov 12, 2025
dfe35d4
Merge pull request #2260 from oracle-devrel/vaibhav-osd-06
AlexanderHodicke Nov 12, 2025
3901815
Merge branch 'main' into main
fhasan80 Nov 12, 2025
82b30d4
Merge pull request #2261 from RichardORCL/main
fhasan80 Nov 12, 2025
f9e999f
Merge branch 'main' into new-name-folder-oracle-mcp-server-I
colivares1974 Nov 12, 2025
b1b5168
Merge pull request #2262 from oracle-devrel/new-name-folder-oracle-mc…
colivares1974 Nov 12, 2025
6dd7c32
commit
oraclevaibhav Nov 13, 2025
62c532c
Merge branch 'main' into dependabot/pip/ai/gen-ai-agents/assistant-se…
AlexanderHodicke Nov 13, 2025
270460e
Merge pull request #2243 from oracle-devrel/dependabot/pip/ai/gen-ai-…
AlexanderHodicke Nov 13, 2025
ec330a0
Merge branch 'main' into dependabot/pip/ai/gen-ai-agents/mcp-oci-inte…
AlexanderHodicke Nov 13, 2025
79fbbbd
Merge pull request #2242 from oracle-devrel/dependabot/pip/ai/gen-ai-…
AlexanderHodicke Nov 13, 2025
dc6fddd
Bump langgraph-checkpoint in /ai/gen-ai-agents/custom-rag-agent
dependabot[bot] Nov 13, 2025
4a9cb62
Merge branch 'main' into vaibhav-openshift-09
fhasan80 Nov 13, 2025
3c616b8
Merge branch 'main' into ai-email-invoice-review
AlexanderHodicke Nov 13, 2025
e77636f
Merge pull request #2233 from oracle-devrel/ai-email-invoice-review
AlexanderHodicke Nov 13, 2025
db6be2f
Merge branch 'main' into dependabot/pip/ai/gen-ai-agents/custom-rag-a…
AlexanderHodicke Nov 13, 2025
fe8c679
Merge pull request #2265 from oracle-devrel/dependabot/pip/ai/gen-ai-…
AlexanderHodicke Nov 13, 2025
8797fee
Merge branch 'main' into vaibhav-openshift-09
fhasan80 Nov 13, 2025
5722a38
Merge pull request #2264 from oracle-devrel/vaibhav-openshift-09
fhasan80 Nov 13, 2025
2f2921c
AIDP
amittyagioracle Nov 14, 2025
350ba46
Reviewing assets - fixing missing Licence files and links to LICENSE
PeterObertTCE Nov 14, 2025
cb40cd3
Merge pull request #2268 from oracle-devrel/pob-app-integration
MarcelStraka Nov 14, 2025
cc98177
Merge branch 'main' into OAC-Updates-FY-25
esmeralda-simionescu Nov 14, 2025
a3f51fc
Merge pull request #2266 from oracle-devrel/OAC-Updates-FY-25
esmeralda-simionescu Nov 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Invoice Document Processing from Gmail into ERP Systems using OCI Document Understanding & Oracle Integration Cloud

Reviewed: 30.10.2024
Reviewed: 04.11.2025

# Introduction

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ langchain-core==0.3.29
langchain-experimental==0.3.4
langchain-text-splitters==0.3.9
langgraph==0.2.62
langgraph-checkpoint==2.0.8
langgraph-checkpoint==3.0.0
langgraph-sdk==0.1.51
langsmith==0.2.11
markdown-it-py==3.0.0
Expand Down
21 changes: 21 additions & 0 deletions ai/gen-ai-agents/crewai-oci-integration/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2025 Luigi Saetta

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
107 changes: 107 additions & 0 deletions ai/gen-ai-agents/crewai-oci-integration/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# CrewAI ↔ OCI Generative AI Integration

This repository provides examples and configuration guidelines for integrating **[CrewAI](https://github.com/joaomdmoura/crewAI)** with **Oracle Cloud Infrastructure (OCI) Generative AI** services.
The goal is to demonstrate how CrewAI agents can seamlessly leverage OCI-hosted models through the **LiteLLM gateway**.

Reviewed: 31.10.2025

---

## 🔐 Security Configuration

Before running the demos, you must configure access credentials for OCI.

In these examples, we use a **locally stored key pair** for authentication.
Ensure your local OCI configuration (`~/.oci/config` and private key) is correctly set up and accessible to the Python SDK.

To correctly start the **LiteLLM gateway** you need to create and configure correctly a **config.yml** file. To create this file use the [template](./config_template.yml).

In addition, you should be **enabled** to use OCI Generative AI Service in your tenant. If you haven't yet used OCI GenAI ask to your tenant's admin to setup the **needed policies**.

---

## 🧩 Demos Included

- [Simple CrewAI Agent](./simple_test_crewai_agent.py) — basic CrewAI agent interacting with an LLM through OCI
- [OCi Consumption Report](./crew_agent_mcp02.py)
- *(More demos to be added soon)*

---

## 📦 Dependencies

The project relies on the following main packages:

| Dependency | Purpose |
|-------------|----------|
| **CrewAI** | Framework for creating multi-agent workflows |
| **OCI Python SDK** | Access OCI services programmatically |
| **LiteLLM (Gateway)** | OpenAI-compatible proxy for accessing OCI Generative AI models |

To connect CrewAI to OCI models, we use a **LiteLLM gateway**, which exposes OCI GenAI via an **OpenAI-compatible** REST API.

---

## ⚙️ Environment Setup

1. **Create a Conda environment**
```bash
conda create -n crewai python=3.11
```

2. **Activate** the environment
```
conda activate crewai
```

3. **Install** the required **packages**
```
pip install -U oci litellm "litellm[proxy]" crewai
```

4. Run the LiteLLM Gateway

Start the LiteLLM gateway using your configuration file (config.yml):
```
./start_gateway.sh
```

Make sure the gateway starts successfully and is listening on the configured port (e.g., http://localhost:4000/v1).

🧠 Test the Integration

Run the sample CrewAI agent to verify that CrewAI can connect to OCI through LiteLLM:

```
python simple_test_crewai_agent.py
```

If the setup is correct, you should see the agent’s output using an OCI model.

## Integrate Agents with **MCP** servers.
Install this additional package:

```
pip install 'crewai-tools[mcp]'
```

You can test the integration with **MCP** using [OCI Consumption report](./crew_agent_mcp02.py) that generates a report
of the consumption in your tenant (top 5 compartments, for 4 weeks).

To have this demo up&running:
* download the code for the MCP server from [here](https://github.com/oracle-devrel/technology-engineering/blob/main/ai/gen-ai-agents/mcp-oci-integration/mcp_consumption.py)
* start the MCP server, on a free port (for example 9500)
* register the URL, in [source](./crew_agent_mcp02.py), in the section:
```
server_params = {
"url": "http://localhost:9500/mcp",
"transport": "streamable-http"
}
```

If you don't want to secure (with JWT) the communication with the MCP server, put
```
ENABLE_JWT_TOKEN = False
```
in the config.py file.

36 changes: 36 additions & 0 deletions ai/gen-ai-agents/crewai-oci-integration/config_template.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# config.yaml for litellm with OCI Grok models
litellm_settings:
drop_params: true
# drop unsupported params instead of 500 errors
additional_drop_params: ["max_retries"]

# Common OCI connection parameters
common_oci: &common_oci
provider: oci
oci_region: us-chicago-1
oci_serving_mode: ON_DEMAND
supports_tool_calls: true
oci_user: your-oci-user-ocid
oci_fingerprint: your-oci-api-key-fingerprint
oci_tenancy: your-oci-tenancy-ocid
oci_compartment_id: your-oci-compartment-ocid
oci_key_file: /path/to/your/oci_api_key.pem
api_key: key4321


# List of models
model_list:
- model_name: grok4-oci
litellm_params:
<<: *common_oci # merge common OCI params
model: oci/xai.grok-4

- model_name: grok4-fast-oci
litellm_params:
<<: *common_oci
model: oci/xai.grok-4-fast-reasoning

general_settings:
telemetry: false
proxy_logging: false
allow_model_alias: true
58 changes: 58 additions & 0 deletions ai/gen-ai-agents/crewai-oci-integration/crew_agent_mcp01.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
"""
CrewAI agent with MCP

This one is doing Deep research using internet search tools via MCP server.

see:
https://docs.crewai.com/en/mcp/overview
https://docs.crewai.com/en/mcp/multiple-servers
"""
import os
from crewai import Agent, Task, Crew, LLM
from crewai_tools import MCPServerAdapter

# Disable telemetry, tracing, and logging
os.environ["CREWAI_LOGGING_ENABLED"] = "false"
os.environ["CREWAI_TELEMETRY_ENABLED"] = "false"
os.environ["CREWAI_TRACING_ENABLED"] = "false"

llm = LLM(
model="grok4-fast-oci",
# LiteLLM proxy endpoint
base_url="http://localhost:4000/v1",
api_key="sk-local-any",
temperature=0.2,
max_tokens=4000,
)

server_params = {
"url": "http://localhost:8500/mcp",
"transport": "streamable-http"
}

# Create agent with MCP tools
with MCPServerAdapter(server_params, connect_timeout=60) as mcp_tools:
print(f"Available tools: {[tool.name for tool in mcp_tools]}")

research_agent = Agent(
role="Research Analyst",
goal="Find and analyze information using advanced search tools",
backstory="Expert researcher with access to multiple data sources",
llm=llm,
tools=mcp_tools,
verbose=True
)

# Create task
research_task = Task(
description="Research the latest developments in AI agent frameworks",
expected_output="Comprehensive research report with citations",
agent=research_agent
)

# Create and run crew
crew = Crew(agents=[research_agent], tasks=[research_task])

result = crew.kickoff()

print(result)
79 changes: 79 additions & 0 deletions ai/gen-ai-agents/crewai-oci-integration/crew_agent_mcp02.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
"""
CrewAI agent with MCP

This one is analyzing tenant consumption via MCP server.

see:
https://docs.crewai.com/en/mcp/overview
https://docs.crewai.com/en/mcp/multiple-servers
"""
import os
from datetime import datetime
from crewai import Agent, Task, Crew, LLM
from crewai_tools import MCPServerAdapter

# Disable telemetry, tracing, and logging
os.environ["CREWAI_LOGGING_ENABLED"] = "false"
os.environ["CREWAI_TELEMETRY_ENABLED"] = "false"
os.environ["CREWAI_TRACING_ENABLED"] = "false"

llm = LLM(
model="grok4-oci",
# LiteLLM proxy endpoint
base_url="http://localhost:4000/v1",
api_key="sk-local-any",
temperature=0.,
max_tokens=4000,
)

# OCI consumption
server_params = {
"url": "http://localhost:9500/mcp",
"transport": "streamable-http"
}

# Create agent with MCP tools
with MCPServerAdapter(server_params, connect_timeout=60) as mcp_tools:
print(f"Available tools: {[tool.name for tool in mcp_tools]}")

research_agent = Agent(
role="OCI Consumption Analyst",
goal="Find and analyze information about OCI tenant consumption.",
backstory="Expert analyst with access to multiple data sources",
llm=llm,
tools=mcp_tools,
max_iter=30,
max_retry_limit=5,
verbose=True
)

# Create task
research_task = Task(
description="Identify the top 5 compartments by consumption (amount) for the OCI tenant "
"in the weeks of the month of september 2025, analyze the trends and provide insights on usage patterns."
"Analyze fully the top 5 compartments. Use only the amount, not the quantity.",
expected_output="Comprehensive report with data-backed insights.",
agent=research_agent
)

# Create and run crew
crew = Crew(agents=[research_agent], tasks=[research_task])

result = crew.kickoff()

print(result)

# --- Save the result to a Markdown file ---
# Create an output directory if it doesn’t exist
output_dir = "reports"
os.makedirs(output_dir, exist_ok=True)

# Use timestamped filename for clarity
timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")
output_path = os.path.join(output_dir, f"oci_consumption_report_{timestamp}.md")

# Write the result
with open(output_path, "w", encoding="utf-8") as f:
f.write(str(result))

print(f"\n✅ Report saved successfully to: {output_path}")
Loading