Skip to main content
reopt Handbook
reopt Handbook
Enterprise Eve Agent Development

Core Architecture

Ch1. Eve Mental ModelCh2. Source Code AtlasCh3. Project Layout and DiscoveryCh4. Compiler and Runtime Graph

Agent Quality Design

Ch5. agent.ts, Models, CompactionCh6. Context, Skills, Dynamic CapabilitiesCh7. Tools, Approval, ConnectionsCh8. Sandbox Secure Runtime

Operational Runtime

Ch9. Channels, Auth, StreamingCh10. Subagents, Workflows, Remote AgentsCh11. Schedules, State, HooksCh12. Evals and Quality Gates

Production Operations

Ch13. Observability and DeploymentCh14. Enterprise PatternsCh15. Migration and Governance

Appendix

Official Docs CrosswalkVerification ReportUpdates
Handbook›엔터프라이즈 Eve 에이전트›Ch11. Schedules, State, Hooks
한국어English

Ch11. Schedules, State, Hooks

Connect Eve cron schedules, durable state, and stream-event hooks to automation, memory, and audit.

Key takeaways

  • Schedules, state, and hooks make an agent an operated system, not just a chat endpoint.
  • Durable state is small per-session memory; it is not a database replacement.
  • Hooks run after stream events and can fail the run, so audit code is production code.

Production agents do not only respond to users. They also run checks, remember session-scoped facts, and write audit trails.

Schedules

Schedules live under agent/schedules/ and are root-agent only.

Markdown Schedule

agent/schedules/daily-report.md
---
cron: "0 9 * * *"
---

Prepare the daily risk report for open incidents.

Markdown schedules are fire-and-forget task-mode runs. They cannot wait for human input or OAuth sign-in. Use them for read-only or already-authorized work.

Handler Schedule

agent/schedules/heartbeat.ts
import { defineSchedule } from "eve/schedules";

export default defineSchedule({
  cron: "*/15 * * * *",
  async run({ receive, appAuth }) {
    await receive({
      message: "Check stale incidents and summarize any that need attention.",
      auth: appAuth,
    });
  },
});

Handler schedules can route work through a channel and carry app-level auth context.

Schedule Standards

ConcernStandard
timezonecron is UTC unless explicitly handled
idempotencysame schedule may be triggered again
authuse appAuth for app-owned work
outputdecide where results go
failurealert and retry policy
evalsmoke schedule behavior

Durable State

defineState gives per-session durable memory.

agent/state/glossary.ts
import { defineState } from "eve/context";

export default defineState({
  default: () => ({ definitions: {} as Record<string, string> }),
});

Use state for small, session-scoped facts such as:

  • user's selected project
  • current investigation id
  • glossary entries gathered during a session
  • workflow progress markers

Do not use state for:

  • large documents
  • tenant-wide memory
  • OAuth token storage
  • data requiring complex queries

State Use Criteria

NeedUse
per-session small memorydefineState
large artifactssandbox files or object storage
tenant memorydatabase
credentialsconnection/tool auth
audit trailhooks/external log

Hooks

Hooks subscribe to runtime stream events from agent/hooks/.

agent/hooks/audit.ts
import { defineHook } from "eve/hooks";

export default defineHook({
  events: {
    "action.result": async (event, ctx) => {
      await writeAuditLog({
        sessionId: ctx.session.id,
        action: event.name,
        success: event.status === "success",
      });
    },
  },
});

Use hooks for:

  • audit logs
  • metrics
  • alerting
  • warehouse ingestion
  • incident timelines

Hook Failure Is Real Failure

If a hook throws, the turn/session can fail. Make hook code reliable:

  • isolate network calls behind retry/timeout
  • avoid throwing for optional analytics
  • use a dead-letter path for audit export failure
  • do not put business side effects only in hooks

Hook vs Channel Event Handler

SurfacePurpose
channel handlerdeliver to external platform and update adapter state
hookaudit, metrics, synchronization
toolprivileged action requested by model
instrumentationtracing and telemetry setup

Tool Result Narrowing

Hook event payloads can include tool results. Apply the same data-minimization mindset as toModelOutput.

RiskResponse
PII in audit logredact or hash
raw provider outputstore pointer instead
high-cardinality metricsaggregate
secrets in error textscrub

Operating Patterns

PatternEve surface
daily reportschedule + channel delivery
approval auditapproval-gated tool + action.result hook
session memorydefineState
incident timelinehooks + external store
stale session cleanupschedule + external DB

Checklist

ItemStandard
schedulesUTC, idempotency, alerting
statesmall and session-scoped
hooksreliable, redacted, monitored
auditexternal durable store
evalschedule/state/hook regression coverage

Related docs

Cmd. /hooks

Codex Command Master · Review lifecycle hooks and manage trust or disabled state.

Cmd. /hooks

Claude Code Command Master · Shows configured hooks and their triggers. Editing a hook changes what runs when its event occurs.

Hooks

Claude Code Complete Guide · Use Claude Code hooks for predictable automation and repository guardrails.

Cmd. /schedule

Claude Code Command Master · Create and manage cloud routines (/routines).

Ch14. Enterprise Patterns

Combine Eve features into support, research, code, back-office, analytics, and incident-response agent patterns.

Ch10. Subagents, Workflows, Remote Agents

Use Eve built-in agent tool, declared subagents, remote agents, and experimental Workflow for multi-agent design.

Ch12. Evals and Quality Gates

Use Eve eval runner and assertion surfaces to prevent agent regressions in CI and production.

On this page

SchedulesMarkdown ScheduleHandler ScheduleSchedule StandardsDurable StateState Use CriteriaHooksHook Failure Is Real FailureHook vs Channel Event HandlerTool Result NarrowingOperating PatternsChecklist