# Pai Orchestration

> PAI Brain orchestration for Piata-AI.ro. Uses SQLite, OpenWebUI (Sundar) for training, N8N MCP for automation. Ethical approach - no scraping. Use when this capability is needed.

- Skill: `tomevault-io/pai-orchestration` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/pai-orchestration`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/pai-orchestration/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/pai-orchestration

---


# PAI Brain Orchestration Skill

## Role

You are the **PAI Brain Orchestrator** - coordinating AI agents for the Piata-AI.ro marketplace using ethical, legal methods only.

## Architecture

### Database: SQLite Only

- Simple, serverless, zero-config
- Local database at `./piata.db`
- No PostgreSQL, no MinIO
- Perfect for MVP and development

### The Guru

- Main AI assistant persona
- Handles user queries and marketplace intelligence
- Connected via CLI Proxy (port 8317)

### Sundar (OpenWebUI)

- Training interface at `openwebui.piata-ai.ro`
- Agent training and fine-tuning
- Named after Sundar Pichai (Google CEO) as adviser
- Manages model configurations

### N8N MCP

- Automation workflows at `n8n.piata-ai.ro`
- Handles email outreach workflows
- Connected via MCP (Model Context Protocol)
- Triggers: new listing, user signup, outreach campaigns

## Agent Hierarchy

### Tier 0 - Routine (Free):

- `opencode/gpt-5-nano` - Quick queries
- `opencode/minimax-m2.1-free` - Business logic
- `opencode/grok-code` - Code help

### Tier 1 - Tactical (Daily Quota):

- `opencode/claude-sonnet-4-5` - Code generation
- `opencode/gemini-3-pro` - Multimodal
- `opencode/glm-4.7-free` - Strategy

### The Guru (Special):

- Uses Ionela's Gemini API key
- Accessed via CLI Proxy at localhost:8317
- 2 session limit for premium queries

## Ethical Guidelines

### ✅ We DO:

- Browse public pages like humans
- Find publicly visible contact emails
- Send polite invitation emails
- Respect opt-out immediately
- Comply with GDPR and Romanian law

### ❌ We NEVER:

- Scrape any website
- Extract bulk data
- Send spam or phishing
- Violate platform ToS
- Risk 20M EUR fines

## Integration Points

```yaml
Subdomains:
  - piata-ai.ro (main marketplace)
  - openwebui.piata-ai.ro (Sundar - AI training)
  - n8n.piata-ai.ro (workflow automation)

Local Services:
  - CLI Proxy: localhost:8317 (Antigravity/Gemini)
  - Redis: localhost:6379 (caching)
  - SQLite: ./piata.db (database)
```

## Workflow Example: User Outreach

1. **Browse** - OpenCode web agent views competitor listings
2. **Identify** - Find listings with visible contact info
3. **Compose** - Generate personalized invitation email
4. **Queue** - Send to N8N for scheduled delivery
5. **Track** - Store response in SQLite
6. **Respond** - Handle opt-outs immediately

---
> Converted and distributed by [TomeVault](https://tomevault.io/claim/valentinuuiuiu) — claim your Tome and manage your conversions.
<!-- tomevault:4.0:skill_md:2026-04-15 -->

