@datalayer/agent-teams
v1.0.0
Published
The Datalayer orchestration A2A extension — standalone, built on no framework, consumed by any A2A client or worker.
Readme
🤖 👥 Agent Teams
The Datalayer orchestration extension
agent_teams.a2a (Python) and @datalayer/agent-teams (TypeScript)
implement the Datalayer orchestration
extension — an optional
A2A extension that lets a worker and an orchestrator say the things about
delegated work that A2A leaves unsaid: which execution a delegation is
part of and where it sits in its tree, a budget to decline before
exceeding, a checkpoint to resume from, and instructions delivered to a
turn already in progress.
from agent_teams.a2a import ExecutionRef, build_delegation_meta
meta = build_delegation_meta(
ExecutionRef(execution_id="exec_1", root_execution_id="exec_1", depth=0),
budget={"outputTokens": 4000},
)import { buildDelegationMeta } from '@datalayer/agent-teams';
const meta = buildDelegationMeta(
{ executionId: 'exec_1', rootExecutionId: 'exec_1', depth: 0 },
{ budget: { outputTokens: 4000 } },
);Nothing here requires the rest of this package, and nothing here imports
Datalayer's own platform — agent_teams.a2a.orchestration_extension and
@datalayer/agent-teams's src/orchestrationExtension.ts are each a
standalone module (Python built on fasta2a alone; TypeScript with zero
runtime dependencies at all) implementing the identical wire shape, field
for field. A worker implementing none of it still runs; see the normative
specification and its JSON Schema at
docs/extension-v1.md
for the full field-by-field contract both modules implement.
This is distinct from agent_teams.a2a.extensions' own
team-coordination extension (https://datalayer.io/ext/team-coordination/v1)
— member assignment, task dependencies, health and reactions for a team's
own internal coordination. The two extensions are independent and
separately negotiated; a card may advertise either, both, or neither.
A reference worker, and a public conformance suite
agent_teams.a2a.reference_worker is the smallest thing that speaks the
extension correctly: no model, no framework beyond fasta2a, no Datalayer
control plane. Run it standalone —
python -m agent_teams.a2a.reference_worker # serves on :8000— point any A2A client at it, and its card advertises the extension. It
answers a turn with what it "spent" (a character count, not a model call,
so this needs no API key), declines a delegation whose budget already
reads outputTokens: 0 naming the limit, and answers a pause request by
ending the turn at a checkpoint it makes up on the spot.
tests/test_reference_worker_conformance.py drives it over real ASGI HTTP
(httpx.ASGITransport, no socket) with hand-built JSON-RPC requests
matching docs/extension-v1.md's documented wire shapes — negotiation, a
declined budget, pause and resume — runnable by anyone against their own
worker, with no Datalayer service in the loop.
