Skip to content

Overview

The provider-neutral core: the Agent service, its sessions, messages and turns, the event stream, and usage. Providers live in @jpowersdev/effect-agent/claude and @jpowersdev/effect-agent/codex; sessions that outlive their process in @jpowersdev/effect-agent/host.

// Everything from Agent, AgentSession, Message, Turn, AgentEvent, AgentError, Usage and UsageLimit
import { Agent, AgentFailed, TurnEnded, SessionId } from "@jpowersdev/effect-agent"
// The rest, as namespaces
import { Launcher, Pricing, ProcessTree, Watchdog } from "@jpowersdev/effect-agent"
  • Agent: Provider-neutral coding agent.
  • AgentSession: A session: one agent process working in one directory, from Agent.open.
  • Message: A message: input you give a session, identified by a MessageId.
  • Turn: A turn: the agent’s work on a message, from TurnStarted to TurnEnded, and how it ended.
  • AgentEvent: The normalized event stream.
  • AgentError: An infrastructure or protocol failure, for anything without a more specific error.
  • Usage: What a turn used: tokens, and what they cost.
  • UsageLimit: Usage-limit windows (five-hour, weekly), as Agent.status, the LimitsUpdated event and the UsageLimited failure report them.
  • Launcher: Control over how agent processes start.
  • Pricing: Token prices, for providers that report tokens but not cost (Codex).
  • ProcessTree: Stopping everything an agent started.
  • Watchdog: Idle detection shared by the providers.