Skip to content

Release v0.8.0

Release Date: 2026-06-22

New Features

Agent Observability Package (agentobs)

New opik-go/agentobs package providing generic agent observability interfaces:

  • AgentEvent: Generic event type for agent lifecycle events (session, message, tool, job)
  • TraceManager: Session-based trace lifecycle management with stale cleanup
  • Sanitization: Content sanitization utilities to redact secrets and internal markers
  • Media Extraction: Extract media references (images, files, data URLs) from content
  • Observer Interface: Generic interface for observability backends
import "github.com/plexusone/opik-go/agentobs"

// Create events
event := agentobs.NewEvent(agentobs.EventMessageReceived).
    WithSession("session-123").
    WithData("content", "Hello!")

// Sanitize content
clean := agentobs.Sanitize(content, agentobs.DefaultSanitizeConfig())

// Extract media
refs := agentobs.ExtractMedia(messageContent)

OmniAgent Integration Support

The agentobs package provides building blocks for integrating with omniagent:

  • TraceManager for session-based trace lifecycle with stale cleanup
  • Sanitize() and SanitizeMap() for content sanitization
  • ExtractMedia() for extracting media references from content
  • Generic AgentEvent type for event conversion

OmniAgent is observability-agnostic—integrations are built in your application code:

import opikintegration "my-agent/integrations/opik"  // Your app's integration

opikHook, _ := opikintegration.New(
    opikintegration.WithClient(opikClient),
    opikintegration.WithTags("env:production"),
)

agent, _ := agent.New(config,
    agent.WithCompiledHook(opikHook),
)

Event Mapping

OmniAgent Event Opik Action
EventSessionCreated Create trace agent.session.{id}
EventMessageReceived Create span message.user
EventToolCalled Create span tool.{name}
EventToolCompleted End tool span with result/error
EventMessageSent Create span message.assistant
EventSessionUpdated Touch trace (reset stale timer)

Documentation

Breaking Changes

None.

Migration Guide

No migration required. The new packages are additive.

Dependencies

  • Requires Go 1.21+
  • Compatible with omniagent v0.x+