AgentCore — Qwen Cloud Hackathon Submission

Inspiration

Software changes that look simple often hide risks across security, billing, privacy, APIs, and user experience. A single AI agent may produce a confident answer while missing an affected system or organizational policy. We were inspired to build a system where specialized agents can collaborate, challenge one another, cite evidence, and involve humans before a high-risk decision moves forward.

That idea became AgentCore and its Change Society demo: a governed agent society powered by Qwen Cloud.

What it does

AgentCore turns ambiguous software-change requests into auditable, negotiated, and human-approved decisions.

A request is decomposed into durable Agent Tickets and assigned to specialized roles such as Context Scout, Change Analyst, Impact Analyst, and Policy Guardian. Each role examines the problem from a different perspective using Qwen Cloud. When agents disagree, the system runs a bounded rebuttal round, and a Coordinator reconciles their findings.

High-risk decisions are paused for human approval. The complete history—including evidence, messages, conflicts, decisions, token usage, and required actions—remains available for review.

How we built it

We built the backend with Python and FastAPI, the user interface with Next.js, and the production-shaped persistence layer with PostgreSQL.

Qwen Cloud is integrated through an OpenAI-compatible adapter. Each agent role uses a dedicated prompt, tool surface, and validated Pydantic output schema. Model responses pass through JSON extraction, normalization, schema validation, bounded repair retries, and per-run token-budget controls.

AgentCore provides the deterministic control plane: ticket routing, conflict detection, approval policies, scoped memory, and audit history. Agents communicate through our versioned Universal Agent JSON protocol. We also created a Python SDK and signed webhook adapter for external LangGraph or custom agent workers.

The application is packaged with Docker Compose and deployment artifacts for Alibaba Cloud ECS.

Challenges we ran into

The first challenge was making multi-agent collaboration genuinely useful instead of running several independent prompts. We needed explicit responsibilities, structured messages, conflict detection, and a bounded negotiation process.

Reliable structured output was another challenge. Model responses can contain formatting noise or incomplete fields, so we added schema injection, normalization, validation, repair retries, and fail-closed error handling.

Memory also required careful governance. Reusing old context can be dangerous, so evidence is scoped by tenant, workspace, and project, while stale or restricted information is explicitly excluded.

Finally, we had to balance intelligence with cost, latency, reproducibility, and demo reliability. We built both a live Qwen Cloud path and a deterministic offline profile for repeatable testing.

Accomplishments that we're proud of

We are proud that AgentCore demonstrates an actual governed agent society rather than a single chatbot presented as multiple agents.

The system provides durable task ownership, specialist negotiation, evidence-backed decisions, human approval gates, scoped memory, and a complete protocol trail. It also supports external agents through a vendor-neutral SDK and signed webhook contract.

We validated the same architecture across seven fixed scenarios covering billing, security, payments, API engineering, HR, privacy, and access management. In our committed deterministic benchmark, Change Society identified 25 of 26 critical impacts and all 10 required policies, compared with 7 impacts and no policies for the single-agent baseline. We report the higher token cost alongside these results rather than hiding the tradeoff.

What we learned

We learned that better agent systems are not created simply by adding more prompts. The largest improvement came from defining clear roles, communication contracts, state transitions, and deterministic governance around the models.

We also learned that disagreement is valuable when it is visible and bounded. A specialist conflict can reveal hidden risk, but unlimited agent debate increases cost without guaranteeing a better outcome.

Most importantly, LLM reasoning and organizational authority should remain separate. Qwen Cloud provides powerful analysis, while application policies decide eligibility, scope, approval requirements, and whether execution may continue.

What's next for QwenCloud

Next, we want to evolve AgentCore from a decision-support demo into a production-ready control plane for AI-assisted engineering work.

We plan to add safe execution agents that can implement approved tasks, per-role Qwen model selection, richer organizational policy ingestion, and integrations with development and collaboration platforms. We also want to run larger repeated live-Qwen evaluations and publish statistically stronger comparisons of quality, latency, and cost.

On the infrastructure side, we plan to move from the current ECS and Docker Compose deployment shape toward managed Alibaba Cloud services, stronger observability, multi-tenant administration, and horizontally scalable workers.

Our long-term goal is an open ecosystem where Qwen-powered and third-party agents can collaborate through shared protocols while organizations retain evidence, governance, and human control.

Built With

Share this project:

Updates