1
1
# Assistant Secretary Agent
2
2
3
- * An AI-powered assistant that routes user input across tools like Gmail, Google Calendar, Weather API, Calculator, and Oracle’s Generative AI services for smart, dynamic task automation.*
3
+ An AI-powered assistant that routes user input across tools like Gmail, Google Calendar, Weather API, Calculator, and Oracle’s Generative AI services for smart, dynamic task automation.
4
4
5
- Reviewed: 31.03 .2025
5
+ Reviewed: 23.04 .2025
6
6
7
7
---
8
8
9
- ## When to use this asset?
9
+ # When to use this asset?
10
10
11
11
Use this asset when you want to:
12
- - Automate tasks across Gmail, Calendar, and Weather
13
- - Get answers via OCI’s AI Agents and RAG-powered chat
14
- - Use a simple UI to interact with multiple tools seamlessly
15
- - Demo a multi-tool assistant combining local logic and cloud intelligence
12
+ - Automate tasks across Gmail, Calendar, and Weather
13
+ - Get answers via OCI’s AI Agents and RAG-powered chat
14
+ - Use a simple UI to interact with multiple tools seamlessly
15
+ - Demo a multi-tool assistant combining local logic and cloud intelligence
16
16
17
17
Ideal for:
18
- - AI developers building assistants
19
- - Oracle consultants showcasing GenAI + agent capabilities
20
- - Technical users exploring LLM + API routing in real-world use cases
18
+ - AI developers building assistants
19
+ - Oracle consultants showcasing GenAI + agent capabilities
20
+ - Technical users exploring LLM + API routing in real-world use cases
21
21
22
22
---
23
23
24
- ## How to use this asset?
24
+ # How to use this asset?
25
25
26
26
This assistant can be launched via:
27
- - ** Terminal (CLI mode)**
28
- - ** Streamlit UI** for visual interaction
27
+ - Terminal (CLI mode)
28
+ - Streamlit UI for visual interaction
29
29
30
30
It supports:
31
31
- Reading and replying to emails
32
32
- Summarizing or replying smartly using GenAI
33
33
- Scheduling calendar events
34
34
- Fetching and advising based on weather
35
- - Answering user queries via RAG and fallback GenAI tools
36
-
37
- ---
35
+ - Answering user queries via RAG and fallback GenAI tools
38
36
39
37
## Setup Instructions
40
38
41
- ### 🔑 Google API (Gmail + Calendar)
42
- 1 . Go to ** [ Google Cloud Console] ( https://console.cloud.google.com ) **
43
- 2 . Enable the ** Gmail API** and ** Calendar API**
44
- 3 . Create ** OAuth 2.0 Credentials** and download ` credentials.json `
45
- 4 . Place ` credentials.json ` in your project root
46
- 5 . The first time you run the assistant, a ` token.json ` will be created automatically
39
+ ### OCI Generative AI (Cohere on OCI)
47
40
48
- ---
41
+ 1 . Go to OCI Console → Generative AI
42
+ 2 . Select a model like ` cohere.command-r-plus-08-2024 `
43
+ 3 . Copy the following values:
44
+ - model_id
45
+ - compartment_id
46
+ - endpoint (e.g., ` https://inference.generativeai.us-chicago-1.oci.oraclecloud.com ` )
47
+ 4 . Paste these in ` oci_models.py `
49
48
50
- ### ☁️ OCI Generative AI (Cohere on OCI)
51
- 1 . Go to ** OCI Console → Generative AI**
52
- 2 . Select a model like ` cohere.command-r-plus-08-2024 `
53
- 3 . Copy the following values:
54
- - ` model_id `
55
- - ` compartment_id `
56
- - ` endpoint ` (e.g., ` https://inference.generativeai.us-chicago-1.oci.oraclecloud.com ` )
57
- 4 . Paste these in ` oci_models.py `
49
+ [ OCI GenAI Agent Guide] ( https://docs.oracle.com/en-us/iaas/Content/generative-ai-agents/overview.htm )
58
50
59
- 🔗 [ OCI GenAI Agent Guide ] ( https://docs.oracle.com/en-us/iaas/Content/generative-ai-agents/overview.htm )
51
+ Also create an AI Agent in OCI with a knowledge base, and upload your RAG documents into that knowledge base.
60
52
61
- Also create an ** AI Agent ** in OCI with a knowledge base, and upload your RAG documents into that knowledge base.
53
+ ### Google API (Gmail + Calendar)
62
54
63
- ---
55
+ 1 . Go to [ Google Cloud Console] ( https://console.cloud.google.com )
56
+ 2 . Enable the Gmail API and Calendar API
57
+ 3 . Create OAuth 2.0 Credentials and download ` credentials.json `
58
+ 4 . Place ` credentials.json ` in your project root
59
+ 5 . The first time you run the assistant, a ` token.json ` will be created automatically
64
60
65
- ### 🌦️ Weather API
66
- 1 . Sign up at [ weatherapi.com] ( https://www.weatherapi.com/ )
67
- 2 . Get a free API key
68
- 3 . In ` tools.py ` , update this line with your key:
61
+ ### Weather API
62
+
63
+ 1 . Sign up at [ weatherapi.com] ( https://www.weatherapi.com/ )
64
+ 2 . Get a free API key
65
+ 3 . In ` tools.py ` , update this line with your key:
69
66
``` python
70
67
WEATHER_API_KEY = " your_api_key_here"
71
68
```
72
69
73
- ---
74
-
75
- ### 💬 Start the Assistant
70
+ ### Start the Assistant
76
71
77
- ** Terminal Mode**
72
+ Terminal Mode:
78
73
``` bash
79
74
python assistant.py
80
75
```
81
76
82
- ** Streamlit UI**
77
+ Streamlit UI:
83
78
``` bash
84
79
streamlit run frontend.py
85
80
```
86
81
87
- ---
88
-
89
82
## Key Features
90
83
91
84
| Tool | Description |
@@ -101,21 +94,17 @@ streamlit run frontend.py
101
94
| Fallback Q&A | Handles general questions using OCI GenAI |
102
95
| Calculator | Parses and evaluates math queries |
103
96
104
- ---
105
-
106
- ## ⚠️ Notes
97
+ ## Notes
107
98
108
- - The assistant dynamically routes user queries using Cohere (hosted on OCI)
109
- - Each tool is modular — easy to extend or replace
110
- - Streamlit UI provides real-time visibility on tool routing
99
+ - The assistant dynamically routes user queries using Cohere (hosted on OCI)
100
+ - Each tool is modular — easy to extend or replace
101
+ - Streamlit UI provides real-time visibility on tool routing
111
102
112
- ---
113
-
114
- ### 🔁 Update Email Mappings (Required)
103
+ ## Update Email Mappings (Required)
115
104
116
105
To match received emails to locations (for RAG/OCI agent logic), update:
117
106
118
- ** At line 397 in the code** :
107
+ At line 397 in the code:
119
108
``` python
120
109
EMPLOYEE_DATA = {
121
110
" example example <[email protected] >" :
" Netherlands" ,
@@ -124,7 +113,7 @@ EMPLOYEE_DATA = {
124
113
}
125
114
```
126
115
127
- ** At line 812 in the code** :
116
+ At line 812 in the code:
128
117
``` python
129
118
EMPLOYEE_CITY_MAP = {
130
119
" example example <[email protected] >" :
" Netherlands" ,
@@ -133,24 +122,28 @@ EMPLOYEE_CITY_MAP = {
133
122
}
134
123
```
135
124
136
- Replace these keys with the ** actual email addresses** you'll be receiving messages from.
125
+ Replace these keys with the actual email addresses you'll be receiving messages from.
137
126
138
127
---
139
128
140
- ## Useful Links
129
+ # Useful Links (Optional)
141
130
142
- - [ Oracle Generative AI Agents] ( https://docs.oracle.com/en-us/iaas/Content/generative-ai-agents/overview.htm )
143
- - Overview of OCI's GenAI agent features
144
- - [ Oracle Cloud Docs] ( https://docs.oracle.com/en/cloud/ )
145
- - Full documentation for OCI services
146
- - [ Weather API] ( https://www.weatherapi.com/ )
147
- - Used for real-time weather data
131
+ - [ Oracle Generative AI Agents] ( https://docs.oracle.com/en-us/iaas/Content/generative-ai-agents/overview.htm )
132
+ Overview of OCI's GenAI agent features
133
+ - [ Oracle Cloud Docs] ( https://docs.oracle.com/en/cloud/ )
134
+ Full documentation for OCI services
135
+ - [ Weather API] ( https://www.weatherapi.com/ )
136
+ Used for real-time weather data
137
+ - [ Oracle] ( https://www.oracle.com )
138
+ Oracle Website
148
139
149
140
---
150
141
151
- ## License
142
+ # License
143
+
144
+ Copyright (c) 2025 Oracle and/or its affiliates.
152
145
153
- Copyright (c) 2024 Oracle and/or its affiliates .
146
+ Licensed under the Universal Permissive License (UPL), Version 1.0 .
154
147
155
- Licensed under the Universal Permissive License (UPL), Version 1.0.
156
148
See [ LICENSE] ( https://github.com/oracle-devrel/technology-engineering/blob/main/LICENSE ) for more details.
149
+
0 commit comments