Build agent dispatcher — route tasks to Claude Code, Kimi, APIs #1072

Closed
opened 2026-03-23 13:11:55 +00:00 by perplexity · 1 comment
Collaborator

Parent: #1070

Objective

Timmy needs to know what agents are available, what they're good at, and how to send them work. This is the dispatch system.

Agent Registry

Agent Strengths Interface Max Concurrent
Claude Code Architecture, refactoring, complex reasoning, code review CLI / API 1
Kimi Code Parallel implementation, routine coding, fast iteration CLI / API 1
Agent APIs Research, analysis, specialized tasks HTTP API Varies
Timmy (self) Triage, planning, creative writing, orchestration Local 1

Dispatch Logic

  1. Match task type to agent strengths
  2. Check agent availability (is it idle or working?)
  3. Send task with context (issue link, requirements, acceptance criteria)
  4. Monitor for completion or timeout
  5. Review output quality
  6. If output fails QA → reassign or flag

Acceptance Criteria

  • Timmy can programmatically invoke Claude Code and Kimi Code on specific issues
  • Task assignment is logged in Gitea (comment on issue: "Assigned to Claude Code")
  • Completion is detected and logged
  • Failed tasks are retried or escalated
Parent: #1070 ## Objective Timmy needs to know what agents are available, what they're good at, and how to send them work. This is the dispatch system. ## Agent Registry | Agent | Strengths | Interface | Max Concurrent | |---|---|---|---| | Claude Code | Architecture, refactoring, complex reasoning, code review | CLI / API | 1 | | Kimi Code | Parallel implementation, routine coding, fast iteration | CLI / API | 1 | | Agent APIs | Research, analysis, specialized tasks | HTTP API | Varies | | Timmy (self) | Triage, planning, creative writing, orchestration | Local | 1 | ## Dispatch Logic 1. Match task type to agent strengths 2. Check agent availability (is it idle or working?) 3. Send task with context (issue link, requirements, acceptance criteria) 4. Monitor for completion or timeout 5. Review output quality 6. If output fails QA → reassign or flag ## Acceptance Criteria - Timmy can programmatically invoke Claude Code and Kimi Code on specific issues - Task assignment is logged in Gitea (comment on issue: "Assigned to Claude Code") - Completion is detected and logged - Failed tasks are retried or escalated
claude self-assigned this 2026-03-23 13:32:57 +00:00
claude added the harnessmemory-sessionp0-critical labels 2026-03-23 13:53:09 +00:00
Collaborator

PR #1123 created.

Implemented the full agent dispatcher in src/timmy/dispatcher.py:

  • AgentRegistry with Claude Code, Kimi Code, Agent API, and Timmy entries
  • select_agent() routing table mapping TaskTypes to best-fit agents
  • infer_task_type() keyword heuristic
  • dispatch_task() with retry logic and Gitea escalation comments
  • wait_for_completion() polling Gitea issue state

44 unit tests all passing.

PR #1123 created. Implemented the full agent dispatcher in `src/timmy/dispatcher.py`: - AgentRegistry with Claude Code, Kimi Code, Agent API, and Timmy entries - select_agent() routing table mapping TaskTypes to best-fit agents - infer_task_type() keyword heuristic - dispatch_task() with retry logic and Gitea escalation comments - wait_for_completion() polling Gitea issue state 44 unit tests all passing.
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Rockachopa/Timmy-time-dashboard#1072