tools
tools
¶
The three SkillOrchestra tools: search, enhance_reasoning (code), answer.
Faithful port of orchestration/eval_frames.py:call_tool — same worker
prompts, same extraction, same Python subprocess execution. Two deltas,
both forced by the OpenJarvis environment and documented inline:
search— the original POSTs to a FAISS wiki retriever service. We honormethod_cfg.retriever_urland POST the exact same payload when it's set; with no retriever configured we fall back to Anthropic's server-sideweb_searchtool so the stage still grounds.- in-tool correctness check — the original
answertool LLM-judges the prediction against the gold answer insidecall_tool. OpenJarvis scores with its own harness judge downstream, so we only return the prediction; no gold answer is threaded in.
Classes¶
Functions¶
anthropic_tools
¶
The 3 orchestrator tools in Anthropic input_schema shape.
Source code in src/openjarvis/agents/hybrid/skillorchestra/tools.py
openai_tools
¶
The 3 orchestrator tools in OpenAI function shape.
Source code in src/openjarvis/agents/hybrid/skillorchestra/tools.py
run_code
¶
run_code(agent: Any, spec: ModelSpec, *, context_str: str, problem: str, bash_timeout_s: int = 60) -> Dict[str, Any]
Generate self-contained Python with spec, execute it, return stdout.
Mirrors the original worker prompt and subprocess.run(['python', ...],
timeout=60) verbatim. Execution failures yield empty exec_result
rather than raising — the orchestrator learns the model can't code.
Source code in src/openjarvis/agents/hybrid/skillorchestra/tools.py
run_answer
¶
run_answer(agent: Any, spec: ModelSpec, *, context_str: str, problem: str, max_tokens: int = 40000) -> Dict[str, Any]
Generate the final answer with spec and extract the prediction.
The original branches the prompt by model family: Qwen-3 / Qwen-math
get a \boxed{} system prompt; GPT-5 / Claude (and we extend this
to every other model) get the <think>/<answer> instruction. The
in-tool LLM correctness check is dropped — OpenJarvis scores
downstream.
Source code in src/openjarvis/agents/hybrid/skillorchestra/tools.py
run_search
¶
run_search(agent: Any, spec: ModelSpec, *, context_str: str, problem: str, retriever_url: Optional[str] = None, topk: int = 150, web_search_max_uses: int = 5) -> Dict[str, Any]
Write a search query with spec, then retrieve documents.
Query generation is the original verbatim worker prompt. Retrieval:
if retriever_url is set we POST the original /retrieve payload;
otherwise we fall back to Anthropic web_search (the documented
OpenJarvis substitution for the missing FAISS wiki index).
Source code in src/openjarvis/agents/hybrid/skillorchestra/tools.py
250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 | |