Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Build an Auditable AI Phone Workflow with Telnyx Missions

Description and use

Многоэтачная система Telnyx Missions позволяет создавать долговечные миссии, запуски, планы и типизированные события, чтобы предоставить однонанодорожное задотельствное доказательство того, что было запланировано, наблюдалось и как закончился запуск. execute.py гарантирует, что каждый наблюдаемый переход状态 регистрируется, а платформа outcomes никогда не выдумываются. audit.py читает серверное состояние и渲染вает отчёт с

Problem

An AI phone workflow can return a successful response and still leave a difficult question unanswered: what actually happened? Reviewers need the objective, approved plan, every observed state transition, the assistant associated with the run, and the final result in one durable record.

Outcome

The sample produces a durable, queryable audit trail that captures the mission objective, the approved plan, every observed state transition, the assistant associated with the run, and the final result — rendered as a timestamped audit report — so reviewers can verify what actually happened rather than reconstructing it from process logs.

Workflow

  • Create a durable mission via POST /ai/missions with name, description, instructions, and execution_mode=external.
  • Start one execution of that mission via POST /ai/missions/{mission_id}/runs.
  • Submit an ordered three-step plan via POST /ai/missions/{mission_id}/runs/{run_id}/plan with client-selected step_id values, descriptions, and one-based sequence numbers.
  • Advance the run, steps, and event timeline by calling execute.py, which updates step statuses (pending → in_progress → completed or failed) and logs typed events (step_started, step_completed, step_failed).
  • Read fresh server state via audit.py and render the resulting ledger as a timestamped audit report.

Evidence

An AI phone workflow can return a successful response and still leave a difficult question unanswered: what actually happened?

Source

If a clinic says an assistant called a patient, confirmed an appointment, and completed the outreach plan, a reviewer may need more than application logs. They need the objective, the approved plan, every observed state transition, the assistant associated with the run, and the final result in one durable record.

Source

The important idea is simple: the audit trail is part of the workflow's API contract, not a story reconstructed later from process logs.

Source

Record every state change the worker observes, and never invent a platform outcome.

Source

Steps move from pending to in_progress, then to completed or failed. A skipped state is available for intentional no-ops.

Source

The run begins in pending. The worker can advance it through running to succeeded or failed. The API also supports paused and cancelled states for operator intervention.

Source

  • Record date: 2026-10-21T19:11:46.003Z