agent-relay-sdk 2.3.15__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- agent_relay_sdk-2.3.15/.gitignore +78 -0
- agent_relay_sdk-2.3.15/PKG-INFO +153 -0
- agent_relay_sdk-2.3.15/README.md +141 -0
- agent_relay_sdk-2.3.15/agent_relay/__init__.py +21 -0
- agent_relay_sdk-2.3.15/agent_relay/models.py +206 -0
- agent_relay_sdk-2.3.15/pyproject.toml +23 -0
- agent_relay_sdk-2.3.15/src/agent_relay/__init__.py +103 -0
- agent_relay_sdk-2.3.15/src/agent_relay/builder.py +692 -0
- agent_relay_sdk-2.3.15/src/agent_relay/templates.py +197 -0
- agent_relay_sdk-2.3.15/src/agent_relay/types.py +581 -0
- agent_relay_sdk-2.3.15/tests/__init__.py +0 -0
- agent_relay_sdk-2.3.15/tests/test_builder.py +215 -0
- agent_relay_sdk-2.3.15/tests/test_workflow_templates.py +450 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# Dependencies
|
|
2
|
+
node_modules/
|
|
3
|
+
|
|
4
|
+
# Build output
|
|
5
|
+
dist/
|
|
6
|
+
ui-dist/
|
|
7
|
+
|
|
8
|
+
# Release binaries (created by scripts/build-bun.sh)
|
|
9
|
+
.release/
|
|
10
|
+
|
|
11
|
+
# Bundled binaries (downloaded/built at install time)
|
|
12
|
+
bin/tmux
|
|
13
|
+
bin/relay-pty
|
|
14
|
+
bin/relay-pty-*
|
|
15
|
+
bin/agent-relay-test
|
|
16
|
+
|
|
17
|
+
# Rust build artifacts
|
|
18
|
+
target/
|
|
19
|
+
|
|
20
|
+
# TypeScript build info (if enabled later)
|
|
21
|
+
*.tsbuildinfo
|
|
22
|
+
|
|
23
|
+
# Logs
|
|
24
|
+
*.log
|
|
25
|
+
npm-debug.log*
|
|
26
|
+
yarn-debug.log*
|
|
27
|
+
yarn-error.log*
|
|
28
|
+
pnpm-debug.log*
|
|
29
|
+
|
|
30
|
+
# OS / editor
|
|
31
|
+
.DS_Store
|
|
32
|
+
.vscode/
|
|
33
|
+
.idea/
|
|
34
|
+
.claude/settings.local.json
|
|
35
|
+
.gemini/settings.json
|
|
36
|
+
|
|
37
|
+
# Relay runtime artifacts
|
|
38
|
+
*.sock
|
|
39
|
+
*.pid
|
|
40
|
+
|
|
41
|
+
# Local test artifacts
|
|
42
|
+
.agent-relay-test-*/
|
|
43
|
+
.tmp/
|
|
44
|
+
.tmp-*/
|
|
45
|
+
|
|
46
|
+
# Git worktrees (development only)
|
|
47
|
+
.worktrees/
|
|
48
|
+
|
|
49
|
+
# Coverage output
|
|
50
|
+
coverage/
|
|
51
|
+
.npm-cache
|
|
52
|
+
|
|
53
|
+
.next
|
|
54
|
+
|
|
55
|
+
# Next.js build output
|
|
56
|
+
**/out/
|
|
57
|
+
|
|
58
|
+
.env.local
|
|
59
|
+
.env
|
|
60
|
+
.env.production
|
|
61
|
+
codex.toml
|
|
62
|
+
|
|
63
|
+
# Turborepo
|
|
64
|
+
.turbo/
|
|
65
|
+
.build-standalone/
|
|
66
|
+
bin/agent-relay-bundle
|
|
67
|
+
bin/agent-relay-standalone
|
|
68
|
+
|
|
69
|
+
# SDK bundled broker binary (built/downloaded at install time)
|
|
70
|
+
packages/sdk/bin/agent-relay-broker*
|
|
71
|
+
packages/broker-sdk/
|
|
72
|
+
|
|
73
|
+
# Python
|
|
74
|
+
__pycache__/
|
|
75
|
+
*.pyc
|
|
76
|
+
*.pyo
|
|
77
|
+
*.egg-info/
|
|
78
|
+
.pytest_cache/
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: agent-relay-sdk
|
|
3
|
+
Version: 2.3.15
|
|
4
|
+
Summary: Python SDK for Agent Relay workflows
|
|
5
|
+
License-Expression: Apache-2.0
|
|
6
|
+
Requires-Python: >=3.10
|
|
7
|
+
Requires-Dist: pyyaml>=6.0
|
|
8
|
+
Provides-Extra: dev
|
|
9
|
+
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
|
|
10
|
+
Requires-Dist: pytest>=8.0; extra == 'dev'
|
|
11
|
+
Description-Content-Type: text/markdown
|
|
12
|
+
|
|
13
|
+
# Agent Relay Python SDK
|
|
14
|
+
|
|
15
|
+
Python SDK for defining and running Agent Relay workflows with the same schema and
|
|
16
|
+
builder capabilities as the TypeScript workflow SDK.
|
|
17
|
+
|
|
18
|
+
The SDK builds workflow config and executes it through:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
agent-relay run <workflow.yaml>
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Install
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
pip install agent-relay
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Builder API
|
|
31
|
+
|
|
32
|
+
```python
|
|
33
|
+
from agent_relay import workflow, VerificationCheck
|
|
34
|
+
|
|
35
|
+
result = (
|
|
36
|
+
workflow("ship-feature")
|
|
37
|
+
.description("Plan, build, and verify a feature")
|
|
38
|
+
.pattern("dag")
|
|
39
|
+
.max_concurrency(3)
|
|
40
|
+
.timeout(60 * 60 * 1000)
|
|
41
|
+
.channel("feature-channel")
|
|
42
|
+
.idle_nudge(nudge_after_ms=120_000, escalate_after_ms=120_000, max_nudges=1)
|
|
43
|
+
.trajectories(enabled=True, reflect_on_converge=True)
|
|
44
|
+
.agent("planner", cli="claude", role="Planning lead")
|
|
45
|
+
.agent(
|
|
46
|
+
"builder",
|
|
47
|
+
cli="codex",
|
|
48
|
+
role="Implementation engineer",
|
|
49
|
+
interactive=False,
|
|
50
|
+
idle_threshold_secs=45,
|
|
51
|
+
retries=1,
|
|
52
|
+
)
|
|
53
|
+
.step("plan", agent="planner", task="Create a detailed plan")
|
|
54
|
+
.step(
|
|
55
|
+
"build",
|
|
56
|
+
agent="builder",
|
|
57
|
+
task="Implement the approved plan",
|
|
58
|
+
depends_on=["plan"],
|
|
59
|
+
verification=VerificationCheck(type="output_contains", value="DONE"),
|
|
60
|
+
)
|
|
61
|
+
.run()
|
|
62
|
+
)
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Workflow Templates
|
|
66
|
+
|
|
67
|
+
Built-in template helpers are provided for common patterns:
|
|
68
|
+
|
|
69
|
+
- `fan_out(...)`
|
|
70
|
+
- `pipeline(...)`
|
|
71
|
+
- `dag(...)`
|
|
72
|
+
|
|
73
|
+
```python
|
|
74
|
+
from agent_relay import fan_out
|
|
75
|
+
|
|
76
|
+
builder = fan_out(
|
|
77
|
+
"parallel-analysis",
|
|
78
|
+
tasks=[
|
|
79
|
+
"Analyze backend modules and summarize risks",
|
|
80
|
+
"Analyze frontend modules and summarize risks",
|
|
81
|
+
],
|
|
82
|
+
synthesis_task="Synthesize both analyses into one prioritized action plan",
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
config = builder.to_config()
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
```python
|
|
89
|
+
from agent_relay import pipeline, PipelineStage
|
|
90
|
+
|
|
91
|
+
builder = pipeline(
|
|
92
|
+
"release-pipeline",
|
|
93
|
+
stages=[
|
|
94
|
+
PipelineStage(name="plan", task="Create release plan"),
|
|
95
|
+
PipelineStage(name="implement", task="Implement planned changes"),
|
|
96
|
+
PipelineStage(name="verify", task="Validate and produce release notes"),
|
|
97
|
+
],
|
|
98
|
+
)
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Event Callbacks
|
|
102
|
+
|
|
103
|
+
Execution callbacks receive typed workflow events parsed from CLI workflow logs.
|
|
104
|
+
|
|
105
|
+
```python
|
|
106
|
+
from agent_relay import run_yaml, RunOptions
|
|
107
|
+
|
|
108
|
+
def on_event(event):
|
|
109
|
+
print(event.type, event)
|
|
110
|
+
|
|
111
|
+
result = run_yaml(
|
|
112
|
+
"workflows/release.yaml",
|
|
113
|
+
RunOptions(workflow="release", on_event=on_event),
|
|
114
|
+
)
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Supported event types:
|
|
118
|
+
|
|
119
|
+
- `run:started`
|
|
120
|
+
- `run:completed`
|
|
121
|
+
- `run:failed`
|
|
122
|
+
- `run:cancelled`
|
|
123
|
+
- `step:started`
|
|
124
|
+
- `step:completed`
|
|
125
|
+
- `step:failed`
|
|
126
|
+
- `step:skipped`
|
|
127
|
+
- `step:retrying`
|
|
128
|
+
- `step:nudged`
|
|
129
|
+
- `step:force-released`
|
|
130
|
+
|
|
131
|
+
## YAML Workflow Execution
|
|
132
|
+
|
|
133
|
+
```python
|
|
134
|
+
from agent_relay import run_yaml, RunOptions
|
|
135
|
+
|
|
136
|
+
result = run_yaml(
|
|
137
|
+
"workflows/daytona-migration.yaml",
|
|
138
|
+
RunOptions(
|
|
139
|
+
workflow="main",
|
|
140
|
+
trajectories=False, # override YAML trajectory config at runtime
|
|
141
|
+
vars={"target": "staging"},
|
|
142
|
+
),
|
|
143
|
+
)
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
## Requirements
|
|
147
|
+
|
|
148
|
+
- Python 3.10+
|
|
149
|
+
- `agent-relay` CLI installed (`npm install -g agent-relay`)
|
|
150
|
+
|
|
151
|
+
## License
|
|
152
|
+
|
|
153
|
+
Apache-2.0 -- Copyright 2025-2026 Agent Workforce Incorporated
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
# Agent Relay Python SDK
|
|
2
|
+
|
|
3
|
+
Python SDK for defining and running Agent Relay workflows with the same schema and
|
|
4
|
+
builder capabilities as the TypeScript workflow SDK.
|
|
5
|
+
|
|
6
|
+
The SDK builds workflow config and executes it through:
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
agent-relay run <workflow.yaml>
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Install
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
pip install agent-relay
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Builder API
|
|
19
|
+
|
|
20
|
+
```python
|
|
21
|
+
from agent_relay import workflow, VerificationCheck
|
|
22
|
+
|
|
23
|
+
result = (
|
|
24
|
+
workflow("ship-feature")
|
|
25
|
+
.description("Plan, build, and verify a feature")
|
|
26
|
+
.pattern("dag")
|
|
27
|
+
.max_concurrency(3)
|
|
28
|
+
.timeout(60 * 60 * 1000)
|
|
29
|
+
.channel("feature-channel")
|
|
30
|
+
.idle_nudge(nudge_after_ms=120_000, escalate_after_ms=120_000, max_nudges=1)
|
|
31
|
+
.trajectories(enabled=True, reflect_on_converge=True)
|
|
32
|
+
.agent("planner", cli="claude", role="Planning lead")
|
|
33
|
+
.agent(
|
|
34
|
+
"builder",
|
|
35
|
+
cli="codex",
|
|
36
|
+
role="Implementation engineer",
|
|
37
|
+
interactive=False,
|
|
38
|
+
idle_threshold_secs=45,
|
|
39
|
+
retries=1,
|
|
40
|
+
)
|
|
41
|
+
.step("plan", agent="planner", task="Create a detailed plan")
|
|
42
|
+
.step(
|
|
43
|
+
"build",
|
|
44
|
+
agent="builder",
|
|
45
|
+
task="Implement the approved plan",
|
|
46
|
+
depends_on=["plan"],
|
|
47
|
+
verification=VerificationCheck(type="output_contains", value="DONE"),
|
|
48
|
+
)
|
|
49
|
+
.run()
|
|
50
|
+
)
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Workflow Templates
|
|
54
|
+
|
|
55
|
+
Built-in template helpers are provided for common patterns:
|
|
56
|
+
|
|
57
|
+
- `fan_out(...)`
|
|
58
|
+
- `pipeline(...)`
|
|
59
|
+
- `dag(...)`
|
|
60
|
+
|
|
61
|
+
```python
|
|
62
|
+
from agent_relay import fan_out
|
|
63
|
+
|
|
64
|
+
builder = fan_out(
|
|
65
|
+
"parallel-analysis",
|
|
66
|
+
tasks=[
|
|
67
|
+
"Analyze backend modules and summarize risks",
|
|
68
|
+
"Analyze frontend modules and summarize risks",
|
|
69
|
+
],
|
|
70
|
+
synthesis_task="Synthesize both analyses into one prioritized action plan",
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
config = builder.to_config()
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
```python
|
|
77
|
+
from agent_relay import pipeline, PipelineStage
|
|
78
|
+
|
|
79
|
+
builder = pipeline(
|
|
80
|
+
"release-pipeline",
|
|
81
|
+
stages=[
|
|
82
|
+
PipelineStage(name="plan", task="Create release plan"),
|
|
83
|
+
PipelineStage(name="implement", task="Implement planned changes"),
|
|
84
|
+
PipelineStage(name="verify", task="Validate and produce release notes"),
|
|
85
|
+
],
|
|
86
|
+
)
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Event Callbacks
|
|
90
|
+
|
|
91
|
+
Execution callbacks receive typed workflow events parsed from CLI workflow logs.
|
|
92
|
+
|
|
93
|
+
```python
|
|
94
|
+
from agent_relay import run_yaml, RunOptions
|
|
95
|
+
|
|
96
|
+
def on_event(event):
|
|
97
|
+
print(event.type, event)
|
|
98
|
+
|
|
99
|
+
result = run_yaml(
|
|
100
|
+
"workflows/release.yaml",
|
|
101
|
+
RunOptions(workflow="release", on_event=on_event),
|
|
102
|
+
)
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Supported event types:
|
|
106
|
+
|
|
107
|
+
- `run:started`
|
|
108
|
+
- `run:completed`
|
|
109
|
+
- `run:failed`
|
|
110
|
+
- `run:cancelled`
|
|
111
|
+
- `step:started`
|
|
112
|
+
- `step:completed`
|
|
113
|
+
- `step:failed`
|
|
114
|
+
- `step:skipped`
|
|
115
|
+
- `step:retrying`
|
|
116
|
+
- `step:nudged`
|
|
117
|
+
- `step:force-released`
|
|
118
|
+
|
|
119
|
+
## YAML Workflow Execution
|
|
120
|
+
|
|
121
|
+
```python
|
|
122
|
+
from agent_relay import run_yaml, RunOptions
|
|
123
|
+
|
|
124
|
+
result = run_yaml(
|
|
125
|
+
"workflows/daytona-migration.yaml",
|
|
126
|
+
RunOptions(
|
|
127
|
+
workflow="main",
|
|
128
|
+
trajectories=False, # override YAML trajectory config at runtime
|
|
129
|
+
vars={"target": "staging"},
|
|
130
|
+
),
|
|
131
|
+
)
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## Requirements
|
|
135
|
+
|
|
136
|
+
- Python 3.10+
|
|
137
|
+
- `agent-relay` CLI installed (`npm install -g agent-relay`)
|
|
138
|
+
|
|
139
|
+
## License
|
|
140
|
+
|
|
141
|
+
Apache-2.0 -- Copyright 2025-2026 Agent Workforce Incorporated
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"""Agent Relay Python SDK."""
|
|
2
|
+
|
|
3
|
+
from .models import (
|
|
4
|
+
CLIs,
|
|
5
|
+
CLIVersions,
|
|
6
|
+
CLI_REGISTRY,
|
|
7
|
+
DEFAULT_MODELS,
|
|
8
|
+
Models,
|
|
9
|
+
ModelOptions,
|
|
10
|
+
SwarmPatterns,
|
|
11
|
+
)
|
|
12
|
+
|
|
13
|
+
__all__ = [
|
|
14
|
+
"CLIs",
|
|
15
|
+
"CLIVersions",
|
|
16
|
+
"CLI_REGISTRY",
|
|
17
|
+
"DEFAULT_MODELS",
|
|
18
|
+
"Models",
|
|
19
|
+
"ModelOptions",
|
|
20
|
+
"SwarmPatterns",
|
|
21
|
+
]
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
"""
|
|
2
|
+
AUTO-GENERATED FILE - DO NOT EDIT
|
|
3
|
+
Generated from packages/shared/cli-registry.yaml
|
|
4
|
+
Run: npm run codegen:models
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from typing import Final, TypedDict, List
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class CLIVersions:
|
|
11
|
+
"""CLI tool versions. Update packages/shared/cli-registry.yaml to change versions."""
|
|
12
|
+
CLAUDE: Final[str] = "2.1.50" # Claude Code
|
|
13
|
+
CODEX: Final[str] = "0.104.0" # Codex CLI
|
|
14
|
+
GEMINI: Final[str] = "0.29.5" # Gemini CLI
|
|
15
|
+
CURSOR: Final[str] = "0.48.6" # Cursor
|
|
16
|
+
AIDER: Final[str] = "0.72.1" # Aider
|
|
17
|
+
GOOSE: Final[str] = "1.0.16" # Goose
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class CLIs:
|
|
21
|
+
"""Supported CLI tools."""
|
|
22
|
+
CLAUDE: Final[str] = "claude"
|
|
23
|
+
CODEX: Final[str] = "codex"
|
|
24
|
+
GEMINI: Final[str] = "gemini"
|
|
25
|
+
CURSOR: Final[str] = "cursor"
|
|
26
|
+
AIDER: Final[str] = "aider"
|
|
27
|
+
GOOSE: Final[str] = "goose"
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class ClaudeModels:
|
|
31
|
+
"""Claude Code model identifiers."""
|
|
32
|
+
SONNET: Final[str] = "sonnet" # Sonnet (default)
|
|
33
|
+
OPUS: Final[str] = "opus" # Opus
|
|
34
|
+
HAIKU: Final[str] = "haiku" # Haiku
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class CodexModels:
|
|
38
|
+
"""Codex CLI model identifiers."""
|
|
39
|
+
GPT_5_2_CODEX: Final[str] = "gpt-5.2-codex" # GPT-5.2 Codex — Frontier agentic coding model (default)
|
|
40
|
+
GPT_5_3_CODEX: Final[str] = "gpt-5.3-codex" # GPT-5.3 Codex — Latest frontier agentic coding model
|
|
41
|
+
GPT_5_3_CODEX_SPARK: Final[str] = "gpt-5.3-codex-spark" # GPT-5.3 Codex Spark — Ultra-fast coding model
|
|
42
|
+
GPT_5_1_CODEX_MAX: Final[str] = "gpt-5.1-codex-max" # GPT-5.1 Codex Max — Deep and fast reasoning
|
|
43
|
+
GPT_5_2: Final[str] = "gpt-5.2" # GPT-5.2 — Frontier model, knowledge & reasoning
|
|
44
|
+
GPT_5_1_CODEX_MINI: Final[str] = "gpt-5.1-codex-mini" # GPT-5.1 Codex Mini — Cheaper, faster
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
class GeminiModels:
|
|
48
|
+
"""Gemini CLI model identifiers."""
|
|
49
|
+
GEMINI_3_PRO_PREVIEW: Final[str] = "gemini-3-pro-preview" # Gemini 3 Pro Preview
|
|
50
|
+
GEMINI_2_5_PRO: Final[str] = "gemini-2.5-pro" # Gemini 2.5 Pro (default)
|
|
51
|
+
GEMINI_2_5_FLASH: Final[str] = "gemini-2.5-flash" # Gemini 2.5 Flash
|
|
52
|
+
GEMINI_2_5_FLASH_LITE: Final[str] = "gemini-2.5-flash-lite" # Gemini 2.5 Flash Lite
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
class CursorModels:
|
|
56
|
+
"""Cursor model identifiers."""
|
|
57
|
+
OPUS_4_5_THINKING: Final[str] = "opus-4.5-thinking" # Claude 4.5 Opus (Thinking) (default)
|
|
58
|
+
OPUS_4_5: Final[str] = "opus-4.5" # Claude 4.5 Opus
|
|
59
|
+
SONNET_4_5: Final[str] = "sonnet-4.5" # Claude 4.5 Sonnet
|
|
60
|
+
SONNET_4_5_THINKING: Final[str] = "sonnet-4.5-thinking" # Claude 4.5 Sonnet (Thinking)
|
|
61
|
+
GPT_5_2_CODEX: Final[str] = "gpt-5.2-codex" # GPT-5.2 Codex
|
|
62
|
+
GPT_5_2_CODEX_HIGH: Final[str] = "gpt-5.2-codex-high" # GPT-5.2 Codex High
|
|
63
|
+
GPT_5_2_CODEX_LOW: Final[str] = "gpt-5.2-codex-low" # GPT-5.2 Codex Low
|
|
64
|
+
GPT_5_2_CODEX_XHIGH: Final[str] = "gpt-5.2-codex-xhigh" # GPT-5.2 Codex Extra High
|
|
65
|
+
GPT_5_2_CODEX_FAST: Final[str] = "gpt-5.2-codex-fast" # GPT-5.2 Codex Fast
|
|
66
|
+
GPT_5_2_CODEX_HIGH_FAST: Final[str] = "gpt-5.2-codex-high-fast" # GPT-5.2 Codex High Fast
|
|
67
|
+
GPT_5_2_CODEX_LOW_FAST: Final[str] = "gpt-5.2-codex-low-fast" # GPT-5.2 Codex Low Fast
|
|
68
|
+
GPT_5_2_CODEX_XHIGH_FAST: Final[str] = "gpt-5.2-codex-xhigh-fast" # GPT-5.2 Codex Extra High Fast
|
|
69
|
+
GPT_5_1_CODEX_MAX: Final[str] = "gpt-5.1-codex-max" # GPT-5.1 Codex Max
|
|
70
|
+
GPT_5_1_CODEX_MAX_HIGH: Final[str] = "gpt-5.1-codex-max-high" # GPT-5.1 Codex Max High
|
|
71
|
+
GPT_5_2: Final[str] = "gpt-5.2" # GPT-5.2
|
|
72
|
+
GPT_5_2_HIGH: Final[str] = "gpt-5.2-high" # GPT-5.2 High
|
|
73
|
+
GPT_5_1_HIGH: Final[str] = "gpt-5.1-high" # GPT-5.1 High
|
|
74
|
+
GEMINI_3_PRO: Final[str] = "gemini-3-pro" # Gemini 3 Pro
|
|
75
|
+
GEMINI_3_FLASH: Final[str] = "gemini-3-flash" # Gemini 3 Flash
|
|
76
|
+
COMPOSER_1: Final[str] = "composer-1" # Composer 1
|
|
77
|
+
GROK: Final[str] = "grok" # Grok
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
class ModelOption(TypedDict):
|
|
81
|
+
"""Model option for UI dropdowns."""
|
|
82
|
+
value: str
|
|
83
|
+
label: str
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
CLAUDE_MODEL_OPTIONS: Final[List[ModelOption]] = [
|
|
87
|
+
{"value": "sonnet", "label": "Sonnet"},
|
|
88
|
+
{"value": "opus", "label": "Opus"},
|
|
89
|
+
{"value": "haiku", "label": "Haiku"},
|
|
90
|
+
]
|
|
91
|
+
|
|
92
|
+
CODEX_MODEL_OPTIONS: Final[List[ModelOption]] = [
|
|
93
|
+
{"value": "gpt-5.2-codex", "label": "GPT-5.2 Codex — Frontier agentic coding model"},
|
|
94
|
+
{"value": "gpt-5.3-codex", "label": "GPT-5.3 Codex — Latest frontier agentic coding model"},
|
|
95
|
+
{"value": "gpt-5.3-codex-spark", "label": "GPT-5.3 Codex Spark — Ultra-fast coding model"},
|
|
96
|
+
{"value": "gpt-5.1-codex-max", "label": "GPT-5.1 Codex Max — Deep and fast reasoning"},
|
|
97
|
+
{"value": "gpt-5.2", "label": "GPT-5.2 — Frontier model, knowledge & reasoning"},
|
|
98
|
+
{"value": "gpt-5.1-codex-mini", "label": "GPT-5.1 Codex Mini — Cheaper, faster"},
|
|
99
|
+
]
|
|
100
|
+
|
|
101
|
+
GEMINI_MODEL_OPTIONS: Final[List[ModelOption]] = [
|
|
102
|
+
{"value": "gemini-3-pro-preview", "label": "Gemini 3 Pro Preview"},
|
|
103
|
+
{"value": "gemini-2.5-pro", "label": "Gemini 2.5 Pro"},
|
|
104
|
+
{"value": "gemini-2.5-flash", "label": "Gemini 2.5 Flash"},
|
|
105
|
+
{"value": "gemini-2.5-flash-lite", "label": "Gemini 2.5 Flash Lite"},
|
|
106
|
+
]
|
|
107
|
+
|
|
108
|
+
CURSOR_MODEL_OPTIONS: Final[List[ModelOption]] = [
|
|
109
|
+
{"value": "opus-4.5-thinking", "label": "Claude 4.5 Opus (Thinking)"},
|
|
110
|
+
{"value": "opus-4.5", "label": "Claude 4.5 Opus"},
|
|
111
|
+
{"value": "sonnet-4.5", "label": "Claude 4.5 Sonnet"},
|
|
112
|
+
{"value": "sonnet-4.5-thinking", "label": "Claude 4.5 Sonnet (Thinking)"},
|
|
113
|
+
{"value": "gpt-5.2-codex", "label": "GPT-5.2 Codex"},
|
|
114
|
+
{"value": "gpt-5.2-codex-high", "label": "GPT-5.2 Codex High"},
|
|
115
|
+
{"value": "gpt-5.2-codex-low", "label": "GPT-5.2 Codex Low"},
|
|
116
|
+
{"value": "gpt-5.2-codex-xhigh", "label": "GPT-5.2 Codex Extra High"},
|
|
117
|
+
{"value": "gpt-5.2-codex-fast", "label": "GPT-5.2 Codex Fast"},
|
|
118
|
+
{"value": "gpt-5.2-codex-high-fast", "label": "GPT-5.2 Codex High Fast"},
|
|
119
|
+
{"value": "gpt-5.2-codex-low-fast", "label": "GPT-5.2 Codex Low Fast"},
|
|
120
|
+
{"value": "gpt-5.2-codex-xhigh-fast", "label": "GPT-5.2 Codex Extra High Fast"},
|
|
121
|
+
{"value": "gpt-5.1-codex-max", "label": "GPT-5.1 Codex Max"},
|
|
122
|
+
{"value": "gpt-5.1-codex-max-high", "label": "GPT-5.1 Codex Max High"},
|
|
123
|
+
{"value": "gpt-5.2", "label": "GPT-5.2"},
|
|
124
|
+
{"value": "gpt-5.2-high", "label": "GPT-5.2 High"},
|
|
125
|
+
{"value": "gpt-5.1-high", "label": "GPT-5.1 High"},
|
|
126
|
+
{"value": "gemini-3-pro", "label": "Gemini 3 Pro"},
|
|
127
|
+
{"value": "gemini-3-flash", "label": "Gemini 3 Flash"},
|
|
128
|
+
{"value": "composer-1", "label": "Composer 1"},
|
|
129
|
+
{"value": "grok", "label": "Grok"},
|
|
130
|
+
]
|
|
131
|
+
|
|
132
|
+
class Models:
|
|
133
|
+
"""All models grouped by CLI tool."""
|
|
134
|
+
Claude = ClaudeModels
|
|
135
|
+
Codex = CodexModels
|
|
136
|
+
Gemini = GeminiModels
|
|
137
|
+
Cursor = CursorModels
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
class ModelOptions:
|
|
141
|
+
"""All model options grouped by CLI tool (for UI dropdowns)."""
|
|
142
|
+
Claude = CLAUDE_MODEL_OPTIONS
|
|
143
|
+
Codex = CODEX_MODEL_OPTIONS
|
|
144
|
+
Gemini = GEMINI_MODEL_OPTIONS
|
|
145
|
+
Cursor = CURSOR_MODEL_OPTIONS
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
class SwarmPatterns:
|
|
149
|
+
"""Swarm patterns for multi-agent workflows."""
|
|
150
|
+
HUB_SPOKE: Final[str] = "hub-spoke" # Central coordinator distributes tasks to workers
|
|
151
|
+
DAG: Final[str] = "dag" # Directed acyclic graph with dependencies
|
|
152
|
+
FAN_OUT: Final[str] = "fan-out" # Parallel execution across multiple agents
|
|
153
|
+
PIPELINE: Final[str] = "pipeline" # Sequential processing through stages
|
|
154
|
+
CONSENSUS: Final[str] = "consensus" # Agents reach agreement before proceeding
|
|
155
|
+
MESH: Final[str] = "mesh" # Fully connected peer-to-peer communication
|
|
156
|
+
HANDOFF: Final[str] = "handoff" # Sequential handoff between agents
|
|
157
|
+
CASCADE: Final[str] = "cascade" # Cascading delegation
|
|
158
|
+
DEBATE: Final[str] = "debate" # Agents debate to reach conclusion
|
|
159
|
+
HIERARCHICAL: Final[str] = "hierarchical" # Tree-structured coordination
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
DEFAULT_MODELS: Final[dict] = {
|
|
163
|
+
"claude": "sonnet",
|
|
164
|
+
"codex": "gpt-5.2-codex",
|
|
165
|
+
"gemini": "gemini-2.5-pro",
|
|
166
|
+
"cursor": "opus-4.5-thinking",
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
CLI_REGISTRY: Final[dict] = {
|
|
170
|
+
"claude": {
|
|
171
|
+
"name": "Claude Code",
|
|
172
|
+
"package": "@anthropic-ai/claude-code",
|
|
173
|
+
"version": "2.1.50",
|
|
174
|
+
"install": "npm install -g @anthropic-ai/claude-code",
|
|
175
|
+
},
|
|
176
|
+
"codex": {
|
|
177
|
+
"name": "Codex CLI",
|
|
178
|
+
"package": "@openai/codex",
|
|
179
|
+
"version": "0.104.0",
|
|
180
|
+
"install": "npm install -g @openai/codex",
|
|
181
|
+
},
|
|
182
|
+
"gemini": {
|
|
183
|
+
"name": "Gemini CLI",
|
|
184
|
+
"package": "@google/gemini-cli",
|
|
185
|
+
"version": "0.29.5",
|
|
186
|
+
"install": "npm install -g @google/gemini-cli",
|
|
187
|
+
},
|
|
188
|
+
"cursor": {
|
|
189
|
+
"name": "Cursor",
|
|
190
|
+
"package": "cursor",
|
|
191
|
+
"version": "0.48.6",
|
|
192
|
+
"install": "Download from cursor.com",
|
|
193
|
+
},
|
|
194
|
+
"aider": {
|
|
195
|
+
"name": "Aider",
|
|
196
|
+
"package": "aider-chat",
|
|
197
|
+
"version": "0.72.1",
|
|
198
|
+
"install": "pip install aider-chat",
|
|
199
|
+
},
|
|
200
|
+
"goose": {
|
|
201
|
+
"name": "Goose",
|
|
202
|
+
"package": "goose-ai",
|
|
203
|
+
"version": "1.0.16",
|
|
204
|
+
"install": "pip install goose-ai",
|
|
205
|
+
},
|
|
206
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "agent-relay-sdk"
|
|
7
|
+
version = "2.3.15"
|
|
8
|
+
description = "Python SDK for Agent Relay workflows"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = "Apache-2.0"
|
|
11
|
+
requires-python = ">=3.10"
|
|
12
|
+
dependencies = [
|
|
13
|
+
"pyyaml>=6.0",
|
|
14
|
+
]
|
|
15
|
+
|
|
16
|
+
[project.optional-dependencies]
|
|
17
|
+
dev = [
|
|
18
|
+
"pytest>=8.0",
|
|
19
|
+
"pytest-asyncio>=0.23",
|
|
20
|
+
]
|
|
21
|
+
|
|
22
|
+
[tool.hatch.build.targets.wheel]
|
|
23
|
+
packages = ["src/agent_relay"]
|