Логотип Monte Carlo Instrument Agent

Monte Carlo Instrument Agent

Організація
monte-carlo-data
monte-carlo-instrument-agent

Instrument a new AI agent in a Python codebase for Monte Carlo Agent Observability. Detects AI libraries, installs the Monte Carlo OpenTelemetry SDK, and proposes tracing setup and decorator placements as diffs. Asks before editing any file.

Add to TypingMind

Огляд

Видавецьmonte-carlo-data
Репозиторійmc-agent-toolkit
Назва навичкиmonte-carlo-instrument-agent
Зірки
93
Форки
5
Файли в пакеті
11
ЛіцензіяApache-2.0
Посилання
  • Інструкції у форматі Markdown

    Файл SKILL.md, який модель завантажує за потреби, тож токени витрачаються лише тоді, коли запит справді відповідає навичці.

  • Працює з будь-якою LLM

    Навички ШІ — це звичайний Markdown, а не код для певного постачальника, тому вони працюють із GPT, Claude, Gemini, Grok або локальною моделлю.

  • Файлів у комплекті: 11

    Скрипти, шаблони й довідкові матеріали, які модель може читати під час роботи. Файли доступні лише для читання й ніколи не виконуються.

  • Відкритий вихідний код

    Видавець на GitHub: monte-carlo-data. Перед установленням перегляньте вихідні файли навички.

Встановлення

Установіть навичку ШІ Monte Carlo Instrument Agent у TypingMind, щоб використовувати її з будь-якою LLM, або додайте її до іншого агента, що читає SKILL.md.

1

Встановити в TypingMind

TypingMind встановлює навичку безпосередньо з її папки на GitHub — читає SKILL.md, збирає файли ресурсів у пакет і зберігає результат локально.

  1. Відкрийте застосунок і перейдіть до розділу «Плагіни» → «Навички».
  2. Виберіть «Встановити з GitHub».
  3. Вставте наведений нижче URL папки навички та підтвердьте встановлення.
    https://github.com/monte-carlo-data/mc-agent-toolkit/tree/main/skills/instrument-agent
  4. Увімкніть навичку в кожному чаті, де хочете її використовувати.
Плагіни → Навички → Додати навичку → За URL GitHub, потім вставте URL папки й натисніть «Продовжити».
2

Встановити в іншому агенті

Будь-який агент, що підтримує формат Agent Skills, може використовувати цю навичку — скопіюйте папку до каталогу навичок цього агента.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/monte-carlo-data/mc-agent-toolkit.git /tmp/mc-agent-toolkit
mkdir -p .claude/skills
cp -r /tmp/mc-agent-toolkit/skills/instrument-agent .claude/skills/monte-carlo-instrument-agent
Після копіювання перезапустіть Claude Code, щоб завантажити нову навичку.

Використовуйте навичку в TypingMind

Увімкніть навичку Monte Carlo Instrument Agent в будь-якому чаті TypingMind, і далі модель усе зробить сама. Назва й опис навички містяться в системному промпті, а щойно надходить відповідний запит, модель самостійно завантажує повні інструкції — вам не потрібно викликати навичку вручну, і до фактичного використання вона не витрачає токенів.

Модель самостійно завантажує навичку Monte Carlo Instrument Agent, щойно надходить відповідний запит.

Працює з будь-якою моделлю ШІ

Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для певного постачальника, тому навичка Monte Carlo Instrument Agent не прив’язана до моделі, для якої її створено. Установіть її один раз у TypingMind і використовуйте з GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama або локальною моделлю, яку ви запускаєте самостійно, — усе з вашими власними ключами API.

  • Завантажується лише за потреби

    Системний промпт містить лише назву й опис. Інструкції завантажуються за першого відповідного запиту, тож поки навичка не потрібна, токени на її інструкції не витрачаються.

  • Змінюйте моделі під час чату

    Оскільки навичка — це інструкції, а не код, зміна моделі не порушує її роботу: наступна модель читає той самий файл SKILL.md.

Інструкції навички

Це вміст файлу SKILL.md, який завантажує модель. Прочитайте його перед установленням — навичка містить інструкції, яких дотримуватиметься ваша модель.

Monte Carlo Instrument-Agent Skill

This skill walks an MC Agent Observability customer through instrumenting a new AI agent in their Python codebase: detect AI libraries → install the Monte Carlo OpenTelemetry SDK + matching instrumentors → generate mc.setup() (with SimpleSpanProcessor when serverless) → propose @trace_with_workflow / @trace_with_task decorator diffs → confirm env vars (only when needed) → verify traces flow via get_agent_metadata.

The skill produces traces. It is not for monitoring or alerting on existing traces — that's monte-carlo-monitoring-advisor. The two skills are sequential: instrument-agent first, monitoring-advisor afterward.

