Agent Execution State Model (agentexecution/state.go)

omnara · internal/storage/internal/agentexecution/state.go · go · Apache-2.0
ai, database, tag:state, tag:execution

Defines structs and enums that capture the persisted state of an AI agent's execution, such as turns, event boundaries, model outputs, tool decisions, and recovery metadata for the internal storage layer.

// 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 agentexecution

import (
	"time"

	"github.com/google/uuid"
)

type AgentState string

const (
	AgentActive   AgentState = "active"
	AgentArchived AgentState = "archived"
)

type Operation string

const (
	OperationNormal     Operation = "normal"
	OperationCompaction Operation = "compaction"
)

type ContextState string

const (
	ContextStarted   ContextState = "started"
	ContextSucceeded ContextState = "succeeded"
	ContextFailed    ContextState = "failed"
	ContextCanceled  ContextState = "canceled"
)

type RecoveryKind string

const (
	RecoveryNone    RecoveryKind = ""
	RecoveryR

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

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

Get a free API key