Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
11 changes: 11 additions & 0 deletions .coderabbit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# CodeRabbit Configuration for PMOVES Submodule
reviews:
review_status: true
branches:
- "main"
- "feat/*"
- "fix/*"
excluded_branches:
- "origin/main"
language: "en-US"
doc_target_coverage: 80
93 changes: 93 additions & 0 deletions PMOVES.AI_INTEGRATION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# PMOVES.AI Integration Guide for Archon Agent Service

## Integration Complete

The PMOVES.AI integration template has been applied to Archon Agent Service.

## Next Steps

### 1. Customize Environment Variables

Edit the following files with your service-specific values:

- `env.shared` - Base environment configuration
- `env.tier-agent` - AGENT tier specific configuration
- `chit/secrets_manifest_v2.yaml` - Add your service's required secrets
Comment on lines +13 to +15
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Correct the env file name and hyphenate “tier-specific”.
The PR adds env.tier-agent.sh, but the guide lists env.tier-agent, and “tier-specific” should be hyphenated.

✏️ Proposed fix
-- `env.tier-agent` - AGENT tier specific configuration
+- `env.tier-agent.sh` - AGENT tier-specific configuration
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- `env.shared` - Base environment configuration
- `env.tier-agent` - AGENT tier specific configuration
- `chit/secrets_manifest_v2.yaml` - Add your service's required secrets
- `env.shared` - Base environment configuration
- `env.tier-agent.sh` - AGENT tier-specific configuration
- `chit/secrets_manifest_v2.yaml` - Add your service's required secrets
🧰 Tools
🪛 LanguageTool

[grammar] ~14-~14: Use a hyphen to join words.
Context: ...guration - env.tier-agent - AGENT tier specific configuration - `chit/secrets_m...

(QB_NEW_EN_HYPHEN)

🤖 Prompt for AI Agents
In `@PMOVES.AI_INTEGRATION.md` around lines 13 - 15, Update the docs to reference
the correct filename `env.tier-agent.sh` (replace the incorrect
`env.tier-agent`) and hyphenate “tier-specific” everywhere; locate the list
entry that currently reads `env.tier-agent - AGENT tier specific configuration`
and change it to `env.tier-agent.sh - AGENT tier-specific configuration`.


### 2. Update Docker Compose

Add the PMOVES.AI environment anchor to your `docker-compose.yml`:

```yaml
services:
archon:
<<: [*env-tier-agent, *pmoves-healthcheck]
# Your existing service configuration...
```

### 3. Integrate Health Check

Add the health check endpoint to your service:

```python
from pmoves_health import add_custom_check, get_health_status

@app.get("/healthz")
async def health_check():
return await get_health_status()
```

### 4. Add Service Announcement

Add NATS service announcement to your startup:

```python
from pmoves_announcer import announce_service

@app.on_event("startup")
async def startup():
await announce_service(
slug="archon",
name="Archon Agent Service",
url=f"http://archon:8091",
port=8091,
tier="agent"
)
```

### 5. Test Integration

```bash
# Test health check
curl http://localhost:8091/healthz

# Verify environment variables loaded
docker compose exec archon env | grep PMOVES

