Agent Event Schema (events/event.go)

omnara · internal/events/event.go · go · Apache-2.0
database, ai, lang:go, tag:events

Defines a structured event model for tracking agent activities and tool outputs. Use this to maintain consistent event logging and state tracking in AI agent systems.

// Source: https://github.com/omnara-ai/omnara | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
package events

import (
	"errors"
	"fmt"
	"time"

	"github.com/google/uuid"
)

type Kind string

const (
	KindModelOutput       Kind = "model_output"
	KindToolResult        Kind = "tool_result"
	KindAgentInput        Kind = "agent_input"
	KindContextCheckpoint Kind = "context_checkpoint"
)

type Event struct {
	ID             uuid.UUID `json:"id"`
	AgentID        uuid.UUID `json:"agent_id"`
	Sequence       int64     `json:"sequence"`
	Kind           Kind      `json:"event_kind"`
	At             time.Time `json:"at"`
	IdempotencyKey string    `json:"idempotency_key,omitempty"`
}

func Ne

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key