Works with the AI Agents you already use
Apprentice Capture
Notices a repeatable, expensive LLM call in your code and suggests Apprentice; it never touches your code.
Free
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
- Run your chain a few times to populate the dataset.
- Verify at least 20 rows at
https://runapprentice.com/tasks/document-qa-bot/reviewto reach the optimization threshold. - Run
apprentice optimize document-qa-botonce 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
Requires Apprentice API key for cloud features. Optimization requires 20 verified rows. Network access must be enabled in the environment.
How to use
- 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
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 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
Permissions
Allowed Hosts
File Scopes