Skip to content

v1.1.0: Agent-Targeted Routing

Choose a tag to compare

@rileyseaburg rileyseaburg released this 15 Jan 05:02
· 356 commits to main since this release

Features

Agent-Targeted Routing

Route tasks to specific named agents instead of any available worker.

  • send_to_agent MCP tool: Route tasks to specific agents by name with optional deadline
  • send_message_async MCP tool: Fire-and-forget async messaging for generic task distribution
  • Exact agent name matching with queue-indefinitely-by-default behavior
  • Optional deadline_seconds parameter to fail tasks if no matching worker claims them

Capability-Based Routing

Workers can declare capabilities, tasks can require them.

  • Workers register with --agent-name and --capabilities CLI flags
  • Tasks can specify required_capabilities as a JSONB array
  • SQL containment check (@>) ensures workers have ALL required capabilities
  • Combined with agent targeting for precise task routing

Database Migration 007

New schema for routing support:

  • target_agent_name, required_capabilities, deadline_at columns on task_runs
  • Updated claim_next_task_run() function with agent/capability filtering
  • fail_deadline_exceeded_tasks() function for deadline enforcement
  • targeted_task_queue view for monitoring agent-specific queues

Architecture

Dual-Layer Routing Enforcement

  • SSE layer: Workers only notified of tasks they can claim (reduces noise)
  • SQL layer: Atomic claim ensures no race conditions (authoritative filter)
  • No silent fallback: Tasks for agent X never run on agent Y

New MCP Tools

# Fire-and-forget async task (any worker)
send_message_async(message, conversation_id?, priority?)

# Targeted routing (specific agent)
send_to_agent(agent_name, message, deadline_seconds?, priority?)

Worker CLI Extensions

# Start worker with agent name and capabilities
codetether-worker --agent-name=code-reviewer --capabilities=python,pytest,security

Installation

pip install codetether==1.1.0

Full Changelog

https://github.com/rileyseaburg/codetether/blob/main/CHANGELOG.md