Skip to content
OpenEightDeveloper docs
Docs / Agent runtime / Delivery and shutdown checks
SDK integration

Delivery and shutdown checks

Flush buffered work and inspect delivery before shutdown.

On this pageCheck delivery while the session is openVerify shutdown and delivery

Check delivery while the session is open

Use these checks during service shutdown or when an expected Event is missing. When a managed call opens a temporary session, the SDK closes it after the call.

PythonInspect delivery after a call
status = agent.delivery_status()
print({
    "pending_records": status.pending_records,
    "failed_records": status.failed_records,
    "dropped_records": status.dropped_records,
    "last_error_code": status.last_error_code,
    "catalog_delivery_state": status.catalog_delivery_state,
})
print("publication_complete:", agent.catalog_snapshot().publication_complete)
textIllustrative delivery counts · acknowledged non-empty catalog
{"pending_records": 0, "failed_records": 0, "dropped_records": 0,
 "last_error_code": None, "catalog_delivery_state": "acknowledged"}
publication_complete: True
Interpret delivery status
SignalNext action
pending_records > 0Delivery has not settled. While the session is open, flush within a bounded timeout and inspect again.
failed_records or dropped_records > 0Delivery was not complete. Retain correlation IDs and the safe last_error_code; investigate without repeating the tool action.
publication_complete is falseInspect catalog_status() for pending, partial or failed publication. Reconcile tool registration before another governed test.
Catalog is emptyAn empty supported tool set needs no registration request. Confirm that this matches your application.
Counts settled and publication acknowledgedOpen the Run in the Console and check for the expected Event. If the tool’s outcome is uncertain, check its own record before retrying.

Flush pending records

Inside an entered Sync session, use status = agent.flush(timeout=10.0). Inside an entered Async session, use status = await agent.aflush(timeout=10.0). Choose a timeout that fits your shutdown budget, then inspect the returned counts.

Flush waits for queued delivery, not a running invocation. It does not guarantee that every item was acknowledged. After an automatic session closes, flush returns retained diagnostics rather than reopening delivery. Ordinary calls already settle their sessions; do not add flush after every call.

Verify shutdown and delivery

Unresolved delivery

Keep the Run ID and the reported error code when investigating missing Events.

Troubleshoot missing Events →

  1. Stop accepting new application requests and close abandoned streams.
  2. If records are pending, flush within your shutdown timeout. Then leave the managed context so accepted work settles.
  3. Inspect the retained delivery counts and catalog acknowledgment. Record unresolved delivery failures without rerunning an effect.
  4. Close application-owned models, backends and savers after agent cleanup finishes. If close or aclose raises CleanupIncompleteError, keep those resources alive and retry cleanup once accepted work settles.
OpenEight / Developer docsPython SDK 0.0.1

Search documentation

Build with OpenEightBuild or connect an agent, configure its controls, and inspect its activity.
Build your first agentDefine a model and tools, create an agent with OpenEight, configure policies, and run it.
Connect an existing agentKeep your existing model, tools, and agent logic. Add the OpenEight Python SDK where your agent calls tools so a policy can allow a call, block it, or pause it for approval.
Refund walkthroughSee how OpenEight checks a refund before the tool runs. USD refunds through $100 can proceed. Larger USD refunds and refunds in other currencies wait for a reviewer. All receipts in this walkthrough are simulated.
Integrate LangChainConnect your existing LangChain agent to OpenEight and verify its first governed tool call.
Integrate Deep AgentsConnect your existing Deep Agents agent to OpenEight and verify its first governed tool call.
Custom integrationsUse OpenEight with an Agent that calls tools directly or uses another framework.
Observe without enforcementConnect your Agent’s OpenTelemetry exporter to see Runs and tool activity in OpenEight. Tool calls proceed without policy checks or approval requests.
How governance worksBefore your Agent runs a governed tool, OpenEight checks the request against its active policies.
Prepare tools for governanceCheck how OpenEight classifies your Agent’s tools and confirm the intent Assist will use to draft policies.
Create policies with AssistAssist drafts rules and test cases from a policy intent. Review what the rules allow, deny or hold for approval before activating them.
Handle approvalsReview a pending tool call and decide whether the Agent may continue.
Inspect decisionsSee how your policies applied to a tool call and find out whether it executed.
Inspect runs and eventsOpen a Run to see which tools your Agent called, how long they took, and what status the Agent reported.
Configure model pricingModel rates apply across every Workspace in your organization. OpenEight uses them to calculate spend from recorded usage.
Set Agent budgetsSet cost and token limits for an Agent.
Send approval notifications to SlackSend approval requests to a Slack channel so reviewers can open them in the OpenEight Console.
Export and verify evidenceExport a Workspace evidence bundle, establish trust in its signing key, and verify recorded evidence offline with the OpenEight CLI.
TroubleshootingDiagnose SDK startup, tool publication, approval, and delivery issues.
Calls and sessionsChoose when to open a session and how to manage resources across calls.
Stream results and clean upRead incremental agent results and release resources when a reader stops early.
Threads and checkpointsSave a conversation between calls so your Agent can pick up where it left off.
Delivery and shutdown checksFlush buffered work and inspect delivery before shutdown.
Compatibility and installationFind your integration, supported runtime and SDK version.
ConfigurationConfigure connection settings, approval waiting and content capture.
Constructors and executionCreate an agent and choose its invocation methods.
LangChain optionsLook up structured output, configurable models and LangChain execution limits.
Deep Agents optionsConfigure root and child tools, filesystem permissions and MCP sources.
Tool publication and readinessPublish tool schemas, find acknowledged versions and check policy readiness.
Approval waiting and replayA managed Agent can wait in the running process or return a waiting thread for your code to resume. With a direct Python client, your code polls and replays the request.
Python API signaturesLook up parameters, defaults and return types for OpenEight Python SDK 0.0.1.