Event Types & Enums
These types are shared across the backend, TypeScript SDK, and Python SDK.
EventType
The type of event being sent to Sequenceware.
| Value | When to send |
|---|---|
run.started | Agent begins a task |
run.completed | Agent finishes successfully |
run.failed | Agent encounters an error |
step.started | Agent begins a sub-task / phase |
step.completed | Agent finishes a sub-task |
tool.called | Agent is about to use a tool |
tool.completed | Tool execution finished |
tool.blocked | Tool call was blocked by a policy |
risk.detected | Risk event flagged |
approval.requested | Approval request created |
approval.approved | Approval granted |
approval.rejected | Approval denied |
policy.matched | A policy matched a tool call |
import { EventType } from '@sequenceware/sdk';
EventType.RUN_STARTED // 'run.started'
EventType.RUN_COMPLETED // 'run.completed'
EventType.RUN_FAILED // 'run.failed'
EventType.TOOL_CALLED // 'tool.called'
EventType.TOOL_COMPLETED // 'tool.completed'
EventType.TOOL_BLOCKED // 'tool.blocked'
// ...
PolicyAction
The action a policy takes when it matches a tool call.
| Value | Description |
|---|---|
allow | Let the tool call proceed |
warn | Let it proceed, flag in dashboard |
block | Reject the tool call immediately |
require_approval | Pause until a human approves |
import { PolicyAction } from '@sequenceware/sdk';
ApprovalStatus
The status of an approval request.
| Value | Description |
|---|---|
pending | Waiting for a reviewer |
approved | Reviewer approved |
rejected | Reviewer rejected |
import { ApprovalStatus } from '@sequenceware/sdk';
ToolCallStatus
The status of a tool call after policy evaluation.
| Value | Description |
|---|---|
pending | Being processed |
completed | Execution finished |
blocked | Blocked by a policy |
awaiting_approval | Paused, waiting for approval |
import { ToolCallStatus } from '@sequenceware/sdk';
RiskSeverity
Risk severity levels.
| Value | Description |
|---|---|
low | Minor concern |
medium | Moderate concern |
high | Significant concern |
critical | Immediate attention required |
import { RiskSeverity } from '@sequenceware/sdk';
ActionType
Semantic action types for tool calls. Used with the actionHint parameter.
| Value | Description |
|---|---|
pr_create | Creating a pull request |
pr_merge | Merging a pull request |
pr_update | Updating a pull request |
branch_delete | Deleting a branch |
deploy | Deploying to an environment |
script_execute | Executing a script |
db_migrate | Running database migrations |
config_change | Changing configuration |
secret_access | Accessing secrets/credentials |
api_write | Writing via an external API |
unknown | Unclassified action |
import { ActionType } from '@sequenceware/sdk';
AgentContext
Provides additional context about the agent's intent and reasoning. Can be attached to runs and tool calls to improve observability and audit quality.
interface AgentContext {
goal?: string; // User's original task/instruction
reasoning?: string; // Agent's chain-of-thought before this action
conversationId?: string; // External reference to conversation thread
promptSummary?: string; // Summary of active prompt/context
}
| Field | Type | Description |
|---|---|---|
goal | string? | The user's original task or instruction the agent is working on |
reasoning | string? | The agent's chain-of-thought or rationale before taking this action |
conversationId | string? | External reference to the conversation thread (e.g., from a chat UI) |
promptSummary | string? | Summary of the active prompt or context window |
Pass agentContext as a parameter to startRun() and trackToolCall(). It is stored on runs and tool calls, and forwarded to approval requests for reviewer context.
import { AgentContext } from '@sequenceware/sdk';
TypeScript interfaces
All interfaces are exported from @sequenceware/sdk:
import type {
ClientConfig,
SequencewareEvent,
AgentContext,
ApprovalRequest,
Policy,
RunSummary,
AuditLog,
} from '@sequenceware/sdk';
See the Client Reference for detailed interface definitions.