Projeto do Agent Contas ORACLE

This commit is contained in:
2026-08-19 09:35:50 -03:00
commit 950a2bcd33
1366 changed files with 177217 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: agent-platform

View File

@@ -0,0 +1,91 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: agent-platform-config
namespace: agent-platform
data:
APP_ENV: "oke"
LOG_LEVEL: "INFO"
CORS_ORIGINS: "*"
LLM_PROVIDER: "mock"
LLM_TEMPERATURE: "0.2"
LLM_MAX_TOKENS: "2048"
SESSION_REPOSITORY_PROVIDER: "sqlite"
MEMORY_REPOSITORY_PROVIDER: "sqlite"
CHECKPOINT_REPOSITORY_PROVIDER: "sqlite"
SQLITE_DB_PATH: "/data/agent_framework.db"
USAGE_REPOSITORY_PROVIDER: "sqlite"
VECTOR_STORE_PROVIDER: "sqlite"
GRAPH_STORE_PROVIDER: "sqlite"
EMBEDDING_PROVIDER: "mock"
ENABLE_LANGFUSE: "false"
ENABLE_OTEL: "false"
ENABLE_ANALYTICS: "false"
ENABLE_INPUT_GUARDRAILS: "true"
ENABLE_OUTPUT_GUARDRAILS: "true"
ENABLE_JUDGES: "true"
ENABLE_SUPERVISOR: "true"
ENABLE_OUTPUT_SUPERVISOR: "true"
ENABLE_PARALLEL_GUARDRAILS: "true"
FRAMEWORK_CHANNEL_INPUT_MODE: "embedded"
ENABLE_MCP_TOOLS: "true"
MCP_GATEWAY_ENABLED: "true"
MCP_GATEWAY_URL: "http://mcp-gateway.agent-platform.svc.cluster.local:8300"
AGENTS_CONFIG_PATH: "./config/agents.yaml"
ROUTING_CONFIG_PATH: "./config/routing.yaml"
GUARDRAILS_CONFIG_PATH: "./config/guardrails.yaml"
JUDGES_CONFIG_PATH: "./config/judges.yaml"
PROMPT_POLICY_PATH: "./config/prompt_policy.yaml"
IDENTITY_CONFIG_PATH: "./config/identity.yaml"
MCP_PARAMETER_MAPPING_PATH: "./config/mcp_parameter_mapping.yaml"
BACKENDS_CONFIG_PATH: "/app/config/backends.yaml"
CHANNEL_GATEWAY_RUNTIME_MODE: "proxy"
DEFAULT_AGENT_BACKEND_URL: "http://agent-template-backend.agent-platform.svc.cluster.local:8000"
---
apiVersion: v1
kind: ConfigMap
metadata:
name: agent-gateway-backends
namespace: agent-platform
data:
backends.yaml: |
default_backend: contas
backends:
contas:
url: http://agent-template-backend.agent-platform.svc.cluster.local:8000
description: Backend principal do template de agentes.
domains: [contas, fatura, pagamento, consumo, contestacao]
keywords: [fatura, conta, boleto, pagamento, consumo, segunda via, contestar, contestação, valor, cobrança]
examples:
- Quero consultar minha fatura
- Minha conta veio alta
priority: 10
default_agent_id: telecom_contas
---
apiVersion: v1
kind: ConfigMap
metadata:
name: mcp-gateway-config
namespace: agent-platform
data:
mcp_gateway.yaml: |
discovery:
enabled: true
sync_on_startup: true
timeout_seconds: 10
default_catalog_endpoints: [/.well-known/mcp-server.json, /manifest, /mcp/tools, /tools/list, /tools, /v1/tools]
tool_defaults:
version: 1.0.0
protocol: legacy_http
enabled: true
idempotent: true
cache_ttl_seconds: 300
timeout_seconds: 30
retry: {enabled: true, max_attempts: 2, backoff_ms: 250}
allowed_agents: []
allowed_channels: []
required_business_keys: []
servers: {}
tools: {}
mcp_servers.yaml: |
servers: {}

