소스 정보
- 저장소
- tools-only/X-Skills
- 최근 소스 활동
- 2026년 2월 3일 09:52
- 감지된 SKILL.md 언어
- 영어
- 스타
- 7
- 포크
- 1
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/tools-only/X-Skills --skill synth-api명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
Index of Build Systems Skills
Coordination patterns for distributed dataflow systems including barriers, epochs, and distributed snapshots
Windowing, sessionization, time-series aggregation, and late data handling for streaming systems
SOC 직업 분류 기준
SKILL.md 표시 중
| name | synth-api |
| description | Use the Synth AI API end-to-end (SDK + HTTP) for eval + GEPA |
This skill explains how to run Synth end-to-end with:
Reference demo: demos/gepa_banking77/gepa_banking77_prompt_optimization.ipynb
SYNTH_API_KEY: your API key (or mint a demo key if using a demo workflow)SYNTH_BACKEND_URL (optional): backend base URL, default https://api.usesynth.aiSynth uses two keys:
SYNTH_API_KEY authenticates your SDK/CLI calls to the Synth backend.ENVIRONMENT_API_KEY authenticates backend-to-task-app requests (sent as X-API-Key or Authorization: Bearer ...).Demo keys are short‑lived (default 4 hours) and are great for notebooks or quick starts.
import os
from synth_ai.core.utils.env import mint_demo_api_key
SYNTH_API_BASE = os.environ.get("SYNTH_BACKEND_URL", "https://api.usesynth.ai")
SYNTH_API_KEY = os.environ.get("SYNTH_API_KEY") or mint_demo_api_key(SYNTH_API_BASE)
os.environ["SYNTH_API_KEY"] = SYNTH_API_KEY
Your task app should use the same ENVIRONMENT_API_KEY that the backend stores for your org.
The helper below generates a key locally and uploads it to the backend using your SYNTH_API_KEY.
import os
from synth_ai.sdk.localapi.auth import mint_environment_api_key, setup_environment_api_key
SYNTH_API_BASE = os.environ.get("SYNTH_BACKEND_URL", "https://api.usesynth.ai")
SYNTH_API_KEY = os.environ["SYNTH_API_KEY"]
ENVIRONMENT_API_KEY = mint_environment_api_key()
os.environ["ENVIRONMENT_API_KEY"] = ENVIRONMENT_API_KEY
setup_environment_api_key(SYNTH_API_BASE, SYNTH_API_KEY, token=ENVIRONMENT_API_KEY)
/rollout + /task_info.import os
import asyncio
from synth_ai.sdk.jobs import JobsClient
async def main() -> None:
async with JobsClient(
base_url=os.environ.get("SYNTH_BACKEND_URL", "https://api.usesynth.ai"),
api_key=os.environ["SYNTH_API_KEY"],
) as client:
files = await client.files.list(limit=5)
print(files)
if __name__ == "__main__":
asyncio.run(main())
Minimum Local API shape:
provide_taskset_description()provide_task_instances(seeds)rollout(request) -> RolloutResponsefrom synth_ai.sdk.localapi import LocalAPIConfig, create_local_api
from synth_ai.sdk.localapi._impl.contracts import RolloutMetrics, RolloutRequest, RolloutResponse, TaskInfo
def create_banking77_local_api(system_prompt: str):
async def run_rollout(request: RolloutRequest, fastapi_request) -> RolloutResponse:
# Use your own task logic here; return a reward in [0, 1].
reward = 1.0
return RolloutResponse(
trace_correlation_id=request.trace_correlation_id,
reward_info=RolloutMetrics(outcome_reward=reward),
trace=None,
)
def provide_taskset_description():
return {"splits": ["train", "test"], "sizes": {"train": 1000, "test": 1000}}
def provide_task_instances(seeds):
for seed in seeds:
yield TaskInfo(
task={"id": "banking77", "name": "Banking77 Intent Classification"},
dataset={"id": "banking77", "split": "train", "index": seed},
inference={"tool": "banking77_classify"},
limits={: },
task_metadata={: seed},
)
create_local_api(
LocalAPIConfig(
app_id=,
name=,
description=,
provide_taskset_description=provide_taskset_description,
provide_task_instances=provide_task_instances,
rollout=run_rollout,
cors_origins=[],
)
)
Use the built‑in tunnel helper to auto‑start the server and provision a URL.
The helper spins up your local server, creates a public trycloudflare.com URL,
and forwards requests from the public URL to your local port. Keep the process
running while Synth calls your task app.
from synth_ai.core.tunnels import TunnelBackend, TunneledLocalAPI
app = create_banking77_local_api("baseline prompt")
baseline_tunnel = await TunneledLocalAPI.create_for_app(
app=app,
local_port=None, # auto-select
backend=TunnelBackend.CloudflareQuickTunnel,
progress=True,
)
LOCAL_API_URL = baseline_tunnel.url
print("Local API URL:", LOCAL_API_URL)
GEPA mutates prompt candidates and evaluates them via rollouts. Use a GEPA config body or a config file. Example config body:
from synth_ai.sdk.optimization.internal.prompt_learning import PromptLearningJob
config_body = {
"prompt_learning": {
"algorithm": "gepa",
"task_app_url": LOCAL_API_URL,
"env_name": "banking77",
"initial_prompt": {
"messages": [
{"role": "system", "order": 0, "pattern": "Baseline system prompt"},
{"role": "user", "order": 1, "pattern": "Customer Query: {query}\n\nAvailable Intents:\n{available_intents}"},
],
"wildcards": {"query": "REQUIRED", "available_intents": "OPTIONAL"},
},
"policy": {
"model": "gpt-4.1-nano",
"provider": "openai",
"inference_mode": "synth_hosted",
"temperature": 0.0,
"max_completion_tokens": 256,
},
"gepa": {
"env_name": "banking77",
"evaluation": {
"seeds": list(range(50)),
"validation_seeds": ((, )),
},
: {: , : , : },
: {: },
: {: , : , : },
: {: , : },
},
},
}
job = PromptLearningJob.from_dict(config_dict=config_body, skip_health_check=)
job_id = job.submit()
result = job.poll_until_complete(timeout=, interval=, progress=)
(result.status.value)
Eval jobs score a fixed set of held‑out seeds for a final report once optimization finishes.
from synth_ai.sdk.eval.job import EvalJob, EvalJobConfig
config = EvalJobConfig(
local_api_url=LOCAL_API_URL,
backend_url=os.environ.get("SYNTH_BACKEND_URL", "https://api.usesynth.ai"),
api_key=os.environ["SYNTH_API_KEY"],
env_name="banking77",
seeds=list(range(100, 150)),
policy_config={"model": "gpt-4.1-nano", "provider": "openai"},
env_config={"split": "test"},
concurrency=10,
)
job = EvalJob(config)
job.submit()
result = job.poll_until_complete(timeout=600.0, interval=2.0, progress=True)
print(result.status)
from synth_ai.sdk.optimization.internal.learning.prompt_learning_client import PromptLearningClient
client = PromptLearningClient()
prompt_results = await client.get_prompts(job_id)
best_score = prompt_results.best_score
print("Best score:", best_score)
import os
import requests
base = os.environ.get("SYNTH_BACKEND_URL", "https://api.usesynth.ai")
resp = requests.get(
f"{base}/api/health",
headers={"Authorization": f"Bearer {os.environ['SYNTH_API_KEY']}"},
timeout=30,
)
resp.raise_for_status()
print(resp.json())
TunneledLocalAPI returns a reachable URL; expect a trycloudflare.com URL.https://api.usesynth.ai/api/inference/v1.SYNTH_API_KEY is set and valid./task_info and /rollout return valid RolloutResponse./api/prompt-learning/online/jobs/{job_id} to confirm job status.