Skip to content

[IMP][P0] Add live API tools to invoice_review template #21

Description

@mishrapravin114

Type

Implementation — merge a PR with working code. Not investigation.

Goal

Wire invoice_review to fetch invoice data from HTTP API or file path (env-gated), with mock fallback.

Files to create or change

examples/templates/invoice_review/tools.py ← NEW
examples/templates/invoice_review/.env.example ← NEW
examples/templates/invoice_review/README.md ← UPDATE
examples/templates/invoice_review/nodes/__init__.py ← UPDATE if needed

Implementation checklist

  • fetch_invoice(invoice_id: str) — mock JSON when INVOICE_USE_LIVE unset; else HTTP GET or read from INVOICE_FILE_DROP_DIR/{id}.json
  • submit_approval_result(invoice_id, status, notes) — dry-run log unless INVOICE_API_WRITE=1
  • ./engine validate examples/templates/invoice_review passes
  • ./engine run examples/templates/invoice_review --input '{"invoice_id":"INV-001"}' works with mocks

Done when

  • PR merged to main
  • README documents AP exception flow + env vars
  • No secrets in git

Out of scope

  • Client-specific ERP connectors (SAP, NetSuite)
  • Engine Cloud

Related (context only)

#15 integration playbook

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestphase-1Phase 1 — pilot / GTMpriority-p0P0 — critical path / do nowtype-agentVertical agent template

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions