Inspiration

Token economies are fragile. A single market shock can trigger a cascade of bad governance decisions — buybacks at the wrong time, treasury depletion, and no mechanism to stop it. We wanted to build a system that could govern a token economy autonomously, transparently, and safely — without human intervention.

Theoretical Foundation

Q-EOS is not a demo of API calling. It is a theory-driven engineering implementation of the Dynamic Control Buyback Mechanism (DCBM), published in arXiv:2601.09961.

The DCBM paper identifies static rule-based buybacks as a root cause of pro-cyclical volatility in token economies, and proposes a PID controller as the core stabilizer with strict solvency constraints. Q-EOS implements this framework directly:

DCBM Paper Q-EOS Implementation
Static buybacks cause pro-cyclical volatility PIDAgent replaces static rules with continuous feedback control
PID controller as core stabilizer PIDController implements Kp=3000, Ki=50, Kd=500
Strict solvency constraints TreasuryAgent enforces 10% per-tx cap, circuit breaker, emergency halt
Agent-based simulation for validation Six-agent collaborative simulation

$$u(t) = K_p e(t) + K_i \int e(t)dt + K_d \frac{de(t)}{dt}$$

Where $e(t) = P_{target} - P_{current}$ is the price deviation from peg.

What We Built

Six specialized agents work as a committee:

Observer → Risk → PID → Policy → Governor (Qwen) → Treasury

  • Observer detects real-time market price
  • Risk scores the threat level
  • PID calculates the optimal intervention using control theory
  • Policy dynamically adjusts intervention strength based on risk and treasury health
  • Governor (powered by Qwen-Plus) makes the final APPROVE/REJECT decision with transparent reasoning
  • Treasury executes approved actions and enforces hard constraints

Results

We validated Q-EOS against two baselines over 30 days of identical market simulation:

Metric Single Agent Single + PID Q-EOS
Final Treasury (USDC) 45,588 (-4,412) 50,000 (+0) 53,351 (+3,351)
Execution Rate 100% 0% 100%
Max Drawdown 12.2% 0% 1.8%

Q-EOS is the only configuration that ends with a treasury surplus while cutting max drawdown by 7x.

Challenges

The hardest problem was making the multi-agent pipeline robust. Qwen sometimes returns JSON wrapped in Markdown code fences — we built a three-layer JSON parser to handle every edge case. We also had to decide between fail-open and fail-closed behavior when the API is unreachable: in financial governance, fail-closed (reject and hold) is always the right answer.

Another challenge was designing the baseline comparison fairly — we gave Single+PID the exact same PID algorithm as Q-EOS to isolate whether the advantage came from multi-agent architecture or just a better control algorithm. It did: Single+PID executed 0 transactions in 30 days.

What We Learned

Multi-agent separation of concerns is not just an engineering pattern — it is a governance principle. A single agent reviewing its own proposals cannot reliably balance perception, risk assessment, and execution enforcement simultaneously. Specialization makes the system both more decisive and more safe.

Built With

Share this project:

Updates

posted an update

Q-EOS Final Update — June 23, 2026

Project is complete and fully submitted. Here's a summary of what was built and validated.

Architecture

Six specialized agents in a complete governance pipeline: Observer → Risk → PID → Policy → Governor (Qwen-Plus) → Treasury

Each agent has a single responsibility. The multi-agent separation of concerns is what allows the system to be both decisive and safe simultaneously.

Key Results (30-day baseline comparison)

Metric Single Agent Single + PID Q-EOS
Final Treasury (USDC) 45,588 (-4,412) 50,000 (+0) 53,351 (+3,351)
Execution Rate 100% 0% 100%
Max Drawdown 12.2% 0% 1.8%

Q-EOS is the only configuration that ends with a treasury surplus. Single+PID used the exact same PID algorithm as Q-EOS — but executed 0 transactions because a single Qwen instance reviewing its own proposals consistently rejected them. Multi-agent architecture made the difference.

Safety

Three-layer hard constraint system runs independent of Qwen:

  • Single tx ≤ 10% of treasury balance
  • Extreme price circuit breaker (< 0.7 or > 1.3)
  • Emergency halt when balance < 5,000 USDC
  • Recent consumption monitor (pauses buybacks when net drain > 5%)

Deployment

Running on Alibaba Cloud ECS, calling Qwen-Plus via DashScope API. Deployment proof: https://github.com/vivayang911/Q-EOS/blob/main/DEPLOYMENT_PROOF.md

Links

GitHub: https://github.com/vivayang911/Q-EOS Demo Video: https://youtu.be/V3dSjjKAn6o

Agent Society Track | Qwen Cloud Hackathon 2026

Log in or sign up for Devpost to join the conversation.

posted an update

Q-EOS Project Update - June 19, 2026

Today we completed a major milestone: full deployment on Alibaba Cloud ECS with 30-day Qwen-powered simulation running successfully.

What's Done

Alibaba Cloud ECS instance provisioned (2 vCPU, 4 GiB, Ubuntu 20.04)

Q-EOS code deployed and dependencies installed

30-day Qwen demo simulation completed — all [Qwen] API calls successful

simulation_demo.csv generated with complete governance decision logs

Deployment Proof

ECS Console Screenshot: docs/ecs_console.png

Terminal Log (Qwen API calls): docs/ecs_terminal.png

Full deployment proof: DEPLOYMENT_PROOF.md

Qwen Demo Results (30 days)

All 30 days: [Qwen] APPROVE with human-readable reasoning

Treasury drawdown: ~6.6% (50,000 → 46,704 USDC)

100% approval rate — Qwen made reasonable decisions in normal market conditions

Next Steps

Record 3-minute demo video

Finalize Devpost submission

Links

GitHub: https://github.com/vivayang911/Q-EOS

Deployment Proof: https://github.com/vivayang911/Q-EOS/blob/main/DEPLOYMENT_PROOF.md

Agent Society Track | Qwen Cloud Hackathon 2026

Log in or sign up for Devpost to join the conversation.

posted an update

[Dev Log] Q-EOS: Three-Layer Governance Architecture Closed-Loop Completed — 64.5% Rejection Rate Validates Circuit Breaker Mechanism Q-EOS Project Update - Day 7

This week we completed the closed-loop integration of Q-EOS's core governance pipeline:

What's Done

  • Full 5-agent collaboration workflow: Observer → Risk → PID → Governor → Treasury
  • Qwen 3.7-Max integrated with Governor Agent — every decision outputs human-readable reasoning
  • Treasury hard constraint layer (_enforce_hard_constraints()) runs independent of AI, enforcing 4 safety checks

Technical Highlights

  • PID controller parameters (Kp=3000, Ki=50, Kd=500) calibrated based on DCBM paper (arXiv:2601.08399)
  • Hard constraint layer ensures: single tx ≤ 10% treasury, extreme price auto-circuit-breaker, emergency halt when balance < 5000

Early Results

  • 365-day simulation: 64.5% rejection rate triggered under extreme conditions — treasury protected from going to zero
  • 30-day Qwen demo mode: 100% APPROVE, treasury drawdown only 6.6%

Next Steps

  • Record 3-minute demo video
  • Deploy to Alibaba Cloud ECS

Code open-sourced: https://github.com/vivayang911/Q-EOS

Agent Society Track | Qwen Cloud Hackathon 2026

Log in or sign up for Devpost to join the conversation.