View File

@@ -0,0 +1,17 @@
apiVersion: v1
kind: Secret
metadata:
name: agent-platform-secrets
namespace: agent-platform
type: Opaque
stringData:
OCI_GENAI_BASE_URL: ""
OCI_GENAI_API_KEY: ""
OCI_GENAI_MODEL: ""
OCI_GENAI_PROJECT_OCID: ""
OCI_COMPARTMENT_ID: ""
OCI_REGION: ""
LANGFUSE_PUBLIC_KEY: ""
LANGFUSE_SECRET_KEY: ""
LANGFUSE_HOST: ""
MCP_GATEWAY_TOKEN: ""

View File

@@ -0,0 +1,72 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: agent-template-backend
namespace: agent-platform
spec:
replicas: 3
selector:
matchLabels: {app: agent-template-backend}
template:
metadata:
labels: {app: agent-template-backend}
spec:
containers:
- name: agent-template-backend
image: agent-template-backend:latest
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8000
envFrom:
- configMapRef: {name: agent-platform-config}
- secretRef: {name: agent-platform-secrets}
readinessProbe:
httpGet: {path: /health, port: 8000}
initialDelaySeconds: 20
periodSeconds: 10
livenessProbe:
httpGet: {path: /health, port: 8000}
initialDelaySeconds: 40
periodSeconds: 20
resources:
requests: {cpu: "250m", memory: "512Mi"}
limits: {cpu: "1000m", memory: "1Gi"}
volumeMounts:
- name: data
mountPath: /data
volumes:
- name: data
emptyDir: {}
---
apiVersion: v1
kind: Service
metadata:
name: agent-template-backend
namespace: agent-platform
spec:
type: ClusterIP
selector: {app: agent-template-backend}
ports:
- name: http
port: 8000
targetPort: 8000
---
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: agent-template-backend
namespace: agent-platform
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: agent-template-backend
minReplicas: 3
maxReplicas: 10
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 70

View File

@@ -0,0 +1,57 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: agent-gateway
namespace: agent-platform
spec:
replicas: 2
selector:
matchLabels: {app: agent-gateway}
template:
metadata:
labels: {app: agent-gateway}
spec:
containers:
- name: agent-gateway
image: agent-gateway:latest
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8010
envFrom:
- configMapRef: {name: agent-platform-config}
- secretRef: {name: agent-platform-secrets}
volumeMounts:
- name: backends
mountPath: /app/config/backends.yaml
subPath: backends.yaml
readinessProbe:
httpGet: {path: /health, port: 8010}
initialDelaySeconds: 15
periodSeconds: 10
livenessProbe:
httpGet: {path: /health, port: 8010}
initialDelaySeconds: 30
periodSeconds: 20
resources:
requests: {cpu: "200m", memory: "256Mi"}
limits: {cpu: "1000m", memory: "768Mi"}
volumes:
- name: backends
configMap: {name: agent-gateway-backends}
---
apiVersion: v1
kind: Service
metadata:
name: agent-gateway
namespace: agent-platform
annotations:
service.beta.kubernetes.io/oci-load-balancer-shape: "flexible"
service.beta.kubernetes.io/oci-load-balancer-shape-flex-min: "10"
service.beta.kubernetes.io/oci-load-balancer-shape-flex-max: "100"
spec:
type: LoadBalancer
selector: {app: agent-gateway}
ports:
- name: http
port: 80
targetPort: 8010

View File

