About Portfolio Cases Services Blog Contact 🎙 Talk to AI
EN DE RU
🎙 Talk to AI
September 15, 2026 · 3 min read

Open Standard for AI Agent Coordination: How Cotal Solves Multi-Agent Collaboration in Production

I’m Denis Shokhirev, Agentic AI Systems Architect based in Freiburg im Breisgau, Germany. At DennisCraft AI Studio, I ship agent-based AI solutions for DACH B2B clients in logistics, fintech, and industrial automation, using Claude, Supabase, n8n, Doppler, and self-hosted Postgres. Last month, I watched two AI agents deadlock over a task queue — in production, not in a demo — which cost a client several hours of stuck workflows. Coordinating AI Agents Is a Production Problem, Not a Demo Proble

Denis Shokhirev
Denis Shokhirev
Agentic AI Systems Architect
Telegram LinkedIn

I’m Denis Shokhirev, Agentic AI Systems Architect based in Freiburg im Breisgau, Germany. At DennisCraft AI Studio, I ship agent-based AI solutions for DACH B2B clients in logistics, fintech, and industrial automation, using Claude, Supabase, n8n, Doppler, and self-hosted Postgres. Last month, I watched two AI agents deadlock over a task queue — in production, not in a demo — which cost a client several hours of stuck workflows.

Coordinating AI Agents Is a Production Problem, Not a Demo Problem

When you run a single LLM agent, things seem manageable. As soon as you deploy a team of agents — even two — the real issues start: duplicate work, lost state, race conditions. In demos, it all “just works” because conditions are controlled. In production, you hit:

  • Agents pulling the same task from Supabase and both executing — double booking.
  • n8n workflows failing on concurrent triggers.
  • Status mismatches: one agent updates the status, the other doesn’t see it in time, leading to deadlocks.

Classic mutexes and locks don’t help — agents are distributed, often stateless, and written in different languages, talking via APIs. LLMs introduce more unpredictability: output is not guaranteed to be stable or even valid. What’s missing is a common contract for agent-to-agent coordination — this is where Cotal comes in.

What Cotal Is and Why It Matters in Production

Cotal is an open protocol for describing multi-agent interactions, designed for real-world, production-grade agent systems. Instead of ad-hoc REST/JSON interfaces, it provides a schema for task types, allowed status transitions, and event-driven communication. This formalizes what each agent can do, when, and who did what.

  • Explicit task and status type definitions
  • Allowed transitions between states
  • Event-driven, not polling-based, change notifications
  • Audit trail for all agent actions

Cotal is a specification, not a library. A typical task schema in Cotal YAML looks like:


task:
  id: "invoice_456"
  type: "payment_processing"
  status: "awaiting_review"
  assigned_agent: "claude-ops-3"
  allowed_transitions:
    - "awaiting_review" → "approved"
    - "awaiting_review" → "rejected"
events:
  - type: "status_changed"
    timestamp: "2026-09-15T09:23:00Z"
    agent: "claude-ops-3"
    from: "awaiting_review"
    to: "approved"

This ensures that every agent knows exactly what transitions are permitted, and every status change is tracked.

Implementing Cotal in Practice: Claude, n8n, Supabase, Postgres

In my stack, I use Supabase for storage and authentication, n8n for workflow orchestration, Postgres as the source of truth, and Claude as the LLM agent. Production agent coordination with Cotal means enforcing atomic actions and full event auditability. Here’s what each part does, and what breaks without Cotal:

ComponentRoleProblem Without Cotal
ClaudeLLM agent, executes tasksDuplicate execution of same task
SupabaseTask/status storageRace conditions, lost idempotency
n8nWorkflow/event orchestrationUnpredictable trigger order
PostgresEvent log, source of truthMissing or inconsistent status changes

A transactional task update in Python/Postgres for Cotal might look like:


import psycopg2
from psycopg2.extras import RealDictCursor

def update_task_status(task_id, new_status, agent_id):
    with psycopg2.connect(...) as conn:
        with conn.cursor(cursor_factory=RealDictCursor) as cur:
            cur.execute("SELECT status FROM tasks WHERE id=%s FOR UPDATE", (task_id,))
            row = cur.fetchone()
            if row["status"] != "awaiting_review":
                raise Exception("Invalid status transition")
            cur.execute("UPDATE tasks SET status=%s WHERE id=%s", (new_status, task_id))
            cur.execute(
                "INSERT INTO events (task_id, agent, action) VALUES (%s, %s, %s)",
                (task_id, agent_id, f"{row['status']}→{new_status}")
            )
        conn.commit()

This pattern prevents classic race conditions: if the status isn’t what you expect, the update fails, and every transition is auditable.

Why Cotal Accelerates Production-Grade Multi-Agent Systems

  • Prevents chaos: agents no longer “fight” for tasks, and every role is explicit
  • Easy audit: who did what, and when, is always tracked
  • Migrating between LLMs (Claude ↔ OpenAI) doesn’t break the contract
  • Simplifies compliance: event logs and formal status schemas are mandatory in fintech/logistics

An Anthropic technical note (2024, Anthropic docs) confirms that most LLM agent production failures result from implicit contracts and non-atomic actions. Cotal makes every contract explicit.

Real-World Patterns and Pitfalls

  • LLM fails to update status — fix: add a post-processing n8n check to catch mismatches
  • Agent outputs invalid data — fix: validate agent output with JSON Schema before writing to Supabase
  • Scaling bottleneck — fix: move from polling to event-driven pipelines via n8n

In my last five client launches, these patterns cut manual incident review time by at least 50%.

FAQ

Can I adopt Cotal without rewriting all my agents?

Yes — you can wrap legacy agents via adapters and gradually migrate workflows to the contract.

Why not just use polling instead of event-driven?

Polling creates unnecessary load and increases race condition risk. Event-driven models are faster and more stable.

Is Cotal only for Claude/OpenAI?

No — the spec is agent-agnostic. Any LLM or non-LLM agent can implement the contract.

What if my pipeline is legacy?

You can use Cotal just for critical task flows where explicit state and auditing are essential.

Do I need to change my database?

No — Cotal overlays your existing storage, as long as you can enforce atomic updates and audit logs.

Where do your production agents most often conflict — storage layer, orchestration, or LLM output? I’d like to see your pattern and show how I address it in practice. I run a free 30-min stack audit for DACH founders building AI in regulated markets. DM me on LinkedIn or write to @ger_dennis_ai.

Continue reading
Contract-Driven AI Framework: How Traverse Lets You Build Business Capabilities on WASM for Browser, Edge, and Cloud
How Uber Secures Its AI Agents: Real-World ADR Stack for Observability and Security in Production
AI Hallucinates in Binary Reverse Engineering: How Reverify Checks Every LLM Claim Against Real Bytes
How to Speed Up Code Reviews and Navigation in Large Codebases with AI: Local Code Intelligence Graph in Action
All articles →
Where this is applied
Services — what we build
Talk to the voice agent
Case studies
Ready to build?

Turn your process into an AI system

Production quality. DACH B2B focus.

Start a project → ← All articles