# Verify NATS announcement
nats sub "services.announce.v1"
```

## Service Details

- **Name:** Archon Agent Service
- **Slug:** archon
- **Tier:** agent
- **Port:** 8091
- **Health Check:** http://localhost:8091/healthz
- **NATS Enabled:** False
Comment on lines +73 to +78
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Avoid bare URLs in Markdown lists.
Wrap the URL in angle brackets (or link syntax) to satisfy MD034 and render consistently.

✏️ Proposed fix
-- **Health Check:** http://localhost:8091/healthz
+- **Health Check:** <http://localhost:8091/healthz>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- **Name:** Archon Agent Service
- **Slug:** archon
- **Tier:** agent
- **Port:** 8091
- **Health Check:** http://localhost:8091/healthz
- **NATS Enabled:** False
- **Name:** Archon Agent Service
- **Slug:** archon
- **Tier:** agent
- **Port:** 8091
- **Health Check:** <http://localhost:8091/healthz>
- **NATS Enabled:** False
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)

77-77: Bare URL used

(MD034, no-bare-urls)

🤖 Prompt for AI Agents
In `@PMOVES.AI_INTEGRATION.md` around lines 73 - 78, The markdown list item for
"Health Check" uses a bare URL which violates MD034; update the list item "-
**Health Check:** http://localhost:8091/healthz" to use angle-bracket or link
syntax (e.g., "- **Health Check:** <http://localhost:8091/healthz>" or "-
**Health Check:**
[http://localhost:8091/healthz](http://localhost:8091/healthz)") so the URL is
not bare and MD034 is satisfied.

- **GPU Enabled:** False

## Files Created

- `env.shared` - Base PMOVES.AI environment
- `env.tier-agent` - Tier-specific environment
- `chit/secrets_manifest_v2.yaml` - CHIT secrets configuration
- `pmoves_health/` - Health check module
- `pmoves_announcer/` - NATS service announcer
- `pmoves_registry/` - Service registry client
- `docker-compose.pmoves.yml` - PMOVES.AI YAML anchors

## Support

For questions or issues, see the PMOVES.AI documentation.
79 changes: 79 additions & 0 deletions chit/secrets_manifest_v2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# PMOVES.AI CHIT Secrets Manifest Template
# Place at: chit/secrets_manifest_v2.yaml or .chit/secrets_manifest_v2.yaml

api_version: "2.0"
environment: ${CHIT_ENVIRONMENT:-production}

# Secrets sources in order of precedence (higher number = higher precedence)
sources:
# 1. Environment variables (base precedence)
- type: env
precedence: 50

# 2. CHIT Vault (highest precedence - overrides env vars)
- type: chit_vault
precedence: 100
endpoint: ${CHIT_VAULT_ENDPOINT:-http://chit-vault:8050}

# Secrets required by this service
# Replace the example variables below with your service's actual secrets
variables:
# === Service Identity ===
- SERVICE_NAME
- SERVICE_SLUG

# === PMOVES.AI Core Services ===
- NATS_URL

# === LLM Gateway (if using TensorZero) ===
# Uncomment if your service uses TensorZero
# - TENSORZERO_URL
# - TENSORZERO_API_KEY

# === GPU Orchestrator (if applicable) ===
# Uncomment for GPU services
# - GPU_ORCHESTRATOR_URL

# === Data Services (as applicable) ===
# - QDRANT_URL
# - QDRANT_API_KEY
# - NEO4J_URL
# - NEO4J_USERNAME
# - NEO4J_PASSWORD
# - MEILISEARCH_URL
# - MEILISEARCH_API_KEY
# - MINIO_ENDPOINT
# - MINIO_ACCESS_KEY
# - MINIO_SECRET_KEY

# === Supabase (if applicable) ===
# - SUPABASE_URL
# - SUPABASE_ANON_KEY
# - SUPABASE_SERVICE_KEY

# === Service-Specific Secrets ===
# Add your service's required secrets below
# - EXAMPLE_API_KEY
# - EXAMPLE_DATABASE_URL

# Optional: define secret groups for different environments
groups:
development:
required:
- SERVICE_NAME
- NATS_URL
optional:
- LOG_LEVEL

production:
required:
- SERVICE_NAME
- SERVICE_SLUG
- NATS_URL
optional:
- LOG_LEVEL

# Validation rules
validation:
strict: false # Set to true to fail on missing optional secrets
fail_on_missing_required: true
136 changes: 136 additions & 0 deletions docker-compose.pmoves.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
# PMOVES.AI Docker Compose YAML Anchors Template
#
# These YAML anchors provide standardized environment loading for PMOVES services.
# Include this file or copy the anchors into your docker-compose.yml.
#
# Usage:
# services:
# my-service:
# <<: *env-tier-api
# environment:
# SERVICE_NAME: my-service
# SERVICE_SPECIFIC_VAR: value

version: "3.8"

# PMOVES.AI Environment Loading Anchors
# These anchors provide tier-based environment file loading
# NOTE: Use map-based environment vars (not list-based) for proper YAML merging
x-pmoves-env: &pmoves-env-base
env_file:
- env.shared # Base PMOVES.AI configuration
environment:
PMOVES_ENV: ${PMOVES_ENV:-production}
TIER: ${TIER}
NATS_URL: ${NATS_URL:-nats://nats:4222}
TENSORZERO_URL: ${TENSORZERO_URL:-http://tensorzero-gateway:3030}

# API Tier Environment
x-env-tier-api: &env-tier-api
<<: *pmoves-env-base
env_file:
- env.shared
- env.tier-api # API tier specific configuration
environment:
TIER: api
MAX_CONCURRENT_REQUESTS: ${MAX_CONCURRENT_REQUESTS:-100}
RATE_LIMIT_ENABLED: ${RATE_LIMIT_ENABLED:-true}

# Agent Tier Environment
x-env-tier-agent: &env-tier-agent
<<: *pmoves-env-base
env_file:
- env.shared
- env.tier-agent # Agent tier specific configuration
Comment on lines +39 to +44
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Fix agent tier env_file name mismatch

The compose anchors point at env.tier-agent, but the only file added in this commit is env.tier-agent.sh. As written, the agent-tier anchor won’t load any tier-specific variables (and the referenced file doesn’t exist), so services using *env-tier-agent will miss the intended configuration. Either rename the file or update the anchor to match the actual filename.

Useful? React with 👍 / 👎.

environment:
TIER: agent
MAX_CONCURRENT_AGENTS: ${MAX_CONCURRENT_AGENTS:-50}
MCP_ENABLED: ${MCP_ENABLED:-true}

# Worker Tier Environment
x-env-tier-worker: &env-tier-worker
<<: *pmoves-env-base
env_file:
- env.shared
- env.tier-worker # Worker tier specific configuration
environment:
TIER: worker
MAX_CONCURRENT_JOBS: ${MAX_CONCURRENT_JOBS:-10}
WORKER_POOL_SIZE: ${WORKER_POOL_SIZE:-4}

# Data Tier Environment
x-env-tier-data: &env-tier-data
<<: *pmoves-env-base
env_file:
- env.shared
- env.tier-data # Data tier specific configuration
environment:
TIER: data
MAX_CONNECTIONS: ${MAX_CONNECTIONS:-100}

# LLM Tier Environment
x-env-tier-llm: &env-tier-llm
<<: *pmoves-env-base
env_file:
- env.shared
- env.tier-llm # LLM tier specific configuration
environment:
TIER: llm
MAX_CONCURRENT_REQUESTS: ${MAX_CONCURRENT_REQUESTS:-50}

# Media Tier Environment
x-env-tier-media: &env-tier-media
<<: *pmoves-env-base
env_file:
- env.shared
- env.tier-media # Media tier specific configuration
environment:
TIER: media
GPU_ENABLED: ${GPU_ENABLED:-true}
MAX_CONCURRENT_JOBS: ${MAX_CONCURRENT_JOBS:-4}

# Health check template
x-pmoves-healthcheck: &pmoves-healthcheck
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/healthz"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s

# GPU resource template
x-pmoves-gpu: &pmoves-gpu-resource
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]

# Service labels for Prometheus discovery
x-pmoves-labels: &pmoves-labels
labels:
- "pmoves.service=true"
- "prometheus.io/scrape=true"
- "prometheus.io/port=9090"
- "prometheus.io/path=/metrics"

# Example service definition using the templates:
#
# services:
# my-api-service:
# <<: [*env-tier-api, *pmoves-healthcheck, *pmoves-labels]
# image: ghcr.io/powerfulmoves/my-service:latest
# ports:
# - "8080:8080"
# environment:
# SERVICE_NAME: my-api-service
# SERVICE_PORT: 8080
#
# my-gpu-worker:
# <<: [*env-tier-worker, *pmoves-gpu-resource, *pmoves-healthcheck]
# image: ghcr.io/powerfulmoves/my-gpu-worker:latest
# environment:
# SERVICE_NAME: my-gpu-worker
# CUDA_VISIBLE_DEVICES: 0
Loading