Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add instructions/comet-ml/opik/python_sdkgit clone --depth 1 https://github.com/comet-ml/opikWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.08537 | $0.08537 |
| Opus 5 | $0.04269 | $0.04269 |
| Sonnet 5 | $0.01707 | $0.01707 |
| Haiku 4.5 | $0.00854 | $0.00854 |
Grade A, and why
opik python_sdk.instructions.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 1,167 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Opik Python SDK Code Review Guidelines
This document provides essential guidelines for reviewing Opik Python SDK code. It focuses on the most critical architectural patterns, design principles, and best practices that ensure code quality and maintainability.
🔧 Core Architecture Principles
Three-Layer Architecture
The SDK uses a strict 3-layer architecture. Always ensure code belongs to the correct layer:
Layer 1: Public API (opik.Opik, @opik.track)
- User-facing interface, input validation, context management
Layer 2: Message Processing (observability operations only)
- Background workers for trace/span/feedback operations
Layer 3: REST API Client
- HTTP communication with Opik backend
Execution Paths
Asynchronous Path (traces, spans, feedback):
client.trace(name="test") # Non-blocking, batched
client.log_traces_feedback_scores() # Background processing
Synchronous Path (datasets, experiments, search):
dataset = client.create_dataset(name="test") # Blocking, returns immediately
traces = client.search_traces(...) # Direct REST call
📋 API Design Standards
Opik.Opik is the Main Entry Point
# ✅ Good: Always use Opik as factory
client = opik.Opik()
experiment = client.create_experiment(name="test")
dataset = client.create_dataset(name="data")
# ❌ Bad: Direct instantiation
from opik.api_objects.experiment import Experiment
experiment = Experiment(name="test") # Bypasses main API
Consistent Parameter Patterns
# ✅ Good: Follow established patterns
def create_experiment(self, name: str, description: Optional[str] = None)
def create_dataset(self, name: str, description: Optional[str] = None)
# ❌ Bad: Inconsistent ordering
def create_experiment(self, description: str, name: str) # Wrong order
def create_dataset(self, name: str, desc: str) # Different param name
Method Naming Conventions
- CRUD:
create_*,get_*,update_*,delete_* - Search:
search_*for complex queries - Batch:
batch_*for bulk operations
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday First seen · 1,167 lines · 8,537 tokens per session scan A d330f7c68c26
opik python_sdk.instructions.md is an instructions file published in the GitHub repository comet-ml/opik (21,685 stars, last pushed 2d ago), licensed Apache-2.0. It adds 8,537 tokens to every session, about $0.0427 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other instructions, from other repositories
langchain AGENTS.md
Instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
swarms CLAUDE.md
Instructions for kyegomez/swarms, covering claude.md — swarms framework guide, installation & setup, any provider supported by litellm works, project layout and core primitive: agent.
vellum-assistant AGENTS.md
Instructions for vellum-ai/vellum-assistant, covering vellum assistant — agent instructions, project structure, intellectual honesty, development and dependencies.
Patter AGENTS.md
Instructions for PatterAI/Patter, covering agents.md, non-negotiables (ci and reviewers block on these), before opening a pr, where things live and commits & prs.
LaunchStack CLAUDE.md
Instructions for Deodat-Lawson/LaunchStack, covering claude.md, frontend rules (apps/web, apps/landing) and workflow.
langchain CLAUDE.md
Instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.