opik-connect
Opik Connect (Local Runner)
Trigger your agent from the Opik browser UI while it runs locally.
Python
Wrap server endpoints with @track(entrypoint=True):
from fastapi import FastAPI
from opik import track
import uvicorn
app = FastAPI()
@app.get("/echo")
@track(entrypoint=True)
async def echo(message: str = "") -> str:
"""Echo the message back.
Args:
message: The message to echo.
"""
return f"{message}, world!"
uvicorn.run(app, host="0.0.0.0", port=3000)
Customize the agent name: @track(entrypoint=True, name="fantastic_agent")
TypeScript
Use track() with explicit params (required — TS compilation strips param names/types):
import express from "express";
import { track } from "opik";
const summarize = track(
{ name: "summarize", entrypoint: true, params: [{ name: "message", type: "string" }] },
async (message: string) => `Summary of: ${message}`
);
const app = express();
app.get("/summarize", async (req, res) => {
res.send(await summarize(String(req.query.message ?? "")));
});
app.listen(3000);
If params omitted, all parameters assumed string type.
Pairing
Get a pairing code from the Opik UI, then:
opik connect --pair <CODE> python3 echo_app.py # Python
opik connect --pair <CODE> npx tsx summarise.ts # TypeScript
After pairing: entrypoint registered as agent, UI shows input form from type hints (Python) or params (TypeScript), jobs from UI or Optimizer trigger runs.
Troubleshooting
| Issue | Fix |
|---|---|
| No entrypoint found | Add entrypoint=True (Python) or entrypoint: true (TS) |
| Invalid pair code | Codes expire — get a new one |
| Connection refused | Check Opik server (OSS) or API key (Cloud) |
More from comet-ml/opik-skills
opik
Opik observability for LLM agents — Agent Configuration, Local Runner (opik connect), Test Suites, threads, integrations. Use for "configure my agent", "connect my agent", "evaluate my agent" or "integrate with Opik".
152instrument
Add Opik tracing to an existing codebase. Detects language (Python/TypeScript), identifies LLM frameworks, adds appropriate decorators and integrations, marks entrypoints, and wires up environment config. Use for "instrument my code", "add opik tracing", "add observability", or "trace my agent".
136agent-config
Opik Agent Configuration — Blueprints, get_agent_config() with selectors, environment tags, Prompt/ChatPrompt fields, deploy_to(), MaskIDs, and config lifecycle.
5agent-ops
Agent lifecycle — architecture, configuration (Blueprints), Local Runner, evaluation, threads, production monitoring. Use for "evaluate my agent", "connect my agent", "configure my agent", "add guardrails".
5instrument-typescript
Adding Opik observability to TypeScript/JS LLM apps — track() with entrypoint and explicit params for Local Runner, framework integrations.
5evaluation-suites
Opik Evaluation Suites — assertions, execution policies, CI integration. Replaces old Datasets API.
5