cd /news/ai-agents/4-phase-orchestration-5-universal-agโ€ฆ ยท home โ€บ topics โ€บ ai-agents โ€บ article
[ARTICLE ยท art-46616] src=dev.to โ†— pub= topic=ai-agents verified=true sentiment=โ†‘ positive

4-Phase Orchestration: 5 Universal Agent Skills with YAML-Driven Rules, Composable Components, and Graceful Degradation

A developer released teleagent-skills, an open-source framework that standardizes agent pipeline development with a 4-phase orchestration model and YAML-driven rules. The framework provides five universal agent skillsโ€”Scoring Engine, Evidence Chain, Data Aggregator, and othersโ€”each composed of reusable phases that communicate via JSON contracts, enabling business logic changes without code modifications.

read6 min views1 publishedJul 1, 2026

When you're hard-coding your 3rd scoring if-else, maybe it's time to ask: can I move the rules into YAML and let the business change config instead of code?

Every Agent developer faces the same dilemma โ€” every business scenario rewrites a similar pipeline:

The skeleton is identical. What changes is only the "content" at each step. Yet every team builds pipelines from scratch.

teleagent-skills offers an answer:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                    Upper Business Skill                      โ”‚
โ”‚  (Scoring Engine / Evidence Chain / Data Aggregator / ...)  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
           โ”‚          โ”‚          โ”‚          โ”‚
           โ–ผ          โ–ผ          โ–ผ          โ–ผ
    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
    โ”‚ Phase 1  โ”‚โ”‚ Phase 2  โ”‚โ”‚ Phase 3  โ”‚โ”‚ Phase 4  โ”‚
    โ”‚ Extract  โ”‚โ”‚ Analyze  โ”‚โ”‚ Generate โ”‚โ”‚ Archive  โ”‚
    โ”‚          โ”‚โ”‚          โ”‚โ”‚          โ”‚โ”‚          โ”‚
    โ”‚Info-     โ”‚โ”‚Data-     โ”‚โ”‚Report-   โ”‚โ”‚Archive-  โ”‚
    โ”‚Extractor โ”‚โ”‚Analyst   โ”‚โ”‚Generator โ”‚โ”‚Manager   โ”‚
    โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”˜โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”˜โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”˜โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”˜
         โ”‚           โ”‚           โ”‚           โ”‚
         โ–ผ           โ–ผ           โ–ผ           โ–ผ
    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
    โ”‚          JSON Contract (Structured Data Contract) โ”‚
    โ”‚   phase1_output.json โ†’ phase2_input.json โ†’ ...  โ”‚
    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Core idea: each Phase is an independent component, and Phases pass data only through JSON contracts.

{
  "phase": "extract",
  "skill": "scoring-engine",
  "output": {
    "entities": [
      {
        "name": "ๅฎขๆˆทA",
        "type": "enterprise_customer",
        "attributes": {
          "annual_revenue": 50000000,
          "employee_count": 320,
          "industry": "ๅˆถ้€ "
        }
      }
    ],
    "metadata": {
      "extraction_time": "2026-07-01T10:30:00Z",
      "source": "CRM_API",
      "confidence": 0.92
    }
  },
  "next_phase": "analyze"
}

The traditional approach hard-codes scoring rules:

if customer.revenue > 10000000:
    score += 30
elif customer.revenue > 5000000:
    score += 20

teleagent-skills does it differently โ€” all rules are externalized to YAML:

scoring_engine:
  name: "ๆ”ฟไผๅฎขๆˆทๅ•†ๆœบ่ฏ„ๅˆ†"
  version: "2.1"
  dimensions:
    - id: revenue
      name: "่ฅๆ”ถ่ง„ๆจก"
      weight: 0.30
      rules:
        - condition: "attributes.annual_revenue >= 100000000"
          score: 30
          label: "่ถ…ๅคงๅž‹"
        - condition: "attributes.annual_revenue >= 50000000"
          score: 20
          label: "ๅคงๅž‹"
        - condition: "attributes.annual_revenue >= 10000000"
          score: 10
          label: "ไธญๅž‹"
    - id: industry
      name: "่กŒไธšๅฑžๆ€ง"
      weight: 0.25
      rules:
        - condition: "attributes.industry in ['้‡‘่ž','ๅŒป็–—']"
          score: 25
          label: "้ซ˜ไปทๅ€ผ่กŒไธš"
    - id: growth
      name: "ๅขž้•ฟๆฝœๅŠ›"
      weight: 0.20
    - id: connectivity
      name: "ๆŽฅๅ…ฅๆˆ็†Ÿๅบฆ"
      weight: 0.15
    - id: decision_chain
      name: "ๅ†ณ็ญ–้“พๆธ…ๆ™ฐๅบฆ"
      weight: 0.10
  thresholds:
    high: 70
    medium: 40
    low: 0

