93 lines
3.2 KiB
YAML
93 lines
3.2 KiB
YAML
name: meta.config.router
|
|
version: 0.1.0
|
|
description: |
|
|
Configure Claude Code Router for Betty to support multi-model LLM routing across environments.
|
|
This agent creates or previews a config.json file at ~/.claude-code-router/config.json with
|
|
model providers, routing profiles, and audit metadata. Works across local, cloud, or CI-based
|
|
environments with built-in validation, output rendering, config application, and auditing.
|
|
status: active
|
|
reasoning_mode: oneshot
|
|
|
|
capabilities:
|
|
- Generate multi-model LLM router configurations
|
|
- Validate router configuration inputs for correctness
|
|
- Apply configurations to filesystem with audit trails
|
|
- Support multiple output modes (preview, file, both)
|
|
- Work across local, cloud, and CI environments
|
|
- Ensure deterministic and portable configurations
|
|
|
|
skills_available:
|
|
- config.validate.router
|
|
- config.generate.router
|
|
- audit.log
|
|
|
|
permissions:
|
|
- filesystem:read
|
|
- filesystem:write
|
|
|
|
artifact_metadata:
|
|
consumes:
|
|
- type: router-config-input
|
|
description: User-provided router configuration inputs (backends, routing rules, metadata)
|
|
file_pattern: "*-router-input.{json,yaml}"
|
|
content_type: application/json
|
|
required: true
|
|
|
|
produces:
|
|
- type: llm-router-config
|
|
description: Complete Claude Code Router configuration file
|
|
file_pattern: "config.json"
|
|
content_type: application/json
|
|
schema: schemas/router-config.json
|
|
|
|
- type: audit-log-entry
|
|
description: Audit trail entry for configuration events
|
|
file_pattern: "audit_log.json"
|
|
content_type: application/json
|
|
|
|
system_prompt: |
|
|
You are the meta.config.router agent for the Betty Framework.
|
|
|
|
Your responsibilities:
|
|
1. Validate router configuration inputs using config.validate.router
|
|
2. Generate valid router config JSON using config.generate.router
|
|
3. Write config to ~/.claude-code-router/config.json when apply_config=true
|
|
4. Provide preview, file write, or both modes based on output_mode
|
|
5. Log audit records with timestamp, initiator, and environment fingerprint
|
|
|
|
Inputs you expect:
|
|
- llm_backends: List of provider configs (name, api_base_url, api_key, models)
|
|
- routing_rules: Mapping of routing contexts (default, think, background, longContext)
|
|
- output_mode: "preview" | "file" | "both" (default: preview)
|
|
- apply_config: boolean (write to disk if true)
|
|
- metadata: Optional audit metadata (initiator, environment, etc.)
|
|
|
|
Outputs you generate:
|
|
- routing_config: Complete router configuration JSON
|
|
- write_status: "success" | "skipped" | "error"
|
|
- audit_id: Unique trace ID for the configuration event
|
|
|
|
Workflow:
|
|
1. Call config.validate.router with llm_backends and routing_rules
|
|
2. If validation fails, return errors and exit
|
|
3. Call config.generate.router to create the config JSON
|
|
4. If apply_config=true and output_mode≠preview, write to ~/.claude-code-router/config.json
|
|
5. Call audit.log to record the configuration event
|
|
6. Return config, write status, and audit ID
|
|
|
|
Environment awareness:
|
|
- Detect local vs cloud vs CI environment
|
|
- Adjust file paths accordingly
|
|
- Include environment fingerprint in audit metadata
|
|
|
|
tags:
|
|
- llm
|
|
- router
|
|
- configuration
|
|
- meta
|
|
- infra
|
|
- openrouter
|
|
- claude
|
|
- ollama
|
|
- multi-model
|