Spaces:
Sleeping
Sleeping
File size: 2,056 Bytes
116524e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | """ACE integration steps — execute steps for external agentic frameworks.
Each integration provides:
1. **Result type** — integration-specific output (e.g. ``ClaudeCodeResult``)
2. **Execute step** — INJECT + EXECUTE, writes the result to ``ctx.trace``
3. **ToTrace step** — converts the result to a standardised trace dict
for the learning tail (``ReflectStep``)
Compose with ``learning_tail()``::
from ace.integrations import ClaudeCodeExecuteStep, ClaudeCodeToTrace
from ace.steps import learning_tail
steps = [
ClaudeCodeExecuteStep(working_dir="./project"),
ClaudeCodeToTrace(),
*learning_tail(reflector, skill_manager, skillbook),
]
pipeline = Pipeline(steps)
"""
from __future__ import annotations
from ..implementations.prompts import wrap_skillbook_for_external_agent
from .browser_use import BrowserExecuteStep, BrowserResult, BrowserToTrace
from .claude_code import ClaudeCodeExecuteStep, ClaudeCodeResult, ClaudeCodeToTrace
from .claude_sdk import (
ClaudeSDKExecuteStep,
ClaudeSDKResult,
ClaudeSDKToTrace,
ToolCall,
)
from .langchain import LangChainExecuteStep, LangChainResult, LangChainToTrace
from .openclaw import OpenClawToTraceStep
def wrap_skillbook_context(skillbook) -> str:
"""Format learned strategies for injection into external agents.
Thin wrapper around the canonical implementation in
``implementations.prompts``.
"""
return wrap_skillbook_for_external_agent(skillbook)
__all__ = [
# Browser-use
"BrowserExecuteStep",
"BrowserResult",
"BrowserToTrace",
# Claude Code
"ClaudeCodeExecuteStep",
"ClaudeCodeResult",
"ClaudeCodeToTrace",
# Claude SDK
"ClaudeSDKExecuteStep",
"ClaudeSDKResult",
"ClaudeSDKToTrace",
"ToolCall",
# LangChain
"LangChainExecuteStep",
"LangChainResult",
"LangChainToTrace",
# OpenClaw
"OpenClawToTraceStep",
# Utility
"wrap_skillbook_context",
]
|