Monte Carlo tool routing (required): Always call Monte Carlo MCP tools through this plugin's bundled server, whose fully-qualified tool names are mcp__plugin_mc-agent-toolkit_monte-carlo-mcp__<tool> (e.g. mcp__plugin_mc-agent-toolkit_monte-carlo-mcp__get_alerts). Bare tool names used in this skill (get_alerts, search, get_table, …) refer to that bundled server. If the session also has a separately-configured monte-carlo-mcp server, do not route to it — it may point at a different endpoint or credentials.

Reference files live next to this file. Use the Read tool (not MCP resources) to access them.

CRITICAL — Never modify any file without explicit user approval

This skill must not modify any file in the customer's codebase without explicit per-file user approval. This rule covers:

  • Dependency files — requirements.txt, pyproject.toml, Pipfile, lockfiles. Always propose the diff and wait for confirmation before editing.
  • Source code — mc.setup() insertion, decorator placement (@trace_with_workflow, @trace_with_task), import additions. Always propose the diff and wait for confirmation per file.
  • Env files — .env, .envrc, shell rc files. Always propose the change and wait for confirmation before editing.

The skill walks the user through what needs to change and why, then proposes diffs. It does not apply edits, run pip install, or write env files autonomously. The only exception: the user may explicitly waive approval for a specific file ("I know the risks, just edit the file") — proceed for that file only and surface that the approval was waived.

This guardrail is reinforced in the Tier-3 references (references/decorator-placement.md, references/setup-template.md, references/library-detection.md).

When to activate this skill

