Agent Orchestrator
Interfaces
Interfaces
ClaudeAgentConfig
Claude Agent SDK configuration options
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
apiKey | string | Yes | Anthropic API key |
model | string | undefined | No | Claude model to use |
cwd | string | undefined | No | Working directory for file operations |
maxTurns | number | undefined | No | Maximum number of conversation turns |
customSystemPrompt | string | undefined | No | Custom system prompt (will be appended to base prompt) |
verbose | boolean | undefined | No | Enable verbose logging |
AgentExecutionResult
Execution result from Claude Agent SDK
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
success | boolean | Yes | Whether the execution was successful |
message | string | Yes | Result message or error |
filesModified | string[] | undefined | No | Files modified during execution |
commandsExecuted | string[] | undefined | No | Commands executed |
conversationHistory | { role: "user" | "assistant"; content: string; timestamp: string; }[] | undefined | No | Full conversation history |
error | { message: string; stack?: string; code?: string; } | undefined | No | Error details if execution failed |
HeadlessExecutionConfig
Headless execution configuration
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
client | IRxDBClient | Yes | RxDB client for approval workflow and output persistence |
orgId | string | Yes | Organization ID for approval requests |
userId | string | Yes | User ID for approval requests |
taskId | string | Yes | Task ID for tracking |
projectId | string | undefined | No | Project ID for approval requests (optional) |
conversationConfig | Partial<ConversationConfig> | undefined | No | Conversation configuration (optional) |
serverUrl | string | Yes | RxDB server URL for REST client operations |
authToken | string | Yes | Authentication token for REST client |
domainId | string | Yes | Domain ID for REST client |
logger | LoggingService | undefined | No | Logging service for persisting logs to database (optional) |
ClaudeHeadlessOutput
JSON output from Claude Code headless mode (actual format)
Claude Code --output-format json returns a different structure than initially expected. This interface matches the actual output format.
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Result type (e.g., "result") |
subtype | string | Yes | Result subtype (e.g., "success", "error") |
is_error | boolean | Yes | Whether this is an error |
duration_ms | number | Yes | Duration in milliseconds |
duration_api_ms | number | Yes | API duration in milliseconds |
num_turns | number | Yes | Number of conversation turns |
result | string | Yes | Result message |
session_id | string | Yes | Session ID |
total_cost_usd | number | Yes | Total cost in USD |
usage | { input_tokens: number; cache_creation_input_tokens: number; cache_read_input_tokens: number; output_tokens: number; server_tool_use?: { web_search_requests: number; }; service_tier: string; cache_creation?: { ephemeral_1h_input_tokens: number; ephemeral_5m_input_tokens: number; }; } | Yes | Token usage statistics |
modelUsage | Record<string, any> | Yes | Model usage (empty object in current format) |
permission_denials | any[] | Yes | Permission denials |
uuid | string | Yes | Unique identifier |
LogEntry
Log entry structure
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
timestamp | string | Yes | Timestamp (ISO 8601) |
level | LogLevel | Yes | Log level |
source | string | Yes | Log source (orchestrator, worker, executor, etc.) |
message | string | Yes | Log message |
context | Record<string, any> | undefined | No | Additional context data |
error | { message: string; stack?: string; code?: string; } | undefined | No | Error details if applicable |
ConversationEntry
Conversation turn entry
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
timestamp | string | Yes | Timestamp (ISO 8601) |
turn | number | Yes | Turn number (1-indexed) |
role | "user" | "assistant" | Yes | Role (user or assistant) |
content | string | Yes | Message content |
metadata | Record<string, any> | undefined | No | Additional metadata |
FileChangeEntry
File change entry
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
timestamp | string | Yes | Timestamp (ISO 8601) |
path | string | Yes | File path relative to working directory |
type | "created" | "modified" | "deleted" | Yes | Change type |
size | number | undefined | No | File size in bytes |
content | string | undefined | No | File content snapshot (for small files) |
metadata | Record<string, any> | undefined | No | Additional metadata |
FileSystemLoggerConfig
FileSystem Logger configuration
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
taskId | string | Yes | Task ID (used for directory name) |
baseLogsPath | string | undefined | No | Base logs directory path |
source | string | Yes | Log source identifier (orchestrator, worker, etc.) |
inContainer | boolean | undefined | No | Whether running in container (affects path resolution) |
verbose | boolean | undefined | No | Enable verbose logging to console |
WorktreeConfig
Git worktree configuration
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
basePath | string | undefined | No | Base path for all git worktrees |
maxWorktrees | number | undefined | No | Maximum number of concurrent worktrees |
verbose | boolean | undefined | No | Enable verbose logging |
WorktreeInfo
Worktree information
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique worktree ID |
path | string | Yes | Absolute path to worktree directory |
branch | string | Yes | Branch name |
taskId | string | Yes | Task ID associated with this worktree |
codebaseId | string | Yes | Codebase ID |
repoUrl | string | Yes | Repository URL |
createdAt | Date | Yes | Created timestamp |
lastAccessedAt | Date | Yes | Last accessed timestamp |
OrchestratorConfig
Orchestrator configuration
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
agentId | string | Yes | Unique orchestrator agent ID |
orgId | string | Yes | Organization ID |
serverUrl | string | Yes | RxDB server URL |
authToken | string | Yes | Authentication token |
domainId | string | Yes | Domain ID |
collections | string[] | Yes | Collections to replicate |
pollInterval | number | undefined | No | Polling interval in milliseconds |
maxWorkers | number | undefined | No | Maximum concurrent workers |
maxRetries | number | undefined | No | Maximum connection retries |
verbose | boolean | undefined | No | Enable verbose logging |
OrchestratorStats
Orchestrator statistics
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
activeWorkers | number | Yes | |
maxWorkers | number | Yes | |
availableWorkerSlots | number | Yes | |
pollCount | number | Yes | |
tasksProcessed | number | Yes | |
uptime | number | Yes |
QueueEntry
Queue entry with priority information
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
task | TaskModel | Yes | Task document |
priority | TaskPriority | Yes | Priority level (1=highest, 3=lowest) |
addedAt | Date | Yes | When the task was added to queue |
lastHeartbeat | Date | undefined | No | Last heartbeat update |
attempts | number | Yes | Number of execution attempts |
TaskQueueConfig
Task queue configuration
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
agentId | string | Yes | Agent ID to filter tasks by |
orgId | string | Yes | Organization ID to filter by |
serverUrl | string | Yes | RxDB server URL (for REST client) |
authToken | string | Yes | Authentication token (for REST client) |
domainId | string | Yes | Domain ID (for REST client) |
heartbeatInterval | number | undefined | No | Heartbeat interval in milliseconds |
maxRetries | number | undefined | No | Maximum retry attempts for blocked tasks |
verbose | boolean | undefined | No | Enable verbose logging |
AgentConfig
Agent Types
Type definitions for autonomous agent system
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
agentId | string | Yes | Agent identification |
agentName | string | Yes | |
autoApprove | ApprovalPhase[] | Yes | Approval behavior |
manualApprove | ApprovalPhase[] | Yes | |
maxRetries | number | Yes | Execution settings |
retryDelayMs | number | Yes | |
maxConcurrentTasks | number | Yes | |
logLevel | "debug" | "info" | "warn" | "error" | Yes | Logging configuration |
logToFile | boolean | undefined | No | |
logFilePath | string | undefined | No | |
serverUrl | string | Yes | RxDB connection |
authToken | string | Yes | |
domainId | string | Yes | |
userId | string | Yes | |
orgId | string | Yes | |
collections | string[] | Yes | |
claudeApiKey | string | undefined | No | Claude API configuration |
claudeModel | string | undefined | No | |
claudeMaxTokens | number | undefined | No |
AgentExecutionContext
Agent execution context
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
specName | string | Yes | |
projectId | string | undefined | No | |
currentPhase | string | undefined | No | |
startedAt | string | Yes | |
lastActivityAt | string | Yes | |
status | "initializing" | "running" | "paused" | "completed" | "failed" | Yes | |
error | string | undefined | No |
WorkflowStepResult
Workflow step result
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
success | boolean | Yes | |
phase | string | Yes | |
action | string | Yes | |
message | string | Yes | |
data | any | No | |
error | string | undefined | No |
TaskExecutionResult
Task execution result
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
success | boolean | Yes | |
taskId | string | Yes | |
taskNumber | string | Yes | |
status | string | Yes | |
message | string | Yes | |
error | string | undefined | No | |
logs | string[] | undefined | No |
ApprovalDecision
Approval decision
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
approved | boolean | Yes | |
requiresManualReview | boolean | Yes | |
phase | string | Yes | |
message | string | Yes |
WorkerAgentConfig
Worker agent configuration
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
taskId | string | Yes | Task ID to execute |
serverUrl | string | Yes | RxDB server URL |
authToken | string | Yes | Authentication token |
domainId | string | Yes | Domain ID |
orgId | string | Yes | Organization ID |
agentId | string | Yes | Agent ID |
collections | string[] | Yes | Collections to replicate |
maxRetries | number | undefined | No | Maximum connection retries |
worktreeBasePath | string | undefined | No | Git worktree base path |
anthropicApiKey | string | undefined | No | Anthropic API key |
TaskExecutionResult
Task execution result
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
success | boolean | Yes | Execution success status |
filesModified | string[] | undefined | No | Files modified during execution |
commandsExecuted | string[] | undefined | No | Commands executed |
output | string | undefined | No | Execution output |
error | string | undefined | No | Error message if failed |
needsHumanInput | boolean | undefined | No | Whether agent needs human input |
question | string | undefined | No | Question for human if input needed |
context | any | No | Context for the question |
WorkerInfo
Worker information
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
workerId | string | Yes | Unique worker ID |
containerId | string | Yes | Docker container ID |
taskId | string | Yes | Task ID being processed |
status | "running" | "completed" | "failed" | "starting" | Yes | Worker status |
startedAt | Date | Yes | Started timestamp |
completedAt | Date | undefined | No | Completed/failed timestamp |
error | string | undefined | No | Error message if failed |
CircuitBreakerConfig
Circuit Breaker
Prevents cascading failures by temporarily disabling unhealthy providers.
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
failureThreshold | number | undefined | No | |
openDurationMs | number | undefined | No |
LLMExecutor
LLM Executor
Abstract interface for executing coding tasks with any LLM provider.
ConversationTurn
LLM Executor Types
Provider-agnostic types for LLM execution results and configuration.
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
role | "user" | "assistant" | "system" | Yes | |
content | string | Yes | |
timestamp | string | undefined | No |
TokenUsage
Token usage statistics
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
inputTokens | number | Yes | |
outputTokens | number | Yes | |
cacheCreationTokens | number | undefined | No | |
cacheReadTokens | number | undefined | No |
ExecutionDuration
Execution duration metrics
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
totalMs | number | Yes | |
apiMs | number | Yes |
ExecutionError
Execution error details
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
message | string | Yes | |
stack | string | undefined | No | |
retryable | boolean | Yes |
ExecutionResult
Provider-agnostic execution result
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
success | boolean | Yes | |
message | string | undefined | No | |
conversationHistory | ConversationTurn[] | Yes | |
filesModified | string[] | undefined | No | |
commandsExecuted | string[] | undefined | No | |
usage | TokenUsage | Yes | |
cost | number | undefined | No | |
duration | ExecutionDuration | Yes | |
error | ExecutionError | undefined | No |
ExecutionParams
Parameters for LLM execution
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
taskId | string | Yes | |
taskPrompt | string | Yes | |
systemPrompt | string | Yes | |
workingDirectory | string | Yes | |
maxTurns | number | undefined | No | |
temperature | number | undefined | No | |
maxTokens | number | undefined | No |
ProviderInfo
Provider information
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
name | string | Yes | |
model | string | Yes | |
endpoint | string | undefined | No | |
capabilities | { streaming: boolean; functionCalling: boolean; contextWindow: number; } | Yes |
HealthStatus
Health check status
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
healthy | boolean | Yes | |
provider | string | Yes | |
latencyMs | number | undefined | No | |
message | string | undefined | No |
OllamaConfig
Ollama provider configuration
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
endpoint | string | Yes | |
model | string | Yes |
VLLMConfig
vLLM provider configuration
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
endpoint | string | Yes | |
model | string | Yes | |
apiKey | string | undefined | No |
ClaudeConfig
Claude provider configuration
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
model | string | Yes | |
apiKey | string | undefined | No | |
cliPath | string | undefined | No |
OpenAIConfig
OpenAI provider configuration
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
endpoint | string | undefined | No | |
model | string | Yes | |
apiKey | string | Yes |
LLMExecutorConfig
LLM executor configuration
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
defaultProvider | "claude" | "ollama" | "vllm" | "openai" | Yes | |
hybridMode | { enabled: boolean; simpleProvider: string; complexProvider: string; } | undefined | No | |
providers | { claude?: ClaudeConfig; ollama?: OllamaConfig; vllm?: VLLMConfig; openai?: OpenAIConfig; } | Yes |
HttpClientConfig
HTTP Client Utility
Simple HTTP client with timeout and retry support for LLM API calls.
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
timeout | number | undefined | No | |
retries | number | undefined | No | |
headers | Record<string, string> | undefined | No |
HttpResponse
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
status | number | Yes | |
statusText | string | Yes | |
headers | Headers | Yes | |
data | T | Yes |