Business changed? Edit YAML. Need a new dimension? Add YAML. Zero code changes.

All 5 Skills share the same 4-Phase skeleton, but each Skill's Phase behavior differs:

Skill Phase 1 Extract Phase 2 Analyze Phase 3 Generate Phase 4 Archive
Scoring Engine
Extract scoring object attributes Load YAML rules & match scores Generate scoring report + recommendations Archive scoring records
Evidence Chain
Extract evidence from multiple sources Cross-validate + conflict detection Generate evidence chain report Archive validation records
Data Aggregator
Validate & clean raw data Aggregation + YoY/MoM calculation Output statistical report Archive aggregated results
Visualization Renderer
Analyze data characteristics Generate ECharts config Render HTML/Dashboard Cache chart assets
NL2Query
Extract query intent + entities Build SQL + confidence assessment Format query results Record query logs

The power of composability: upper-level Skills can chain lower-level Skills on demand. For example, the data query gateway pipeline:

NL2Query(Phase1-2) โ†’ Data Aggregator(Phase1-2) โ†’ Visualization Renderer(Phase1-3)

One natural language query automatically flows through "understand โ†’ query โ†’ aggregate โ†’ visualize" end to end.

The 4-Phase architecture has built-in 3-tier degradation:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   Phase 1   โ”‚โ”€โ”€โ”€โ”€โ–ถโ”‚   Phase 2   โ”‚โ”€โ”€โ”€โ”€โ–ถโ”‚   Phase 3   โ”‚โ”€โ”€โ”€โ”€โ–ถโ”‚   Phase 4   โ”‚
โ”‚   Extract   โ”‚     โ”‚   Analyze   โ”‚     โ”‚   Generate  โ”‚     โ”‚   Archive   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜
       โ”‚                   โ”‚                   โ”‚                   โ”‚
       โ–ผ                   โ–ผ                   โ–ผ                   โ–ผ
  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”       โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”       โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”       โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
  โ”‚ Return   โ”‚       โ”‚ Skip     โ”‚       โ”‚ Simplify โ”‚       โ”‚ Local    โ”‚
  โ”‚ raw      โ”‚       โ”‚ analysis โ”‚       โ”‚ template โ”‚       โ”‚ cache +  โ”‚
  โ”‚ input +  โ”‚       โ”‚ mark low โ”‚       โ”‚ raw data โ”‚       โ”‚ deferred โ”‚
  โ”‚ conf=0   โ”‚       โ”‚ confidenceโ”‚      โ”‚ passthroughโ”‚      โ”‚ retry    โ”‚
  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜       โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜       โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜       โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

The core principle of degradation: I'd rather give the user a low-confidence result than crash with an error.

What it is: A multi-dimensional weighted scoring component driven by YAML rule configs.

Typical scenarios: enterprise opportunity scoring, vendor evaluation, customer churn prediction, partner tiering.

Input โ†’ Rule matching โ†’ Scoring output flow:

{
  "customer": "ๅฎขๆˆทA",
  "total_score": 78,
  "grade": "A็บง-้‡็‚น่ทŸ่ฟ›",
  "dimension_breakdown": {
    "revenue": { "score": 20, "max": 30, "label": "ๅคงๅž‹" },
    "industry": { "score": 15, "max": 25, "label": "ไธญไปทๅ€ผ่กŒไธš" },
    "growth": { "score": 20, "max": 20 },
    "connectivity": { "score": 15, "max": 15 },
    "decision_chain": { "score": 8, "max": 10 }
  },
  "recommendation": "ๅปบ่ฎฎๅฎ‰ๆŽ’ไธ“ๅฑžๅฎขๆˆท็ป็†๏ผŒไผ˜ๅ…ˆๆŽจ่5Gไธ“็ฝ‘+ไบ‘็ฝ‘่žๅˆๆ–นๆกˆ"
}

What it is: A multi-source evidence cross-validation component that detects conflicts, evaluates confidence, and pinpoints root causes.

