Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
51b8f3c
FEAT: Implement Deep Agent Architecture with Orchestrator and Subagen…
tuhinsharma121 Apr 20, 2026
d5994d8
FEAT: productionize agent — dead code removal, middleware fix, observ…
NP-compete May 23, 2026
cdaf2c4
fix(agent): expose MCP tools when servers are declared without explic…
mimran-khan Jun 3, 2026
918047b
fix: skip aegra db_manager initialization in in-memory mode (#60)
mimran-khan Jun 3, 2026
5b21754
fix: subagents inherit model and MCPs from parent orchestrator
NP-compete Jun 4, 2026
65d8703
Merge pull request #61 from redhat-data-and-ai/fix/subagent-inherit-p…
karankraina Jun 4, 2026
1530254
fix: inherit model and MCP tools for subagents missing frontmatter fi…
mimran-khan Jun 4, 2026
c24550c
Fix auth token caching and add Claude Sonnet 4.6 support (#67)
AtrikGhosh Jun 11, 2026
2549b88
feat: add graceful SIGTERM shutdown with drain and resource cleanup
NP-compete Jun 15, 2026
afa5b74
fix: use atexit as primary shutdown path, signal handlers as upgrade
NP-compete Jun 15, 2026
73bccfb
fix: make shutdown visible in container logs
NP-compete Jun 15, 2026
ef442ad
fix: guard atexit double-registration, validate timeout budget, set A…
NP-compete Jun 15, 2026
9262199
Merge pull request #68 from redhat-data-and-ai/feat/graceful-shutdown
karankraina Jun 15, 2026
c478b8c
Add support for subagent fallback and provider aware setup for chat i…
vishnusrichand Jun 21, 2026
f42b460
Add base image pattern with config volume mount (#71)
nirmchan Jun 21, 2026
b81f122
fix: removed unused config files (#74)
vishnusrichand Jun 23, 2026
466b188
ci: Update workflow triggers and sync with upstream deep-agent and ma…
nirmchan Jun 23, 2026
1f12507
feat: Adds per-thread and per-user daily LLM token tracking with Mong…
vishnusrichand Jun 25, 2026
3613204
feat: add per-MCP OAuth/DCR support with token store and HTTP routes …
abhiskum Jun 25, 2026
5bcddcf
feat: add OpenTelemetry observability with direct OTLP export (#83)
NP-compete Jun 30, 2026
1eaee38
feat: human in the loop (#84)
Anish701 Jun 30, 2026
2637a29
fix: prevent blocking for human-in-loop feature for subagent internal…
Anish701 Jul 2, 2026
1629c74
refactor: consolidate Containerfile and Containerfile.base into singl…
NP-compete Jul 2, 2026
6a1a6dc
Adds opt-in platform audit logging to template-agent (#79)
vishnusrichand Jul 3, 2026
62eacbf
fix: resolve pre-commit failures (ruff, mypy, pydocstyle, formatting)…
shahfasal Jul 5, 2026
6c1ab66
FEAT: Add api_key authentication method for mcp (#95)
AtrikGhosh Jul 5, 2026
6ffff54
FIX: Fixed skill reading in deep agent (#94)
AtrikGhosh Jul 6, 2026
e0d0003
feat(mcp): add DCR OAuth authentication flow for MCP tool servers (#97)
pratistha19 Jul 7, 2026
4bf5c52
chore: allow workflow to trigger on any tag pattern (#105)
nirmchan Jul 7, 2026
3647231
Deep agent new (#106)
nirmchan Jul 7, 2026
3485904
feat: add custom CA certificate support at container startup (#107)
NP-compete Jul 13, 2026
42c43da
feat: harden template-agent for production deployment (#93)
nirmchan Jul 13, 2026
662778f
feat: add /version endpoint and bump to 0.2.0 (#89)
NP-compete Jul 13, 2026
29561be
feat: unify trace_id propagation across OTEL, Langfuse, and token bud…
NP-compete Jul 13, 2026
974c3dd
feat: MCP server and LLM provider health checks with OTEL gauges (#86)
NP-compete Jul 13, 2026
881803a
feat: X-Request-ID propagation with org_id and agent_id log binding (…
NP-compete Jul 13, 2026
77f773e
feat: add vulnerability scanning to base image build pipeline (#100)
vishnusrichand Jul 13, 2026
38b3640
Feat/rhitaif 196 headless agent (#90)
saharannaveen Jul 13, 2026
a6df3ea
feat(agent): mcp oauth dcr agent (#103)
pratistha19 Jul 13, 2026
c486a32
fix: bump pytest-asyncio from 1.0.0 to 1.4.0 (#114)
vishnusrichand Jul 14, 2026
581f8b7
fix: set defualt human in the loop setting to true (#115)
Anish701 Jul 15, 2026
00d0cca
fix: bump mcp to 1.28.1 to fix CVE-2026-59950 (#122)
Anish701 Jul 17, 2026
a7400d9
fix: update compose networking and profiles for observability (#123)
nirmchan Jul 20, 2026
d4a0f2d
feat: add PII detection and scrubbing middleware (#117)
vishnusrichand Jul 21, 2026
ef3b636
ci: add auto-label workflow to deep-agent base
NP-compete Jul 22, 2026
0e7a8c6
ci: update auto-label with graceful degradation for fork PRs
NP-compete Jul 22, 2026
46c78fb
ci: update auto-label to use timeline API for linked issues
NP-compete Jul 22, 2026
69b6847
ci: switch auto-label from pull_request_target to pull_request
NP-compete Jul 22, 2026
41576a0
ci: harden CI/CD pipeline with security, governance, and resilience (…
NP-compete Jul 22, 2026
0b3d873
fix: make /app group-writable for OpenShift CA cert support Fixes #1…
nirmchan Jul 22, 2026
17f5aff
ci: rename test job to match required status check (#132)
NP-compete Jul 23, 2026
3a317a2
feat: MCP Prefix Tool Name (#124)
maxkashyap41 Jul 23, 2026
64c6065
ci: add CodeRabbit config and CI-gated review trigger (#142)
NP-compete Jul 28, 2026
a159777
fix: subagent backend context bug (#146)
Anish701 Jul 28, 2026
62b7a59
fix: set imagePullPolicy to IfNotPresent for Kind overlay (#153)
nirmchan Jul 29, 2026
0aa2581
fix: add postgres and redis components to OpenShift overlay (#155)
nirmchan Jul 29, 2026
395fb58
fix: add PVC reclaimPolicy and fix issues for openshift manifest for …
nirmchan Jul 30, 2026
d90405b
fix: add token usage feature flag (#137)
vishnusrichand Jul 30, 2026
d3917bb
feat: add Granite Guardian content safety guardrails (#109)
vishnusrichand Jul 31, 2026
fc0b8cc
fix: headless agent deployment (#148)
saharannaveen Jul 31, 2026
a776160
merge: deep-agent into main with conflict resolution
NP-compete Aug 1, 2026
e416a39
chore: sync deep-agent with main (resolve merge conflicts)
NP-compete Aug 1, 2026
a5648c2
FEAT: add log sanitizer for deep-agent logging pipeline
arijitroy003 Aug 4, 2026
041ae5e
FEAT: wire log sanitization into structlog and uvicorn pipelines
arijitroy003 Aug 4, 2026
59f851f
TEST: cover log sanitizer credential, header, and PII paths
arijitroy003 Aug 4, 2026
5142ba3
FEAT: redact user-authored content from log output
arijitroy003 Aug 4, 2026
e7b89a2
CLN: document why sanitize_headers has no caller yet
arijitroy003 Aug 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
159 changes: 127 additions & 32 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,45 +1,140 @@
# Agent Server Configuration
AGENT_HOST=0.0.0.0
AGENT_PORT=5002

# LLM: default Gemini + GOOGLE_APPLICATION_CREDENTIALS_CONTENT below (USE_OPENAI_COMPAT_LLM=false or unset).
# For RamaLama / Ollama / vLLM set USE_OPENAI_COMPAT_LLM=true and URL (and optional model/key):
# USE_OPENAI_COMPAT_LLM=true
# OPENAI_COMPAT_BASE_URL=http://127.0.0.1:8080/v1
# OPENAI_COMPAT_MODEL=local
# OPENAI_COMPAT_API_KEY=not-needed
# AGENT_SSL_KEYFILE=/path_to/ssl_key.pem
# AGENT_SSL_CERTFILE=/path_to/ssl_cert.pem

# Python Logging
PYTHON_LOG_LEVEL=INFO
# ==============================================================================
# Environment Variables
#
# Only secrets and infrastructure endpoints belong here.
# All operational config (cache, middleware, filesystem, providers) lives in
# config/agent/runtime/agent.yaml — the single source of truth.
#
# OpenShift: secrets come via Secrets, infra via ConfigMaps.
# ==============================================================================

# --- Environment ---
# Set to "production" to enforce security hardening:
# - ENABLE_AUTH must be true
# - MCP ssl_verify cannot be disabled
# - PII is scrubbed from error responses
# - Security headers are enforced
ENVIRONMENT=development

# --- Security ---
# Request body size limit (bytes) - prevents DoS attacks
REQUEST_BODY_MAX_SIZE=10485760 # 10MB

# --- SSO / OIDC Authentication ---
# Supports any OIDC-compliant provider (Keycloak, Okta, Azure AD, Auth0, etc.)
ENABLE_AUTH=false
SSO_ISSUER_URL=https://sso.example.com/realms/myrealm
SSO_CLIENT_ID=your-client-id
SSO_CLIENT_SECRET=your-client-secret
# SSO_JWKS_URI=https://sso.example.com/realms/myrealm/protocol/openid-connect/certs

# Dev fallback identity (used when ENABLE_AUTH=false)
SSO_DEV_USERNAME=John Doe
SSO_DEV_USER_ID=dev-user

USE_INMEMORY_SAVER=true
# User ID encryption for observability privacy
ENABLE_USER_ID_ENCRYPTION=false
# USER_ID_ENCRYPTION_KEY=your-32-byte-hex-key

# pgvector credentials for agentic memory (used when USE_INMEMORY_SAVER=false)
POSTGRES_USER=pgvector
POSTGRES_PASSWORD=pgvector
POSTGRES_HOST=0.0.0.0
# MCP OAuth token encryption (Fernet key — required when using auth_mode oauth/dcr)
# Encrypts access/refresh tokens in Redis and DCR client secrets in Postgres.
# Generate: python -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())"
# MCP_TOKEN_ENCRYPTION_KEY=
# Optional previous key during rotation (decrypt only — see README)
# MCP_TOKEN_ENCRYPTION_KEY_PREVIOUS=
# AGENT_PUBLIC_BASE_URL=http://localhost:5002

# --- Infrastructure ---

# Postgres (checkpoints, memory, feedback)
# Local dev (`make local`): localhost + port published by compose pgvector (5432)
POSTGRES_HOST=localhost
POSTGRES_PORT=5432
POSTGRES_DB=pgvector
POSTGRES_DB=template_agent
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres

# Redis (Aegra broker: SSE streaming, job queue, crash recovery)
# Local dev (`make local`): localhost + port published by compose redis (6379)
REDIS_URL=redis://localhost:6379/0
REDIS_BROKER_ENABLED=true

# MongoDB (platform token usage rollup — optional, set by deploy components)
#
# SECURITY: MONGODB_URI may contain credentials in the URI itself:
# mongodb://user:password@host:27017/tokenusage?authSource=tokenusage
#
# - NEVER commit a URI with credentials to version control.
# - NEVER log or expose this value in error messages or debug output.
# - In production, inject via secrets management:
# Kubernetes : mount as a Secret, reference via envFrom or env.valueFrom.secretKeyRef
# AWS : use Secrets Manager or SSM Parameter Store with an operator/init container
# GCP : use Secret Manager with Workload Identity
# Vault : use the Vault Agent injector or ESO (External Secrets Operator)
# - Scope the MongoDB user to read/write on the tokenusage DB only — no admin privileges.
# - Rotate credentials without redeploying by updating the secret and triggering a rollout.
#
# Local dev (unauthenticated, never in production):
# MONGODB_URI=mongodb://localhost:27017
# MONGODB_DB=tokenusage

# --- Observability ---

# exception
LANGFUSE_SECRET_KEY=sk-lf-f46b492e-9335-
LANGFUSE_PUBLIC_KEY=pk-lf-dfa0dab0-c486-
# Langfuse (v4 SDK — auto-read by client and CallbackHandler)
LANGFUSE_PUBLIC_KEY=pk-lf-...
LANGFUSE_SECRET_KEY=sk-lf-...
LANGFUSE_BASE_URL=https://cloud.langfuse.com
LANGFUSE_TRACING_ENVIRONMENT=development

# Google Vertex AI service creds
# OpenTelemetry — token budget export (metrics/traces via otel_setup.py)
# Agent lifecycle metrics (conversations, streams, threads) via observability.yaml
# ENABLE_OTEL_METRICS=false
# OTEL_EXPORTER_OTLP_ENDPOINT=
# ENABLE_OTEL_TRACES=false
# OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://localhost:4317
# OTEL_SERVICE_NAME=template-agent
# OTEL_AUTH_TOKEN=
# OTEL_METRIC_EXPORT_INTERVAL_MILLIS=10000
# ENABLE_OTEL=false
# OTEL_EXPORTER_OTLP_INSECURE=true
# OTEL_METRIC_EXPORT_INTERVAL=5000

# --- Model Provider Credentials ---

# Google Vertex AI
GOOGLE_APPLICATION_CREDENTIALS_CONTENT='{
"type": "service_account",
"project_id": "data-and-ai-gemini",
...
...
"project_id": "your-project-id",
...
"universe_domain": "googleapis.com"
}'

# MCP config
MCP_SERVER_NAME=template-mcp-server
MCP_SERVER_URL=http://localhost:5001/mcp
MCP_TRANSPORT_PROTOCOL=streamable_http
# vLLM / OpenAI-compatible (optional)
# VLLM_BASE_URL=http://vllm-server:8000/v1
# VLLM_API_KEY=EMPTY

# --- Granite Guardian Guardrails ---
#
# IBM Granite Guardian provides input/output content safety checks.
# Requires access to a running Granite Guardian model endpoint (vLLM or OpenAI-compatible).
#
# GUARDIAN_API_BASE=http://guardian-server:8000/v1 # Endpoint URL — guardrails activate when this is set
# GUARDIAN_API_KEY=EMPTY # API key (use EMPTY for unauthenticated vLLM)
# GUARDIAN_SSL_VERIFY=true # Set false to skip TLS verification (dev only)
# Model is configured in config/agent/runtime/guardrails.yaml

# --- Runtime (rarely changed) ---

PYTHON_LOG_LEVEL=INFO

# Log sanitization — redacts credentials (bearer tokens, API keys, AWS/GitHub
# tokens) and sensitive headers from log output. Personal PII is delegated to
# the PII middleware configured in agent.yaml.
# LOG_SANITIZATION_ENABLED=true
# LOG_SANITIZATION_CUSTOM_PATTERNS=INTERNAL-[0-9]{6},ACCT[0-9]+ # Comma-separated extra regexes
# Prompts, messages and model output are logged as "<redacted: N chars>".
# Set false only for trusted local debugging — it logs raw user input.
# LOG_REDACT_USER_CONTENT=true

# Per-MCP OAuth client secret (auth_mode: oauth — referenced via oauth.client_secret_env in mcp.json)
# MY_OAUTH_MCP_CLIENT_SECRET=your-client-secret
7 changes: 7 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Default owners for everything
* @redhat-data-and-ai/template-agent-maintainers

# CI and infrastructure
.github/ @redhat-data-and-ai/template-agent-maintainers
Containerfile @redhat-data-and-ai/template-agent-maintainers
deployment/ @redhat-data-and-ai/template-agent-maintainers
68 changes: 68 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Bug Report
description: Report a bug or unexpected behavior
labels: ["bug", "triage"]
body:
- type: markdown
attributes:
value: |
Thanks for reporting a bug. Please fill in the details below so we can reproduce and fix it.

- type: textarea
id: description
attributes:
label: Description
description: A clear description of the bug.
placeholder: What happened?
validations:
required: true

- type: textarea
id: steps
attributes:
label: Steps to reproduce
description: Minimal steps to trigger the issue.
placeholder: |
1. Run `make local`
2. Send a request to ...
3. Observe ...
validations:
required: true

- type: textarea
id: expected
attributes:
label: Expected behavior
description: What should have happened instead?
validations:
required: true

- type: input
id: version
attributes:
label: Version
description: Output of `git describe --tags` or the container image tag.
placeholder: v1.2.3 or deep-agent-abc1234
validations:
required: false

- type: dropdown
id: environment
attributes:
label: Environment
options:
- Local (make local)
- Container (make container)
- Kind (make kind)
- OpenShift
- Other
validations:
required: true

- type: textarea
id: logs
attributes:
label: Logs or error output
description: Paste relevant logs (redact any secrets).
render: shell
validations:
required: false
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Security vulnerability
url: https://github.com/redhat-data-and-ai/template-agent/security/advisories/new
about: Report security issues privately via GitHub Security Advisories.
41 changes: 41 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Feature Request
description: Suggest a new feature or improvement
labels: ["enhancement"]
body:
- type: markdown
attributes:
value: |
Describe the feature you'd like and the problem it solves.

- type: textarea
id: problem
attributes:
label: Problem
description: What problem does this solve? What's the current pain point?
placeholder: I'm always frustrated when ...
validations:
required: true

- type: textarea
id: solution
attributes:
label: Proposed solution
description: How should this work?
validations:
required: true

- type: textarea
id: alternatives
attributes:
label: Alternatives considered
description: Other approaches you've thought about.
validations:
required: false

- type: textarea
id: context
attributes:
label: Additional context
description: Links, screenshots, or related issues.
validations:
required: false
28 changes: 28 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
## What

<!-- One or two sentences: what changed and why. Link the issue. -->

Fixes #

## How

<!-- Describe your approach. Call out non-obvious design decisions, trade-offs, or alternatives you considered. -->

## Testing

<!-- How did you verify this works? -->

- [ ] Unit tests added/updated
- [ ] Ran locally (`uv run pytest tests/unit -x`)
- [ ] Manual verification (describe below if applicable)

## Rollback

<!-- How would you revert this if it breaks production? "Revert the commit" is fine for most changes. -->

## Checklist

- [ ] PR title follows [Conventional Commits](https://www.conventionalcommits.org/) (`feat:`, `fix:`, `ci:`, etc.)
- [ ] No secrets, credentials, or PII in the diff
- [ ] No breaking changes (or documented above with a migration path)
- [ ] Pre-commit hooks pass (`uv run pre-commit run --all-files`)
26 changes: 26 additions & 0 deletions .github/actions/setup-python-uv/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Setup Python with uv
description: Install uv, create a virtual environment, and install project dependencies

inputs:
python-version:
description: Python version to use
required: false
default: "3.14"

runs:
using: composite
steps:
- name: Install uv
uses: astral-sh/setup-uv@caf0cab7a618c569241d31dcd442f54681755d39 # v3
with:
version: "latest"
enable-cache: true
cache-dependency-glob: "**/pyproject.toml"

- name: Set up virtual env
shell: bash
run: uv venv --python ${{ inputs.python-version }}

- name: Install dependencies
shell: bash
run: uv pip install -e ".[dev]"
26 changes: 26 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
version: 2
updates:
- package-ecosystem: pip
directory: "/"
schedule:
interval: weekly
groups:
minor-and-patch:
update-types:
- minor
- patch

- package-ecosystem: docker
directory: "/"
schedule:
interval: weekly

- package-ecosystem: github-actions
directory: "/"
schedule:
interval: weekly
groups:
actions-minor-patch:
update-types:
- minor
- patch
Loading
Loading