agent-apprenticeship 0.2.1 → 0.3.0
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.
- package/README.md +261 -1
- package/bin/agent-apprenticeship.js +1 -2
- package/package.json +4 -4
- package/pyproject.toml +10 -4
- package/schemas/environment_replay.schema.json +41 -0
- package/schemas/eval_package.schema.json +37 -0
- package/schemas/experience_compilation.schema.json +53 -0
- package/schemas/runtime_training.schema.json +33 -0
- package/schemas/source_evidence_map.schema.json +25 -0
- package/schemas/trace.schema.json +904 -0
- package/schemas/trace_step.schema.json +622 -0
- package/schemas/training_rows.schema.json +29 -0
- package/src/{agent_apprenticeship_trace → agent_apprenticeship}/__init__.py +1 -1
- package/src/agent_apprenticeship/agent_env_exporter.py +53 -0
- package/src/agent_apprenticeship/agent_env_verify.py +32 -0
- package/src/agent_apprenticeship/atif.py +152 -0
- package/src/agent_apprenticeship/atif_models/LICENSE +201 -0
- package/src/agent_apprenticeship/atif_models/__init__.py +38 -0
- package/src/agent_apprenticeship/atif_models/agent.py +35 -0
- package/src/agent_apprenticeship/atif_models/content.py +159 -0
- package/src/agent_apprenticeship/atif_models/final_metrics.py +43 -0
- package/src/agent_apprenticeship/atif_models/metrics.py +47 -0
- package/src/agent_apprenticeship/atif_models/observation.py +19 -0
- package/src/agent_apprenticeship/atif_models/observation_result.py +45 -0
- package/src/agent_apprenticeship/atif_models/step.py +142 -0
- package/src/agent_apprenticeship/atif_models/subagent_trajectory_ref.py +88 -0
- package/src/agent_apprenticeship/atif_models/tool_call.py +34 -0
- package/src/agent_apprenticeship/atif_models/trajectory.py +196 -0
- package/src/{agent_apprenticeship_trace → agent_apprenticeship}/batch_runner.py +1 -1
- package/src/{agent_apprenticeship_trace → agent_apprenticeship}/bundle_exporter.py +8 -1
- package/src/{agent_apprenticeship_trace → agent_apprenticeship}/certification.py +1 -1
- package/src/{agent_apprenticeship_trace → agent_apprenticeship}/cli.py +26 -7
- package/src/{agent_apprenticeship_trace → agent_apprenticeship}/codex_runner.py +17 -17
- package/src/{agent_apprenticeship_trace → agent_apprenticeship}/config.py +1 -1
- package/src/{agent_apprenticeship_trace → agent_apprenticeship}/ecosystem_r2.py +3 -1
- package/src/{agent_apprenticeship_trace → agent_apprenticeship}/evaluator.py +8 -27
- package/src/{agent_apprenticeship_trace → agent_apprenticeship}/grader.py +6 -5
- package/src/{agent_apprenticeship_trace → agent_apprenticeship}/integration_status.py +1 -1
- package/src/agent_apprenticeship/io.py +104 -0
- package/src/{agent_apprenticeship_trace → agent_apprenticeship}/learning.py +7 -1
- package/src/{agent_apprenticeship_trace → agent_apprenticeship}/loop.py +5 -5
- package/src/{agent_apprenticeship_trace → agent_apprenticeship}/loop_review.py +1 -1
- package/src/{agent_apprenticeship_trace → agent_apprenticeship}/mentor_checkpoints.py +1 -1
- package/src/{agent_apprenticeship_trace → agent_apprenticeship}/package_exporter.py +5 -3
- package/src/{agent_apprenticeship_trace → agent_apprenticeship}/progress.py +1 -1
- package/src/{agent_apprenticeship_trace → agent_apprenticeship}/public_run.py +1 -1
- package/src/{agent_apprenticeship_trace → agent_apprenticeship}/public_sanitizer.py +2 -2
- package/src/{agent_apprenticeship_trace → agent_apprenticeship}/release_exporter.py +7 -4
- package/src/{agent_apprenticeship_trace → agent_apprenticeship}/rubric_generation.py +1 -1
- package/src/{agent_apprenticeship_trace → agent_apprenticeship}/schemas.py +17 -4
- package/src/{agent_apprenticeship_trace → agent_apprenticeship}/session_events.py +4 -4
- package/src/{agent_apprenticeship_trace → agent_apprenticeship}/task_intake.py +1 -1
- package/src/{agent_apprenticeship_trace → agent_apprenticeship}/tdo.py +5 -1
- package/src/agent_apprenticeship/trace_normalizer.py +103 -0
- package/src/agent_apprenticeship/trace_prompt.py +48 -0
- package/src/{agent_apprenticeship_trace → agent_apprenticeship}/training_signals.py +1 -1
- package/src/{agent_apprenticeship_trace → agent_apprenticeship}/validation.py +3 -3
- package/src/{agent_apprenticeship_trace → agent_apprenticeship}/verifier.py +6 -5
- package/docs/bioactive_evidence_mapping_schema.md +0 -113
- package/docs/dataset_schema.md +0 -160
- package/docs/local_usage.md +0 -191
- package/docs/scaling_to_1000_tasks.md +0 -3
- package/docs/trace_schema.md +0 -192
- package/docs/v0.2_release_notes.md +0 -63
- package/src/agent_apprenticeship_trace/io.py +0 -20
- package/src/agent_apprenticeship_trace/trace_normalizer.py +0 -1026
- package/src/agent_apprenticeship_trace/trace_prompt.py +0 -78
- /package/src/{agent_apprenticeship_trace → agent_apprenticeship}/actual_outputs_normalizer.py +0 -0
- /package/src/{agent_apprenticeship_trace → agent_apprenticeship}/apprentice_adapters.py +0 -0
- /package/src/{agent_apprenticeship_trace → agent_apprenticeship}/artifact_capture.py +0 -0
- /package/src/{agent_apprenticeship_trace → agent_apprenticeship}/artifact_previews.py +0 -0
- /package/src/{agent_apprenticeship_trace → agent_apprenticeship}/artifact_resolver.py +0 -0
- /package/src/{agent_apprenticeship_trace → agent_apprenticeship}/command_discovery.py +0 -0
- /package/src/{agent_apprenticeship_trace → agent_apprenticeship}/contract_diagnostics.py +0 -0
- /package/src/{agent_apprenticeship_trace → agent_apprenticeship}/contract_verifier.py +0 -0
- /package/src/{agent_apprenticeship_trace → agent_apprenticeship}/env.py +0 -0
- /package/src/{agent_apprenticeship_trace → agent_apprenticeship}/lesson_extractor.py +0 -0
- /package/src/{agent_apprenticeship_trace → agent_apprenticeship}/llm_output_normalizer.py +0 -0
- /package/src/{agent_apprenticeship_trace → agent_apprenticeship}/openai_structured.py +0 -0
- /package/src/{agent_apprenticeship_trace → agent_apprenticeship}/recipes.py +0 -0
- /package/src/{agent_apprenticeship_trace → agent_apprenticeship}/revision.py +0 -0
- /package/src/{agent_apprenticeship_trace → agent_apprenticeship}/role_runners.py +0 -0
- /package/src/{agent_apprenticeship_trace → agent_apprenticeship}/version.py +0 -0
package/README.md
CHANGED
|
@@ -1,17 +1,277 @@
|
|
|
1
|
+
# Agent Apprenticeship
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/agent-apprenticeship)
|
|
4
|
+
[](https://huggingface.co/datasets/rayrren/agent-apprenticeship-seed-dataset)
|
|
5
|
+
|
|
6
|
+
**Real-world agent work experience, looped into collective learning.**
|
|
7
|
+
|
|
1
8
|
The living ecosystem where AI agents complete tasks through workflow loops, improve through iterative execution, are evaluated by mentor agents or humans in the loop, and turn completed work into reusable work experience and data to improve future agents.
|
|
2
9
|
|
|
10
|
+
```bash
|
|
11
|
+
npx agent-apprenticeship init
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+

|
|
15
|
+
|
|
3
16
|
As agents move into long-horizon, economically valuable work, Agent Apprenticeship creates the open infrastructure where real-world tasks generate reusable learning signals and complex workflows advance through agent loops that turn execution into shared improvement.
|
|
4
17
|
|
|
5
18
|
Agent Apprenticeship is designed for a compounding exchange of agent work experience: economically valuable task execution generates training signals, those signals improve future work, and future work creates new reusable experience for the ecosystem.
|
|
6
19
|
|
|
7
20
|
Agent Apprenticeship is built for iterative workflow loops across domains, from simple tasks to complex specialized work. Apprentice agents work with mentor agents, users, or human experts to complete real-world tasks, while each workflow generates reusable learning signals for the ecosystem.
|
|
8
21
|
|
|
22
|
+
The latest seed dataset includes:
|
|
23
|
+
|
|
24
|
+
- 500+ curated seed tasks sourced and grounded from the real world
|
|
25
|
+
- 495 reusable agent lessons
|
|
26
|
+
- 1000+ full agent execution traces
|
|
27
|
+
- 1000+ agent work episodes / task rollouts
|
|
28
|
+
- 505 full agent work experience compilations
|
|
29
|
+
- 39k+ structured experience compilation records
|
|
30
|
+
|
|
31
|
+
The seed dataset spans specialized, economically valuable tasks across domains and forms the first layer of the Agent Apprenticeship ecosystem.
|
|
32
|
+
|
|
9
33
|
Agent Apprenticeship is now available for anyone to start using with local agents, including Codex, Cursor, Claude Code, OpenClaw, OpenCode, Hermes Agent, and custom agents, alongside different model providers. Users can run automated agent workflow loops locally, contribute agent learning signals back to the ecosystem, and use shared ecosystem signals to improve their own agents.
|
|
10
34
|
|
|
11
35
|
Agent Apprenticeship is about the future of work and the economic value of agents. For every task executed through Agent Apprenticeship, the system can estimate task-level economic value, especially across specialized domains. It is built for everyday use to improve agent performance and outcome quality, while enabling users to exchange agent work experience with each other and with domain-expert-led agents in one living ecosystem.
|
|
12
36
|
|
|
13
|
-
##
|
|
37
|
+
## Install
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
npx agent-apprenticeship init
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Or install globally:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
npm install -g agent-apprenticeship
|
|
47
|
+
apprentice init
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
The installed command is:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
apprentice
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
The long-form command also remains available:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
agent-apprenticeship
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Quickstart
|
|
63
|
+
|
|
64
|
+
Start Agent Apprenticeship:
|
|
14
65
|
|
|
15
66
|
```bash
|
|
16
67
|
npx agent-apprenticeship init
|
|
17
68
|
```
|
|
69
|
+
|
|
70
|
+
Use defaults:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
npx agent-apprenticeship init --defaults
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Check your setup:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
apprentice settings
|
|
80
|
+
apprentice doctor
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Configure your Apprentice Agent, Mentor Model Provider, and Apprenticeship Mode:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
apprentice configure
|
|
87
|
+
apprentice configure model
|
|
88
|
+
apprentice settings
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Apprenticeship Modes:
|
|
92
|
+
|
|
93
|
+
```text
|
|
94
|
+
Autonomous
|
|
95
|
+
Expert-Led
|
|
96
|
+
Organization Custom
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Store Mentor Model Provider keys in:
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
~/.agent-apprenticeship/.env.local
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Example:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
OPENAI_API_KEY=""
|
|
109
|
+
ANTHROPIC_API_KEY=""
|
|
110
|
+
GEMINI_API_KEY=""
|
|
111
|
+
OPENROUTER_API_KEY=""
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
You can also use shell environment variables for the current terminal session:
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
export OPENAI_API_KEY="..."
|
|
118
|
+
apprentice doctor
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
Run your first task:
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
apprentice run "Create a short market map for AI procurement tools."
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Watch progress:
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
apprentice watch <run_id>
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
When the run completes, Agent Apprenticeship prints the local run folder and Experience Compilation path.
|
|
134
|
+
|
|
135
|
+
Inspect the generated Experience Compilation:
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
apprentice ecosystem inspect <experience_compilation_path>
|
|
139
|
+
apprentice bundle check <experience_compilation_path>
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Export the Full Experience Compilation:
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
apprentice ecosystem export <experience_compilation_path> --full
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
Install Runtime Training from prior experience:
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
apprentice learn install <experience_compilation_path>
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
Use installed Runtime Training in a future run:
|
|
155
|
+
|
|
156
|
+
```bash
|
|
157
|
+
apprentice run "Create a release checklist for an AI agent project."
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
Configure maximum loop depth:
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
apprentice settings
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
For a one-off terminal session:
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
export AA_MAX_ITERATIONS=3
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
## Apprentice Agents
|
|
173
|
+
|
|
174
|
+
Available Apprentice Agents:
|
|
175
|
+
|
|
176
|
+
```text
|
|
177
|
+
Codex
|
|
178
|
+
Cursor
|
|
179
|
+
Claude Code
|
|
180
|
+
OpenClaw
|
|
181
|
+
OpenCode
|
|
182
|
+
Hermes Agent
|
|
183
|
+
Custom
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
Agent Apprenticeship auto-detects installed CLIs. If multiple are detected, choose one during setup.
|
|
187
|
+
|
|
188
|
+
Custom lets you provide a command template:
|
|
189
|
+
|
|
190
|
+
```bash
|
|
191
|
+
apprentice configure agent custom --command-template "my-agent run --workspace {workspace} --prompt-file {prompt_file}"
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
## Mentor Model Providers
|
|
195
|
+
|
|
196
|
+
Store local keys in:
|
|
197
|
+
|
|
198
|
+
```bash
|
|
199
|
+
~/.agent-apprenticeship/.env.local
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
Example:
|
|
203
|
+
|
|
204
|
+
```bash
|
|
205
|
+
OPENAI_API_KEY=""
|
|
206
|
+
ANTHROPIC_API_KEY=""
|
|
207
|
+
GEMINI_API_KEY=""
|
|
208
|
+
OPENROUTER_API_KEY=""
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
Configure:
|
|
212
|
+
|
|
213
|
+
```bash
|
|
214
|
+
apprentice configure model
|
|
215
|
+
apprentice doctor
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
## Public Ecosystem and Private Internal Only
|
|
219
|
+
|
|
220
|
+
Configure contribution mode:
|
|
221
|
+
|
|
222
|
+
```bash
|
|
223
|
+
apprentice settings
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
Modes:
|
|
227
|
+
|
|
228
|
+
```text
|
|
229
|
+
Public Ecosystem
|
|
230
|
+
Private Internal Only
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
Explore ecosystem experience:
|
|
234
|
+
|
|
235
|
+
```bash
|
|
236
|
+
apprentice ecosystem search <query>
|
|
237
|
+
apprentice ecosystem inspect <id>
|
|
238
|
+
apprentice ecosystem pull <id>
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
Export Full Experience Compilation:
|
|
242
|
+
|
|
243
|
+
```bash
|
|
244
|
+
apprentice ecosystem export <id_or_path> --full
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
Install Runtime Training:
|
|
248
|
+
|
|
249
|
+
```bash
|
|
250
|
+
apprentice learn install <id_or_path>
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
## Seed Dataset v0.2
|
|
254
|
+
|
|
255
|
+
Seed Dataset v0.2 is available on Hugging Face:
|
|
256
|
+
|
|
257
|
+
https://huggingface.co/datasets/Forsy-AI/agent-apprenticeship-seed-dataset_v0.2
|
|
258
|
+
|
|
259
|
+
It includes 505 full agent work experience compilations and 39k+ structured experience compilation records.
|
|
260
|
+
|
|
261
|
+
## Selected ALE Tasks Demo
|
|
262
|
+
|
|
263
|
+
Selected ALE workflow-family mirrored transfer tasks are included under:
|
|
264
|
+
|
|
265
|
+
```text
|
|
266
|
+
selected_ale_tasks_demo/
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
## Public Repo Structure
|
|
270
|
+
|
|
271
|
+
```text
|
|
272
|
+
bin/
|
|
273
|
+
src/
|
|
274
|
+
schemas/
|
|
275
|
+
examples/
|
|
276
|
+
selected_ale_tasks_demo/
|
|
277
|
+
```
|
|
@@ -274,7 +274,6 @@ async function ensureRuntime(python) {
|
|
|
274
274
|
"--disable-pip-version-check",
|
|
275
275
|
"--progress-bar", "off",
|
|
276
276
|
"--no-input",
|
|
277
|
-
"--no-build-isolation",
|
|
278
277
|
"--retries", "10",
|
|
279
278
|
"--timeout", "60",
|
|
280
279
|
packageRoot
|
|
@@ -297,7 +296,7 @@ function runCli(python, args, usePackagedSource) {
|
|
|
297
296
|
const srcPath = path.join(packageRoot, "src");
|
|
298
297
|
env.PYTHONPATH = env.PYTHONPATH ? `${srcPath}${path.delimiter}${env.PYTHONPATH}` : srcPath;
|
|
299
298
|
}
|
|
300
|
-
const result = spawnSync(python, ["-m", "
|
|
299
|
+
const result = spawnSync(python, ["-m", "agent_apprenticeship.cli", ...args], {
|
|
301
300
|
stdio: "inherit",
|
|
302
301
|
env
|
|
303
302
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-apprenticeship",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "The living ecosystem for AI agents learning from real-world work through iterative loops and training-signal exchange.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -14,13 +14,13 @@
|
|
|
14
14
|
"files": [
|
|
15
15
|
"README.md",
|
|
16
16
|
"LICENSE",
|
|
17
|
-
"
|
|
17
|
+
"schemas",
|
|
18
18
|
"pyproject.toml",
|
|
19
|
-
"src/
|
|
19
|
+
"src/agent_apprenticeship",
|
|
20
20
|
"bin"
|
|
21
21
|
],
|
|
22
22
|
"scripts": {
|
|
23
|
-
"test": "
|
|
23
|
+
"test": "python -m pytest -q tests",
|
|
24
24
|
"pack": "npm pack --dry-run",
|
|
25
25
|
"prepack": "find src bin -name __pycache__ -type d -prune -exec rm -rf {} + && find src bin -name '*.pyc' -delete",
|
|
26
26
|
"smoke": "PATH=./.venv/bin:$PATH AA_NPM_USE_SYSTEM_PYTHON=1 node ./bin/agent-apprenticeship.js --help"
|
package/pyproject.toml
CHANGED
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "agent-apprenticeship"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.3.0"
|
|
8
8
|
description = "Open framework for turning real agent work into transferable agent experience"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.11"
|
|
@@ -15,9 +15,15 @@ llm = ["openai>=2,<3"]
|
|
|
15
15
|
test = ["pytest>=8"]
|
|
16
16
|
|
|
17
17
|
[project.scripts]
|
|
18
|
-
apprentice = "
|
|
19
|
-
agent-apprenticeship = "
|
|
20
|
-
aa-trace = "
|
|
18
|
+
apprentice = "agent_apprenticeship.cli:main"
|
|
19
|
+
agent-apprenticeship = "agent_apprenticeship.cli:main"
|
|
20
|
+
aa-trace = "agent_apprenticeship.cli:main"
|
|
21
21
|
|
|
22
22
|
[tool.setuptools.packages.find]
|
|
23
23
|
where = ["src"]
|
|
24
|
+
|
|
25
|
+
[tool.setuptools.package-data]
|
|
26
|
+
"agent_apprenticeship.atif_models" = ["LICENSE"]
|
|
27
|
+
|
|
28
|
+
[tool.pytest.ini_options]
|
|
29
|
+
pythonpath = ["src"]
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://forsy.ai/schemas/agent-apprenticeship/environment_replay.schema.json",
|
|
4
|
+
"title": "Environment Replay",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["environment_id", "task_id", "action_schema", "observation_schema", "state_transitions"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"environment_id": { "type": "string", "minLength": 1 },
|
|
9
|
+
"task_id": { "type": "string", "minLength": 1 },
|
|
10
|
+
"dependency_spec": { "type": "object" },
|
|
11
|
+
"tool_spec": { "type": "object" },
|
|
12
|
+
"action_schema": { "type": "object" },
|
|
13
|
+
"observation_schema": { "type": "object" },
|
|
14
|
+
"state_transitions": {
|
|
15
|
+
"type": "array",
|
|
16
|
+
"items": {
|
|
17
|
+
"type": "object",
|
|
18
|
+
"required": ["transition_id", "action", "observation"],
|
|
19
|
+
"properties": {
|
|
20
|
+
"transition_id": { "type": "string" },
|
|
21
|
+
"action": { "type": "object" },
|
|
22
|
+
"observation": { "type": "object" },
|
|
23
|
+
"artifact_deltas": {
|
|
24
|
+
"type": "array",
|
|
25
|
+
"items": { "type": "object" }
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"additionalProperties": true
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"reward_components": {
|
|
32
|
+
"type": "array",
|
|
33
|
+
"items": { "type": "object" }
|
|
34
|
+
},
|
|
35
|
+
"source_evidence_refs": {
|
|
36
|
+
"type": "array",
|
|
37
|
+
"items": { "type": "string" }
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"additionalProperties": true
|
|
41
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://forsy.ai/schemas/agent-apprenticeship/eval_package.schema.json",
|
|
4
|
+
"title": "Evaluation Package",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["eval_package_id", "task_id", "rubric_items", "verifier_cases"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"eval_package_id": { "type": "string", "minLength": 1 },
|
|
9
|
+
"task_id": { "type": "string", "minLength": 1 },
|
|
10
|
+
"rubric_items": {
|
|
11
|
+
"type": "array",
|
|
12
|
+
"items": {
|
|
13
|
+
"type": "object",
|
|
14
|
+
"required": ["rubric_item_id", "criterion", "weight"],
|
|
15
|
+
"properties": {
|
|
16
|
+
"rubric_item_id": { "type": "string" },
|
|
17
|
+
"criterion": { "type": "string" },
|
|
18
|
+
"weight": { "type": "number", "minimum": 0 }
|
|
19
|
+
},
|
|
20
|
+
"additionalProperties": true
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"verifier_cases": {
|
|
24
|
+
"type": "array",
|
|
25
|
+
"items": { "type": "object" }
|
|
26
|
+
},
|
|
27
|
+
"expected_artifacts": {
|
|
28
|
+
"type": "array",
|
|
29
|
+
"items": { "type": "object" }
|
|
30
|
+
},
|
|
31
|
+
"source_evidence_refs": {
|
|
32
|
+
"type": "array",
|
|
33
|
+
"items": { "type": "string" }
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"additionalProperties": true
|
|
37
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://forsy.ai/schemas/agent-apprenticeship/experience_compilation.schema.json",
|
|
4
|
+
"title": "Experience Compilation",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": [
|
|
7
|
+
"compilation_id",
|
|
8
|
+
"title",
|
|
9
|
+
"task_title",
|
|
10
|
+
"schema_version",
|
|
11
|
+
"compiler_version",
|
|
12
|
+
"package_version",
|
|
13
|
+
"created_at",
|
|
14
|
+
"components"
|
|
15
|
+
],
|
|
16
|
+
"properties": {
|
|
17
|
+
"compilation_id": { "type": "string", "minLength": 1 },
|
|
18
|
+
"title": { "type": "string", "minLength": 1 },
|
|
19
|
+
"task_title": { "type": "string", "minLength": 1 },
|
|
20
|
+
"domain": { "type": "string" },
|
|
21
|
+
"subdomain": { "type": "string" },
|
|
22
|
+
"workflow_family": { "type": "string" },
|
|
23
|
+
"schema_version": { "type": "string", "minLength": 1 },
|
|
24
|
+
"compiler_version": { "type": "string", "minLength": 1 },
|
|
25
|
+
"package_version": { "type": "string", "minLength": 1 },
|
|
26
|
+
"created_at": { "type": "string", "format": "date-time" },
|
|
27
|
+
"training_row_counts": {
|
|
28
|
+
"type": "object",
|
|
29
|
+
"additionalProperties": { "type": "integer", "minimum": 0 }
|
|
30
|
+
},
|
|
31
|
+
"components": {
|
|
32
|
+
"type": "object",
|
|
33
|
+
"required": [
|
|
34
|
+
"traces",
|
|
35
|
+
"runtime_training",
|
|
36
|
+
"training_time_package",
|
|
37
|
+
"eval_package",
|
|
38
|
+
"environment_replay",
|
|
39
|
+
"source_evidence_map"
|
|
40
|
+
],
|
|
41
|
+
"properties": {
|
|
42
|
+
"traces": { "type": "boolean" },
|
|
43
|
+
"runtime_training": { "type": "boolean" },
|
|
44
|
+
"training_time_package": { "type": "boolean" },
|
|
45
|
+
"eval_package": { "type": "boolean" },
|
|
46
|
+
"environment_replay": { "type": "boolean" },
|
|
47
|
+
"source_evidence_map": { "type": "boolean" }
|
|
48
|
+
},
|
|
49
|
+
"additionalProperties": true
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"additionalProperties": true
|
|
53
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://forsy.ai/schemas/agent-apprenticeship/runtime_training.schema.json",
|
|
4
|
+
"title": "Runtime Training",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": [
|
|
7
|
+
"runtime_training_id",
|
|
8
|
+
"source_compilation_id",
|
|
9
|
+
"title",
|
|
10
|
+
"confidence",
|
|
11
|
+
"minimal_prompt_context",
|
|
12
|
+
"output_contract",
|
|
13
|
+
"artifact_contract"
|
|
14
|
+
],
|
|
15
|
+
"properties": {
|
|
16
|
+
"runtime_training_id": { "type": "string", "minLength": 1 },
|
|
17
|
+
"source_compilation_id": { "type": "string", "minLength": 1 },
|
|
18
|
+
"title": { "type": "string", "minLength": 1 },
|
|
19
|
+
"confidence": { "type": "string", "enum": ["low", "medium", "high", "unknown"] },
|
|
20
|
+
"minimal_prompt_context": { "type": "string", "minLength": 1 },
|
|
21
|
+
"output_contract": { "type": "object" },
|
|
22
|
+
"artifact_contract": { "type": "object" },
|
|
23
|
+
"prefinal_verification_checklist": {
|
|
24
|
+
"type": "array",
|
|
25
|
+
"items": { "type": "object" }
|
|
26
|
+
},
|
|
27
|
+
"source_evidence_refs": {
|
|
28
|
+
"type": "array",
|
|
29
|
+
"items": { "type": "string" }
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"additionalProperties": true
|
|
33
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://forsy.ai/schemas/agent-apprenticeship/source_evidence_map.schema.json",
|
|
4
|
+
"title": "Source Evidence Map",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["evidence_ref", "source_type", "evidence_kind", "visibility", "confidence"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"evidence_ref": { "type": "string", "minLength": 1 },
|
|
9
|
+
"source_type": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"enum": ["trace", "trace_step", "artifact", "actual_output", "review_packet", "verifier_record", "grader_record", "repair_record", "manifest", "generated_row"]
|
|
12
|
+
},
|
|
13
|
+
"evidence_kind": { "type": "string", "minLength": 1 },
|
|
14
|
+
"visibility": { "type": "string", "enum": ["visible", "inferred", "generated"] },
|
|
15
|
+
"confidence": { "type": "number", "minimum": 0, "maximum": 1 },
|
|
16
|
+
"source_id": { "type": "string" },
|
|
17
|
+
"source_path": { "type": "string" },
|
|
18
|
+
"source_content_hash": { "type": "string" },
|
|
19
|
+
"row_refs": {
|
|
20
|
+
"type": "array",
|
|
21
|
+
"items": { "type": "string" }
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"additionalProperties": true
|
|
25
|
+
}
|