> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agentium.in/llms.txt
> Use this file to discover all available pages before exploring further.

# @agentium/harness API reference

> Complete signatures and types for both public entrypoints of @agentium/harness.

The package exports **116 symbols** from `@agentium/harness` and **1** from `@agentium/harness/testing`. This reference includes their full public declarations, including every configuration field and public method.

Start with the [package quickstart](/harness/quickstart). The [runtime guide](/harness/runtime) explains defaults and failure behavior. This reference targets `@agentium/harness@4.0.0`; see [release and upgrade guidance](/reference/releases).

## Definitions and abilities

Compose definitions, implement abilities, and validate portable manifests.

* [`Ability`](/harness/api/definitions#ability)
* [`AbilityDefinition`](/harness/api/definitions#abilitydefinition)
* [`AbilityDescription`](/harness/api/definitions#abilitydescription)
* [`defineAbility`](/harness/api/definitions#defineability)
* [`defineHarness`](/harness/api/definitions#defineharness)
* [`describeHarness`](/harness/api/definitions#describeharness)
* [`exportManifest`](/harness/api/definitions#exportmanifest)
* [`extendHarness`](/harness/api/definitions#extendharness)
* [`hashManifest`](/harness/api/definitions#hashmanifest)
* [`loadManifest`](/harness/api/definitions#loadmanifest)
* [`AbilityBinding`](/harness/api/definitions#abilitybinding)
* [`AbilityFactory`](/harness/api/definitions#abilityfactory)
* [`AbilitySelection`](/harness/api/definitions#abilityselection)
* [`BoundHarness`](/harness/api/definitions#boundharness)
* [`HarnessContextBudget`](/harness/api/definitions#harnesscontextbudget)
* [`HarnessContextEntry`](/harness/api/definitions#harnesscontextentry)
* [`HarnessContextSource`](/harness/api/definitions#harnesscontextsource)
* [`HarnessDefaults`](/harness/api/definitions#harnessdefaults)
* [`HarnessDefinition`](/harness/api/definitions#harnessdefinition)
* [`HarnessDescription`](/harness/api/definitions#harnessdescription)
* [`HarnessDiagnostic`](/harness/api/definitions#harnessdiagnostic)
* [`HarnessExtension`](/harness/api/definitions#harnessextension)
* [`HarnessManifest`](/harness/api/definitions#harnessmanifest)
* [`HarnessMiddleware`](/harness/api/definitions#harnessmiddleware)
* [`JsonObject`](/harness/api/definitions#jsonobject)
* [`JsonValue`](/harness/api/definitions#jsonvalue)
* [`LocalAbilityUse`](/harness/api/definitions#localabilityuse)
* [`PromptFragment`](/harness/api/definitions#promptfragment)
* [`ResolvedHarness`](/harness/api/definitions#resolvedharness)

## Presets and context

Built-in abilities, research presets, file context, and MCP resource connections.

* [`MCPResourceClient`](/harness/api/presets#mcpresourceclient)
* [`MCPResourceGrant`](/harness/api/presets#mcpresourcegrant)
* [`MCPResourcesOptions`](/harness/api/presets#mcpresourcesoptions)
* [`mcpResources`](/harness/api/presets#mcpresources)
* [`BaseOptions`](/harness/api/presets#baseoptions)
* [`FileContextOptions`](/harness/api/presets#filecontextoptions)
* [`ResearchOptions`](/harness/api/presets#researchoptions)
* [`SuppliedToolsOptions`](/harness/api/presets#suppliedtoolsoptions)
* [`TextContextOptions`](/harness/api/presets#textcontextoptions)
* [`base`](/harness/api/presets#base)
* [`fileContext`](/harness/api/presets#filecontext)
* [`research`](/harness/api/presets#research)
* [`suppliedTools`](/harness/api/presets#suppliedtools)
* [`textContext`](/harness/api/presets#textcontext)

## Runtime and run handles

Runtime construction, grants, budgets, execution services, results, and controls.

* [`ExecutionDriver`](/harness/api/runtime#executiondriver)
* [`HarnessBudgets`](/harness/api/runtime#harnessbudgets)
* [`HarnessDriverOutput`](/harness/api/runtime#harnessdriveroutput)
* [`HarnessExecutionServices`](/harness/api/runtime#harnessexecutionservices)
* [`HarnessGrants`](/harness/api/runtime#harnessgrants)
* [`HarnessRunRequest`](/harness/api/runtime#harnessrunrequest)
* [`HarnessRuntimeConfig`](/harness/api/runtime#harnessruntimeconfig)
* [`HarnessSendMode`](/harness/api/runtime#harnesssendmode)
* [`HarnessStartOptions`](/harness/api/runtime#harnessstartoptions)
* [`RunHandle`](/harness/api/runtime#runhandle)
* [`HarnessBudgetError`](/harness/api/runtime#harnessbudgeterror)
* [`HarnessRuntime`](/harness/api/runtime#harnessruntime)
* [`HarnessUnsupportedError`](/harness/api/runtime#harnessunsupportederror)

## Execution drivers

Adapt an Agent, Team, or Workflow and implement controlled execution.

* [`agentDriver`](/harness/api/drivers#agentdriver)
* [`teamDriver`](/harness/api/drivers#teamdriver)
* [`workflowDriver`](/harness/api/drivers#workflowdriver)

## Controllers and policies

Step overrides, model roles, context projection, and completion decisions.

* [`ReflectionPolicyOptions`](/harness/api/policies#reflectionpolicyoptions)
* [`SummaryContextPolicyOptions`](/harness/api/policies#summarycontextpolicyoptions)
* [`reflectionPolicy`](/harness/api/policies#reflectionpolicy)
* [`summaryContextPolicy`](/harness/api/policies#summarycontextpolicy)
* [`CompletionDecision`](/harness/api/policies#completiondecision)
* [`CompletionPolicy`](/harness/api/policies#completionpolicy)
* [`ContextPolicy`](/harness/api/policies#contextpolicy)
* [`ContextProjection`](/harness/api/policies#contextprojection)
* [`ModelRoleBinding`](/harness/api/policies#modelrolebinding)
* [`StepController`](/harness/api/policies#stepcontroller)
* [`StepOverrides`](/harness/api/policies#stepoverrides)

## Sessions and resources

Identity-scoped session leases, snapshots, stores, and resource ownership.

* [`HarnessIdentity`](/harness/api/sessions#harnessidentity)
* [`HarnessSessionLease`](/harness/api/sessions#harnesssessionlease)
* [`HarnessSessionSnapshot`](/harness/api/sessions#harnesssessionsnapshot)
* [`HarnessSessionStore`](/harness/api/sessions#harnesssessionstore)
* [`ScopedResource`](/harness/api/sessions#scopedresource)
* [`SessionResourceLease`](/harness/api/sessions#sessionresourcelease)
* [`HarnessResourcePool`](/harness/api/sessions#harnessresourcepool)
* [`HarnessSessionConflict`](/harness/api/sessions#harnesssessionconflict)
* [`InMemoryHarnessSessionStore`](/harness/api/sessions#inmemoryharnesssessionstore)

## Events and results

Versioned events, terminal results, replay cursors, and bounded event retention.

* [`HarnessEvent`](/harness/api/events#harnessevent)
* [`HarnessEventPayload`](/harness/api/events#harnesseventpayload)
* [`HarnessReason`](/harness/api/events#harnessreason)
* [`HarnessResult`](/harness/api/events#harnessresult)
* [`HarnessStatus`](/harness/api/events#harnessstatus)
* [`HarnessEventGapError`](/harness/api/events#harnesseventgaperror)
* [`InMemoryHarnessEventStore`](/harness/api/events#inmemoryharnesseventstore)

## Runtime registries

Resolve versioned driver and policy references against host-approved implementations.

* [`HarnessRegistryEntry`](/harness/api/manifests#harnessregistryentry)
* [`HarnessRegistryReference`](/harness/api/manifests#harnessregistryreference)
* [`HarnessRuntimeBindings`](/harness/api/manifests#harnessruntimebindings)
* [`HarnessRuntimeReferences`](/harness/api/manifests#harnessruntimereferences)
* [`HarnessRuntimeRegistry`](/harness/api/manifests#harnessruntimeregistry)
* [`resolveHarnessRuntime`](/harness/api/manifests#resolveharnessruntime)

## Durable watches

Watch definitions, lifecycle methods, scheduler contracts, limits, and state.

* [`defineWatch`](/harness/api/watches#definewatch)
* [`describeWatch`](/harness/api/watches#describewatch)
* [`DurableWatch`](/harness/api/watches#durablewatch)
* [`WatchIdentity`](/harness/api/watches#watchidentity)
* [`WatchQuietHours`](/harness/api/watches#watchquiethours)
* [`WatchLimits`](/harness/api/watches#watchlimits)
* [`WatchDefinition`](/harness/api/watches#watchdefinition)
* [`WatchDefinitionInput`](/harness/api/watches#watchdefinitioninput)
* [`WatchEvent`](/harness/api/watches#watchevent)
* [`WatchSubscription`](/harness/api/watches#watchsubscription)
* [`WatchSourceBatch`](/harness/api/watches#watchsourcebatch)
* [`VerifiedWatchTrigger`](/harness/api/watches#verifiedwatchtrigger)
* [`WatchSource`](/harness/api/watches#watchsource)
* [`WatchScheduleKind`](/harness/api/watches#watchschedulekind)
* [`WatchSchedule`](/harness/api/watches#watchschedule)
* [`WatchScheduler`](/harness/api/watches#watchscheduler)
* [`WatchOperation`](/harness/api/watches#watchoperation)
* [`WatchAuthorization`](/harness/api/watches#watchauthorization)
* [`WatchServices`](/harness/api/watches#watchservices)
* [`WatchOutbox`](/harness/api/watches#watchoutbox)
* [`WatchState`](/harness/api/watches#watchstate)

## Gmail watch source

Structural Gmail client, source options, and verified push hints.

* [`GmailWatchClient`](/harness/api/gmail#gmailwatchclient)
* [`GmailWatchOptions`](/harness/api/gmail#gmailwatchoptions)
* [`gmailWatchSource`](/harness/api/gmail#gmailwatchsource)

## Driver contract testing

Validate a driver's lifecycle and event contract using the testing entrypoint.

* [`testDriverContract`](/harness/api/testing#testdrivercontract)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.