Add Ruby agents support and shared playback integration tests - #29
Merged
Merged
Conversation
Adds the Ruby agents parity one-pager (mirror of the Confluence plan), the tools/streaming/teams/secrets/testing sub-specs, and the implementation plan that reconciles them against the Python SDK and the server-side agent API. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…te-v2
- Configuration caches the auth token per instance; class-level accessors stay
as a deprecated shim that warns once
- Task#runtime_metadata (wire-only secret values) and TaskDef#runtime_metadata
(declared secret names) plus TaskDef#enforce_schema
- TaskResourceApi#update_task_v2; TaskRunner prefers POST /tasks/update-v2 and
falls back to POST /tasks once on 404/405 (Python parity); Worker gains the
lease_extend_enabled option
- AgentResourceApi + AgentClient for /api/agent/* (start, deploy, compile,
status, execution, executions, respond/approve/reject, stop, signal, pause,
resume, cancel, list/get/delete) and OrkesClients#get_agent_client
- AgentApiError / AgentNotFoundError carrying the server's {error, status} body
- Dev deps: drop unused vcr, add json_schemer for agent contract tests
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
- ToolDef/ToolType with Python defaults and factories (http, api, mcp, human, agent, media, RAG, wait_for_message) - Tools DSL: `tool def` builds a ToolDef from keyword defaults via the method AST (city: String required, units: 'metric' optional, [String] arrays, %w[] enums), scans literal secret()/secrets_env() names as credentials, describe / requires_approval / tool_credentials, per-module lookup (Weather[:current]), global registry for Agent#add_tool(:name), RubyLLM::Tool adapter, AST-less fallback - Guardrail / RegexGuardrail / LlmGuardrail, Termination::* with & and |, Handoff::*, CallbackHandler, ConversationMemory, PromptTemplate - Agent with team/guardrail/termination/approval sugar (add_tool, add_agent, hands_off_to, redact, stop_when, stop_after, on_approval, >>) - ConfigSerializer: same wire shape as Python (camelCase, nil-compacted, agent credentials top-level, tool credentials under config), team parents inherit the first member's model, member hands_off_to hoists into a swarm team - Contract tests: vendored agent-schema.json + 19 golden configs from python-sdk; every golden serializes identically and validates; examples/agents/golden_agents.rb and dump_agent_configs.rb regenerate them Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… workers
- AgentRuntime: call_sync / call_async (POST /agent/start, register the workers the
server lists in requiredWorkers, stream on a background thread), deploy, compile,
serve, shutdown; Conductor::Agents.runtime default instance and .configure
- SseClient over Net::HTTP: incremental parser (comments, ids, multi-line data),
reconnect with Last-Event-ID, heartbeat-only detection, SseUnavailableError ->
StatusPoller fallback over GET /agent/{id}/status
- Execution (done?, waiting?, result with timeout, partial_text, finish_reason,
tool_calls, token_usage summed over sub-executions, pause/resume/cancel/stop/signal,
Execution.find) and ApprovalRequest (batch tool calls, argument accessors, approve /
reject / send_message posting the server's respond bodies); on_approval wiring with
execution.pending when no handler is registered
- Dispatch: strips server-injected keys (method, _agent_state, _agent_tool_name,
_allowed_commands), validates required args, coerces by JSON schema, wraps scalar
results, terminal failures for missing args/credentials/unserializable output
- Secrets.secret / secrets_env read Task#runtime_metadata via TaskContext, fall back to
ENV, never write ENV
- ToolRegistry builds Worker.define-style workers with Python's TaskDef defaults
(retry 2, LINEAR_BACKOFF, timeout 0, response timeout 10, RETRY, runtimeMetadata)
and SystemWorkers for <agent>_termination, custom guardrails, callbacks and
on_condition handoffs; unknown required workers are logged
- AgentConfig.from_env for CONDUCTOR_AGENT_* settings
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
- spec/agents/agents_helper.rb: `mocks: 'agent/tool_happy_path'` points the SDK at a WireMock replay of conductor-mocks (CONDUCTOR_AGENTS_REPLAY_URL, or a container started from CONDUCTOR_MOCKS_DIR), resets scenarios per example and fails when the SDK sent a request the recorded server never saw - spec/agents/replay/tool_happy_path_spec.rb: the one-pager weather agent end to end: start, TaskDef PUT, SSE stream, poll, in-process tool run, update-v2, done, token usage - CI: agents-replay job checks out conductor-oss/conductor-mocks, starts wiremock/wiremock:3x and runs spec/agents Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…angelog - examples/agents: weather.rb (tools), support_approval.rb (streaming + approval), bug_desk.rb (team + secret), matching the one-pager - docs/agents: README plus concepts for tools, calling/approval, teams, secrets, runtime and testing - README agents section and example table; AGENTS.md architecture, directory, test layout, docker test recipe and 'changing the agents wire format' checklist; DESIGN.md agents layer - CHANGELOG: agents feature, runtimeMetadata, update-v2, instance token cache, vcr removal - Plan: implementation status table and decisions 2.18-2.20 (update-v2, swarm hoisting for hands_off_to, run domain for every worker); notes in AGENT_TEAMS.md and the one-pager Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
v1r3n
approved these changes
Sep 24, 2026
ling-senpeng13
approved these changes
Sep 24, 2026
NicholasDCole
force-pushed
the
feature/conductor_agents
branch
from
September 24, 2026 18:23
ae9642c to
ccead57
Compare
kowser-orkes
approved these changes
Sep 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add Conductor-Agents parity to Ruby SDK
1.

health_advisorfailure is as expected --is a guardrail