You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Key Changes:
New Services & Features:
* **Prompt Guard Service:** Created `services/prompt_guard_service` to offload prompt injection detection models from the orchestrator and agents.
* **CI/CD Pipeline:** Added `.github/workflows/ci.yml` to automate linting (`ruff`), testing (`pytest` with coverage), and security scanning (`bandit`, `pip-audit`).
Refactoring & Improvements:
* **Vector DB Service:** Removed local `SentenceTransformer` fallback. The service now strictly relies on `EMBEDDING_SERVICE_URL` and uses gRPC (port 6334) for `QdrantClient` performance.
* **Prompt Injection Guard:** Refactored `common/prompt_injection/guard.py` to function as a lightweight client for the new `prompt-guard-service`.
* **Orchestrator:** optimized `reserve_agent_waiting_if_needed` logic and adjusted wait intervals.
* **Dependencies:** Cleaned up `requirements.txt` by moving heavy ML libraries (torch, transformers) to their specific service Dockerfiles.
Infrastructure & Configuration:
* **Cloud Build:** Updated `cloudbuild.yaml` to include the new prompt-guard service and granular deployment logic.
* **Linting:** Added `ruff.toml` for consistent code styling.
BREAKING CHANGES:
* `PROMPT_GUARD_SERVICE_URL` env var is now required if prompt injection checks are enabled.
* `EMBEDDING_SERVICE_URL` env var is now mandatory; local embedding fallback has been removed.
* `QDRANT_GRPC_PORT` defaults to 6334.
Copy file name to clipboardExpand all lines: GEMINI.md
+8-5Lines changed: 8 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,8 +16,13 @@ expertise in working with agentic systems.
16
16
solution.
17
17
* Every time you work with OS-specific commands, check the OS version and type in order to know which commands are
18
18
correct.
19
-
* Write code that is clear, readable, and follows the principles of [PEP 8](https://peps.python.org/pep-0008/).
20
-
Prioritize clarity over cleverness; avoid overly complex one-liners or list comprehensions.
19
+
* Never reformat the code which you haven't modified!
20
+
* Before implementing anything, always let the user know what you plan to do and ask the user to confirm it.
21
+
* Never duplicate existing functionality. If you've noticed any existing logic or functionality which you need for your implementation,
22
+
always reuse it. If reusing it directly can't be done, always extract it so that it's accessible (inheritance or composition) and then
23
+
reuse it.
24
+
* Never commit changes you've made into git unless explicitly asked by the user.
25
+
* Write code that is clear and readable. Prioritize clarity over cleverness; avoid overly complex one-liners or list comprehensions.
21
26
* Strictly adhere to PEP 8 naming conventions: `snake_case` for functions, methods, variables, and modules; `PascalCase`
22
27
for classes; and `SCREAMING_SNAKE_CASE` for constants.
23
28
* Use type hints for all function signatures (arguments and return values) to improve code clarity, enable static
@@ -36,9 +41,7 @@ expertise in working with agentic systems.
36
41
code.
37
42
* Avoid bare `except:` blocks. Always catch specific exceptions. Never let exceptions pass silently; at a minimum, log
38
43
the exception to ensure errors are not ignored.
39
-
* Write docstrings for all public modules, classes, and functions, following
40
-
the [PEP 257](https://peps.python.org/pep-0257/) conventions. Use comments to explain the *why*, not the *what*, of
41
-
non-obvious code.
44
+
* Write docstrings for all public modules, classes, and functions, following the PEP 257 conventions. Use comments to explain the *why*, not the *what*, of non-obvious code.
42
45
* Use `asyncio` for high-level, I/O-bound tasks, such as network requests or database interactions, to achieve high
43
46
concurrency with a single thread.
44
47
* Use `threading` for I/O-bound tasks where `asyncio` is not suitable or when integrating with blocking libraries.
RAG_MAX_RESULTS=5 # Default: 5. Maximum number of results to return from vector search.
208
210
RAG_EMBEDDING_MODEL=Qwen/Qwen3-Embedding-0.6B # Default: Qwen/Qwen3-Embedding-0.6B. SentenceTransformer model for embeddings.
209
-
EMBEDDING_SERVICE_URL= # Optional. URL of the embedding service for remote embedding generation.
211
+
EMBEDDING_SERVICE_URL= # Required for agents using Vector DB. URL of the embedding service for remote embedding generation.
210
212
EMBEDDING_SERVICE_TIMEOUT_SECONDS=60.0 # Default: 60.0. Timeout for embedding service requests.
211
213
212
214
# Incident Creation Agent Configuration
@@ -217,6 +219,7 @@ ISSUE_SEVERITY_FIELD_NAME=customfield_10124 # Default: customfield_10124. Jira c
217
219
# Prompt Injection Detection
218
220
PROMPT_INJECTION_CHECK_ENABLED=False # Default: False. Set to "True" to enable prompt injection detection.
219
221
PROMPT_GUARD_PROVIDER=protect_ai # Default: protect_ai. The provider for prompt injection detection.
222
+
PROMPT_GUARD_SERVICE_URL= # Required if PROMPT_INJECTION_CHECK_ENABLED is True. URL of the prompt guard service.
220
223
PROMPT_INJECTION_MIN_SCORE=0.8 # Default: 0.8. The minimum score for a prompt to be considered an injection.
221
224
PROMPT_INJECTION_MODEL_NAME=ProtectAI/deberta-v3-base-prompt-injection-v2 # Default: ProtectAI/deberta-v3-base-prompt-injection-v2. The name of the model used for prompt injection detection.
222
225
@@ -291,7 +294,13 @@ To run the Jira MCP server, you will need Docker installed.
291
294
python services/embedding_service/main.py
292
295
```
293
296
294
-
3.**Start Individual Agents:**
297
+
3.**Start the Prompt Guard Service (optional):**
298
+
Required if prompt injection checks are enabled.
299
+
```bash
300
+
python services/prompt_guard_service/main.py
301
+
```
302
+
303
+
4.**Start Individual Agents:**
295
304
Open separate terminal windows for each agent you want to run:
296
305
297
306
***Requirements Review Agent:**
@@ -319,7 +328,7 @@ To run the Jira MCP server, you will need Docker installed.
319
328
python agents/jira_rag/main.py
320
329
```
321
330
322
-
4. **Start the Orchestrator:**
331
+
5. **Start the Orchestrator:**
323
332
```bash
324
333
python orchestrator/main.py
325
334
```
@@ -418,11 +427,11 @@ you run any of the commands below.
418
427
After having all preconditions fulfilled, you can execute the following command:
*`_JIRA_RAG_UPDATE_AGENT_BASE_URL`: The URL of the deployed Jira RAG Update Agent.
440
449
*`_REMOTE_EXECUTION_AGENT_HOSTS`: A comma-separated list of URLs for all deployed agents that the orchestrator will
441
450
interact with.
451
+
*`_PROMPT_GUARD_SERVICE_URL`: The URL of the deployed Prompt Guard Service.
452
+
*`_DEPLOY_ALL_SERVICES`: Set to `true` to deploy all services. Individual service flags (e.g., `_DEPLOY_JIRA_MCP`) are available for granular deployment.
442
453
443
454
**Important**: Before the initial deployment of the framework into Google Cloud Run it's quite hard to know which URL
444
455
will be assigned to each agent and orchestrator. That's why most probably you'll have to run the deployment command
0 commit comments