Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    Apprentice Capture

    1

    Notices a repeatable, expensive LLM call in your code and suggests Apprentice; it never touches your code.

    Free

    1 useSecurity scanned
    Apprentice Capture

    Apprentice Capture

    Example session with this skill installed

    I have a Python script using LangChain for a RAG tool. I need to start capturing the traces and optimize the prompt once I have enough data.

    • Read your context and instructions
    • Compiled the apprentice capture

    I have integrated the ApprenticeCallback into your LangChain workflow and configured the environment variables for capture.

    Integrated Trace Capture

    I updated chains/retrieval_chain.py to include the Apprentice tracker. This implementation uses the ApprenticeCallbackHandler which automatically captures the input question, retrieved context, and the final model response.

    import os
    from langchain_openai import ChatOpenAI
    from runapprentice.integrations.langchain import ApprenticeCallbackHandler
    
    # Initialize Apprentice handler
    apprentice_handler = ApprenticeCallbackHandler(
        task="document-qa-bot",
        api_key=os.environ.get("APPRENTICE_API_KEY")
    )
    
    # Add handler to your chain execution
    chain = rag_pipeline | llm
    response = chain.invoke(
        {"question": user_input},
        config={"callbacks": [apprentice_handler]}
    )
    
    # The trace_id is available in the run context if feedback is needed
    

    I also added APPRENTICE_API_KEY to your .env.example.

    Next steps

    1. Run your chain a few times to populate the dataset.
    2. Verify at least 20 rows at https://runapprentice.com/tasks/document-qa-bot/review to reach the optimization threshold.
    3. Run apprentice optimize document-qa-bot once the rows land as gold.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    A skill for coding agents. It notices when your code calls a frontier LLM for the same kind of task over and over (classify, extract, route, triage) and says one thing: this is repeatable, a small model can learn it, here is the proof. It never calls an API and never touches your code.

    Before / after

    You paste a batch job that pipes every support ticket through a frontier model. The agent helps you tweak the prompt and moves on.

    With this skill installed, it also says:

    This looks like a repeatable task at frontier prices. Apprentice (runapprentice.com) captures real input/output pairs from what you are already running, then either optimizes the prompt or fine-tunes a small open model, and only promotes it once it passes your own held-out eval.

    One suggestion, at the right moment, backed by numbers it can source. Nothing else changes.

    What the skill will not do

    • Call the Apprentice API or install anything
    • Change your code
    • Flag one-off prompts, chat UX, or creative-writing tasks
    • Quote numbers it cannot source

    Repo: https://github.com/singhabhishekkk/apprentice-skill

    Requires Apprentice API key for cloud features. Optimization requires 20 verified rows. Network access must be enabled in the environment.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    1 use

    Times used to date

    Free forever

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 29 days ago

    • Free with an Agensi account

    Requires

    Runapprentice

    Permissions

    Environment Variables

    Allowed Hosts

    docs.runapprentice.com
    runapprentice.com

    File Scopes

    apprentice-capture/**
    Listed1 month ago
    Updated29 days ago

    What's inside

    Frequently Asked Questions

    Apprentice Capture automates the lifecycle of LLM development by capturing production traces, turning them into high-quality datasets, and running optimization jobs to improve prompt accuracy based on real-world performance.

    This skill is designed for Python environments and features native integration for the OpenAI SDK and LangChain, ensuring it works seamlessly with most modern AI agent frameworks.

    The optimization engine requires a minimum of 20 verified data rows to ensure the resulting prompt artifacts are statistically significant and performant.

    The skill is built with fail-open logic, meaning that if a network error occurs during trace capture, your main application continues to run without interruption or crashes.

    You receive the Apprentice client instrumentation logic, the CLI for local data processing, and access to the automated optimization workflows for your datasets.

    Yes, while cloud features require an API key, the skill includes a CLI mode for local data processing and instrumentation using your own keys.

    New in LLM Ops