@@ -0,0 +1,49 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: channel-gateway
namespace: agent-platform
spec:
replicas: 2
selector:
matchLabels: {app: channel-gateway}
template:
metadata:
labels: {app: channel-gateway}
spec:
containers:
- name: channel-gateway
image: channel-gateway:latest
imagePullPolicy: IfNotPresent
ports:
- containerPort: 7000
envFrom:
- configMapRef: {name: agent-platform-config}
readinessProbe:
httpGet: {path: /health, port: 7000}
initialDelaySeconds: 15
periodSeconds: 10
livenessProbe:
httpGet: {path: /health, port: 7000}
initialDelaySeconds: 30
periodSeconds: 20
resources:
requests: {cpu: "100m", memory: "128Mi"}
limits: {cpu: "500m", memory: "512Mi"}
---
apiVersion: v1
kind: Service
metadata:
name: channel-gateway
namespace: agent-platform
annotations:
service.beta.kubernetes.io/oci-load-balancer-shape: "flexible"
service.beta.kubernetes.io/oci-load-balancer-shape-flex-min: "10"
service.beta.kubernetes.io/oci-load-balancer-shape-flex-max: "100"
spec:
type: LoadBalancer
selector: {app: channel-gateway}
ports:
- name: http
port: 80
targetPort: 7000

View File

@@ -0,0 +1,62 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: mcp-gateway
namespace: agent-platform
spec:
replicas: 2
selector:
matchLabels: {app: mcp-gateway}
template:
metadata:
labels: {app: mcp-gateway}
spec:
containers:
- name: mcp-gateway
image: mcp-gateway:latest
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8300
envFrom:
- secretRef: {name: agent-platform-secrets}
env:
- name: MCP_GATEWAY_CONFIG_PATH
value: /app/config/mcp_gateway.yaml
volumeMounts:
- name: config
mountPath: /app/config/mcp_gateway.yaml
subPath: mcp_gateway.yaml
- name: config
mountPath: /app/config/mcp_servers.yaml
subPath: mcp_servers.yaml
readinessProbe:
httpGet: {path: /health, port: 8300}
initialDelaySeconds: 15
periodSeconds: 10
livenessProbe:
httpGet: {path: /health, port: 8300}
initialDelaySeconds: 30
periodSeconds: 20
resources:
requests: {cpu: "100m", memory: "128Mi"}
limits: {cpu: "500m", memory: "512Mi"}
volumes:
- name: config
configMap: {name: mcp-gateway-config}
---
apiVersion: v1
kind: Service
metadata:
name: mcp-gateway
namespace: agent-platform
annotations:
service.beta.kubernetes.io/oci-load-balancer-shape: "flexible"
service.beta.kubernetes.io/oci-load-balancer-shape-flex-min: "10"
service.beta.kubernetes.io/oci-load-balancer-shape-flex-max: "100"
spec:
type: LoadBalancer
selector: {app: mcp-gateway}
ports:
- name: http
port: 80
targetPort: 8300

View File

@@ -0,0 +1,47 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: agent-frontend
namespace: agent-platform
spec:
replicas: 2
selector:
matchLabels: {app: agent-frontend}
template:
metadata:
labels: {app: agent-frontend}
spec:
containers:
- name: agent-frontend
image: agent-frontend:latest
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8080
readinessProbe:
httpGet: {path: /health, port: 8080}
initialDelaySeconds: 5
periodSeconds: 10
livenessProbe:
httpGet: {path: /health, port: 8080}
initialDelaySeconds: 15
periodSeconds: 20
resources:
requests: {cpu: "50m", memory: "64Mi"}
limits: {cpu: "250m", memory: "256Mi"}
---
apiVersion: v1
kind: Service
metadata:
name: agent-frontend
namespace: agent-platform
annotations:
service.beta.kubernetes.io/oci-load-balancer-shape: "flexible"
service.beta.kubernetes.io/oci-load-balancer-shape-flex-min: "10"
service.beta.kubernetes.io/oci-load-balancer-shape-flex-max: "100"
spec:
type: LoadBalancer
selector: {app: agent-frontend}
ports:
- name: http
port: 80
targetPort: 8080

View File

@@ -0,0 +1,11 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- 00-namespace.yaml
- 01-configmap.yaml
- 02-secret-template.yaml
- 03-agent-template-backend.yaml
- 04-agent-gateway.yaml
- 05-channel-gateway.yaml
- 06-mcp-gateway.yaml
- 07-frontend.yaml