Activate when the user expresses intent to instrument a new AI agent:

  • Asks to instrument an agent for Monte Carlo, set up MC tracing, or wire up the Monte Carlo OpenTelemetry SDK
  • Asks how to add Monte Carlo tracing to a LangChain / LangGraph / OpenAI / Anthropic / CrewAI / Bedrock / SageMaker / Vertex AI agent (those are examples — the full supported set is whatever the Monte Carlo OpenTelemetry SDK ships on PyPI: https://pypi.org/project/montecarlo-opentelemetry/)
  • Says things like "instrument my agent for Monte Carlo", "set up Monte Carlo tracing", "set up MC tracing", "set up agent tracing for Monte Carlo", "set up Monte Carlo on my new agent"
  • References the SDK install or mc.setup() (when generating; not when diagnosing)

When NOT to activate this skill

Do not activate when the user is:

  • Asking to monitor an existing agent (latency, token usage, evaluation, trajectory, validation) → monte-carlo-monitoring-advisor
  • Investigating an active agent incident or alert → monte-carlo-incident-response / monte-carlo-troubleshoot-agent-traces
  • Asking about pushing metadata or query logs to Monte Carlo (data ingestion, not agent tracing) → push-ingestion
  • Building a Connection Auth Rules config → connection-auth-rules
  • Asking why traces are missing for an already-instrumented agent → that's troubleshooting; this skill covers it via references/troubleshooting.md, but the first invocation should be deliberate (not a coverage question)

If the user is ambiguous ("set up agent observability"), surface both options and ask whether they're instrumenting a new agent (this skill) or configuring monitors on an existing one (monitoring-advisor).

Pre-flight check

Before walking the workflow, confirm two things:

  1. Monte Carlo MCP server is configured + authenticated. Run test_connection. If it succeeds, Step 4 (BEFORE snapshot) and Step 10 (AFTER verification) will use get_agent_metadata directly. If test_connection fails, degrade gracefully — point the user at the MC MCP setup docs (https://docs.getmontecarlo.com/docs/mcp-server) as informational, then continue the workflow and tell them they'll need to verify the new agent appears in the Monte Carlo UI manually after running the instrumented agent. Record whether MCP is available so Steps 4 and 10 know which path to take.
  2. Python codebase is present. Look for requirements.txt, pyproject.toml, or Pipfile in the working directory. If none exist, ask the user where the agent codebase is.

Reference files — when to load

The skill is structured as a Tier 1 router (this file) → Tier 2 workflow → Tier 3 per-step references. Load each reference when its step is reached in the workflow.

Reference fileLoad when…
references/workflow.mdAt the start of every invocation. Tier 2 — the end-to-end flow. Read first.
references/library-detection.mdWalking step 1 of the workflow — detecting AI libraries, the runtime style (serverless vs long-running), and any existing mc.setup(). Documents how detect_libraries.py and fetch_sdk_docs.py recognize supported AI libraries — the SDK's supported set is whatever PyPI shows.
references/setup-template.mdWalking step 5–7 of the workflow — resolving the OTLP endpoint, generating mc.setup(), handling the existing-mc.setup() decision matrix. Includes both serverless and long-running templates.
references/decorator-placement.mdWalking step 8 of the workflow — proposing @trace_with_workflow and @trace_with_task diffs. Tier 3: those are the only two decorators in scope for v1.
references/verify-traces.mdWalking step 4 (BEFORE snapshot) and step 10 (AFTER verification) of the workflow — both get_agent_metadata calls. Documents dev/prod twin disambiguation via MCON.
references/redaction.mdWhen the customer has stricter privacy requirements (compliance, regulated workload, contractual PII restrictions) and asks to redact prompts or completions. Walks through ordered redaction layers: env-var disable first, then optional placeholder-substitution via mc.create_llm_span.
references/troubleshooting.mdWhen step 10's verification doesn't show the new agent, or the user reports incomplete traces. Covers the common trace-ingestion failure modes plus the serverless SimpleSpanProcessor foot-gun.

High-level workflow (Tier 1 summary)

The full step-by-step flow lives in references/workflow.md. At a glance:

  1. Detect AI libraries, runtime style, and any existing mc.setup() via scripts/detect_libraries.py.
  2. Ask whether the customer hosts their own OTel collector or uses the MC-hosted one — gates the env-var step.
  3. Ask whether the customer has stricter privacy requirements that warrant redacting prompts or completions — full capture is the default; redaction is opt-in.
  4. Snapshot existing agents via get_agent_metadata (BEFORE any code changes).
  5. Resolve and display the final OTLP endpoint to the user — normalize idempotently (never double-append /v1/traces).
  6. Propose dependency-file edits and wait for approval — install SDK + instrumentors at compatible versions (live-fetched from PyPI; fail closed and ask the user to consult https://pypi.org/project/montecarlo-opentelemetry/ if the fetch fails).
  7. Propose mc.setup() insertion as a diff and wait for approval — serverless variant uses SimpleSpanProcessor.
  8. Propose @trace_with_workflow / @trace_with_task decorator diffs — wait for approval per file. Those are the only two decorators in scope for v1.
  9. Confirm auth env vars (only on the MC-hosted collector path) — either MCD_DEFAULT_API_ID / MCD_DEFAULT_API_TOKEN or OTEL_EXPORTER_OTLP_HEADERS, depending on the setup template. Presence-only check; never read or echo the values.
  10. Verify via get_agent_metadata (AFTER user runs the instrumented agent) — confirm new agent_name + new MCON appears.
  11. On failure, branch to references/troubleshooting.md.

Each step's full Tier 3 details live in the reference files above.

Helper scripts

The skill ships two Python helpers under scripts/ that the workflow invokes:

ScriptPurpose
scripts/detect_libraries.pyParse requirements.txt / pyproject.toml / Pipfile into a sorted dependencies list; classify runtime as serverless / long-running / unknown; detect existing mc.setup(). Returns JSON. Raw discovery surface — does not match AI libraries to instrumentors; that's the LLM's job using fetch_sdk_docs.py output.
scripts/fetch_sdk_docs.pyFetch the SDK supported-instrumentor list live from PyPI, including version constraints. Fails closed if PyPI is unreachable.

Version constraints for instrumentor packages come from PyPI live (fetch_sdk_docs.py). Transitive constraints PyPI doesn't expose (e.g. wrapt<2 for OpenLLMetry instrumentors at <=0.53.4) are documented as symptom-driven fixes in references/troubleshooting.md — the skill surfaces them when the customer hits the symptom rather than baking them into every install diff.

Out of scope (v1)

  • Auto-scaffolded create_llm_span boilerplate for libraries without a dedicated instrumentor.
  • Auto-instrumented redaction (proactive sensitive-data detection and wrapping). The skill is conversant in redaction — when the customer has stricter privacy requirements, it walks them through the ordered redaction layers in references/redaction.md.
  • Full first-time AO setup (infra deployment, datastore registration, warehouse ingestion).
  • API-key generation.
  • Non-Python SDKs.
  • Decorators other than @trace_with_workflow and @trace_with_task. Other tracing primitives the SDK exposes are not part of the v1 surface.

Available slash commands

CommandPurpose
/instrument-agentKicks off the workflow against the current Python codebase.

Файли в пакеті

Модель читає ці файли за потреби, поки навичку завантажено. Вони доступні для читання й ніколи не виконуються.

Поширені запитання

Що робить навичка ШІ Monte Carlo Instrument Agent?

Instrument a new AI agent in a Python codebase for Monte Carlo Agent Observability. Detects AI libraries, installs the Monte Carlo OpenTelemetry SDK, and proposes tracing setup and decorator placements as diffs. Asks before editing any file.

Навіщо використовувати Monte Carlo Instrument Agent у TypingMind?

Тому що ви встановлюєте її один раз і використовуєте з будь-якою моделлю. Monte Carlo Instrument Agent — це звичайний Markdown, а не код для конкретного постачальника, тому та сама навичка працює з GPT-5, Claude, Gemini, Grok або локальною моделлю. Ви можете змінити модель навіть посеред чату, і навичка продовжить працювати. TypingMind використовує ваші власні ключі API, тож ви платите безпосередньо постачальникам замість передплати за кожне місце користувача, а ваші навички й чати залишаються у вашому сховищі.

Як встановити Monte Carlo Instrument Agent у TypingMind?

Відкрийте в TypingMind Плагіни → Навички → Встановити з GitHub і вставте https://github.com/monte-carlo-data/mc-agent-toolkit/tree/main/skills/instrument-agent. TypingMind прочитає файл SKILL.md, додасть супровідні файли та встановить навичку, яку можна вмикати окремо для кожного чату.

Які моделі ШІ можуть використовувати Monte Carlo Instrument Agent?

Будь-яка модель, яку ви підключите в TypingMind. Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для конкретного постачальника, тому GPT, Claude, Gemini, Grok і локальні моделі можуть завантажувати цю навичку, коли запит їй відповідає.

Зі скількома моделями ШІ можна використовувати Monte Carlo Instrument Agent?

Зі скількома забажаєте. У TypingMind ви можете використовувати Monte Carlo Instrument Agent із будь-якою моделлю, яка підтримує навички, зокрема з GPT, Claude, Gemini, Grok, DeepSeek, Mistral чи Llama. Для цього ви використовуєте власні ключі API.

Чи безкоштовна навичка ШІ Monte Carlo Instrument Agent?

Так. На GitHub цю навичку публікує monte-carlo-data за ліцензією Apache-2.0. Ви платите лише своєму постачальнику ШІ за використані токени.

Що таке навички ШІ?

Навичка ШІ — це набір інструкцій для повторного використання, який навчає модель ШІ виконувати одне конкретне завдання. Він відповідає відкритому формату Agent Skills: файл SKILL.md із назвою та описом, а також скрипти, шаблони чи довідкові файли, які можуть знадобитися моделі. Модель читає інструкції лише тоді, коли ваш запит відповідає навичці, тому встановлена навичка нічого не коштує, доки її не використано.

Чим навички ШІ відрізняються від плагінів або серверів MCP?

Плагін або сервер MCP надає моделі нові інструменти, які вона може викликати, — код, який десь виконується й повертає результат. Натомість навичка ШІ дає моделі знання й пояснює порядок дій: як підійти до завдання, яких кроків дотримуватися та яким має бути якісний результат. Навички — це звичайний Markdown, тож їм не потрібні ні сервер, ні ключ API, ні середовище виконання, і вони працюють із будь-якою моделлю.

Усі
Логотип openclaw

Claw Score

openclaw
ОрганізаціяПопулярне

Перевіряйте або оновлюйте документи зі зведеною оцінкою зрілості OpenClaw на основі кореневої таксономії, оцінок зрілості та артефактів із доказами QA, не використовуючи дані maintainer discrawl або звіти про інвентаризацію в репозиторії.

82.2K
391K
Файлів: 51
Відкрити
Логотип openclaw

Clawsweeper

openclaw
ОрганізаціяПопулярне

Використовуйте для будь-якої роботи з ClawSweeper: звітів про перевірку завдань і PR в OpenClaw, завдань із виправленнями, PR із хмарними виправленнями, команд згадки супроводжувача @clawsweeper, довірених автоматичних виправлень і автоматичного злиття, перевірених ClawSweeper, моніторингу GitHub Actions…

82.2K
391K
Файлів: 1
Відкрити
Логотип openclaw

Control Ui E2e

openclaw
ОрганізаціяПопулярне

Використовуйте під час проєктування, тестування, виправлення або розширення графічного інтерфейсу OpenClaw Control UI, зокрема для галерей стрес-тестування інтерфейсу зі зворотним зв’язком, наскрізних перевірок за допомогою Vitest + Playwright, сценаріїв Gateway із заглушками…

82.2K
391K
Файлів: 1
Відкрити
Логотип openclaw

Deslop

openclaw
ОрганізаціяПопулярне

Очищення змін у поточній гілці від AI-slop: перед автоматичним переглядом приберіть зайві коментарі, надмірні захисні перевірки, підміну типів і відхилення від стилю.

82.2K
391K
Інструкції
Відкрити

Створіть власний робочий простір зі ШІ вже зараз

Підпишіться на нашу розсилку, щоб дізнаватися про нові функції та майбутні розіграші 👇