Data Source 1: Customer complaints    โ”€โ”€โ”
                                         โ”‚     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
Data Source 2: System alert logs      โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ–ถโ”‚  Evidence Chain  โ”‚
                                         โ”‚     โ”‚  Phase2: Analyze โ”‚
Data Source 3: SLA monitoring data    โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                                  โ”‚
                          โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”โ”‚
                          โ”‚ Cross-validation:      โ”‚
                          โ”‚ โ€ข Complaint: "2hr outage"
                          โ”‚ โ€ข Alert: "optical attenuation"โ”‚
                          โ”‚ โ€ข SLA: "99.1% availability" โ”‚
                          โ”‚ Conflict detected:      โ”‚
                          โ”‚ Complaint vs SLA surface contradictionโ”‚
                          โ”‚ Root cause="optical attenuation": 0.87โ”‚
                          โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

What it is: A raw data re-processing component supporting validation/cleaning, aggregation, YoY/MoM, and TOP rankings.

Raw query results           Aggregator output
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”         โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ 300 rows of  โ”‚โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ถ โ”‚ Monthly summary + YoY/MoM    โ”‚
โ”‚ detail data  โ”‚         โ”‚ TOP10 ranking                โ”‚
โ”‚ (region x    โ”‚         โ”‚ Anomaly flags (>2ฯƒ)          โ”‚
โ”‚  month)      โ”‚         โ”‚ Trend direction              โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜         โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

What it is: An automated rendering component that turns structured data into ECharts charts and Dashboards.

Chart type selection is automatic: time-series โ†’ line chart, categorical โ†’ bar/pie, multi-dimensional โ†’ radar.

What it is: A smart natural-language-to-structured-query conversion component.

User input: "ๅŽไธœๅŒบไธŠๆœˆ5Gไธ“็ฝ‘ๆ–ฐๅขžๅฎขๆˆทๆ•ฐ"

Phase1 Extract:  intent="query", entities=[region="ๅŽไธœ", time="ไธŠๆœˆ", metric="5Gไธ“็ฝ‘"]
Phase2 Analyze:  Generate SQL + confidence 0.88
Phase3 Generate: Format results
Phase4 Archive:  Record query log

Confidence scoring: When confidence drops below a threshold, the output gets a "low confidence" warning and shows the SQL for human review.

Industry Scoring Engine Evidence Chain Data Aggregator Viz Renderer NL2Query
Finance
Customer credit rating Anti-money-laundering multi-source verification Transaction volume YoY/MoM Risk control dashboard "Check a customer's last 3 months of transactions"
Manufacturing
Supplier evaluation QA vs. production line verification Line OEE statistics Capacity dashboard "Check line A's yield this month"
Retail
Member value scoring Data conflict detection SKU sales aggregation Sales heatmap "Top sellers in East China"
Healthcare
Patient risk stratification Diagnosis vs. lab verification Department admission stats Bed occupancy dashboard "Available beds in cardiology"

Key insight: All 5 Skills adapt to different industries purely through YAML rule configs. The scoring engine code logic is identical โ€” only the YAML files differ.

Dimension LangChain/LlamaIndex AutoGen/CrewAI teleagent-skills
Orchestration Code-level Chain Multi-Agent dialogue 4-Phase declarative orchestration
Rule management Hard-coded in code Described in prompts YAML parameterized config
Degradation strategy try-catch Retry dialogue Declarative degradation config
Business adaptation Change code Change prompts Change YAML
git clone https://github.com/yuzhaopeng-up/teleagent-skills.git
cd teleagent-skills

cp skills/scoring-engine/config/scoring_rules.yaml my_rules.yaml

License: Apache 2.0

Repo What It Does GitHub
financial-ai-skills
Financial AI skill library: 104 scenarios, pure Python

Stop building pipelines from scratch. The 4-Phase skeleton is ready โ€” you just need to write YAML.

Star teleagent-skills and let's standardize Agent Skills together.

โ”€โ”€ more in #ai-agents 4 stories ยท sorted by recency
โ”€โ”€ more on @teleagent-skills 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain โ€” perfect for shipping the agent you just read about.

$git push zahid main
โ†’ Live at https://your-agent.zahid.host โœ“
Get free account โ†’ Pricing
from โ‚ฌ0/mo ยท no card required
LIVE [news/4-phase-orchestratioโ€ฆ] indexed:0 read:6min 2026-07-01 ยท โ€”