Skip to content
AgentTx

gRPC API

Complete reference for agenttx.v1.AgentTxService — methods, messages, enums and status codes.

1 min readSynced from mainUpdated Sep 15, 2026

Package agenttx.v1. The source of truth is agenttx.proto.

Service

MethodRequest → Response
BeginTransactionBeginTransactionRequestBeginTransactionResponse
ExecuteStepExecuteStepRequestExecuteStepResponse
CommitTransactionCommitTransactionRequestCommitTransactionResponse
RollbackTransactionRollbackTransactionRequestRollbackTransactionResponse
GetTransactionGetTransactionRequestGetTransactionResponse

The server also exposes grpc.health.v1.Health.

BeginTransaction

FieldTypeNotes
agent_idstringup to 256 bytes, for audit
metadatamap<string, string>up to 64 entries
policyRollbackPolicy (optional)per-transaction override

RollbackPolicy fields are all optional; unset fields keep the server defaults.

FieldTypeRange
max_local_depthuint320–16
max_global_resetsuint320–16
replay_budget_factordouble0.1–1000

Response: transaction_id (UUID) and next_step_id (always 1).

ExecuteStep

FieldTypeNotes
transaction_idstringrequired
step_iduint32must equal the last next_step_id
tool_namestring1–128 bytes
arguments_jsonstringJSON object, ≤ 1 MiB; may contain ${steps.N.path}
raw_contextstring≤ 1 MiB; stored in the context log on success

Response:

FieldTypeSet when
statusStepStatusalways
output_jsonstringSUCCESS
clean_hintstringfailure
strategyRollbackStrategyalways (NONE on success)
rollback_to_stepuint32first undone step; 0 = initial state
next_step_iduint32step to send next; 0 once the transaction ended
constraintsrepeated stringaggregated hints
context_resetboolglobal reset or abort
error_categorystringfailure, e.g. foreign_key_violation
rollback_latency_msdoubletime spent compensating and restoring
abort_reasonstringFAILED
compensation_errorsrepeated stringundo actions that failed

CommitTransaction

Request: transaction_id. Response:

FieldType
committedbool
steps_committeduint32
effects_dispatcheduint32
dispatch_errorsrepeated string

RollbackTransaction

FieldTypeNotes
transaction_idstringrequired
to_stepuint32 (optional)n > 0 rewinds to before step n; unset or 0 aborts
reasonstringlogged

Response: rolled_back, next_step_id (0 if aborted), compensations_run, compensation_errors.

GetTransaction

Returns transaction_id, status (e.g. ACTIVE), next_step_id, constraints, global_resets, context (a list of {step_id, tool_name, raw_context}) and agent_id. Ended transactions return NOT_FOUND.

Enums

StepStatus: STEP_STATUS_SUCCESS, STEP_STATUS_ROLLBACK_TRIGGERED, STEP_STATUS_FAILED.

RollbackStrategy: NONE, LOCAL_BACKTRACK, DEPENDENCY_JUMP, GLOBAL_RESET, MANUAL, ABORT (each prefixed ROLLBACK_STRATEGY_).

Status codes

CodeCause
OKthe call was processed, including steps that failed and rolled back
INVALID_ARGUMENTmissing ids, step_id = 0, oversized fields, invalid policy, to_step out of range
NOT_FOUNDunknown or ended transaction
FAILED_PRECONDITIONwrong step order, transaction not active
ABORTEDwrite-write conflict at commit (the transaction was compensated)
INTERNALstorage, I/O or serialization failure