15,000 Repositories. One Useful AI Agent.

Abstract tech illustration: 15,000 Repositories. One Useful AI Agent.

▶ Watch the video version of this article

Your proposal is approved, but the work is not done. Someone still has to check the customer record, copy the agreed items into accounting, create a draft invoice, and tell the team what happened. If those systems do not connect cleanly, a coding agent may help build the missing connection—but only if you define the handoff it must complete.

OpenAI published a customer story about iFood’s coding-agent platform and its software estate of more than 15,000 repositories. That scale is interesting. For a small business, the more useful lesson is how to turn an agent’s code into a change you can test, review, and safely operate.

What the iFood story proves—and what it does not

The iFood story shows a coding-agent platform completing work across a large engineering environment; it does not establish the return a small business should expect from its first automation. Repository count describes the size of iFood’s software estate, not the number of agents running at once or the number of repositories changed.

According to OpenAI’s customer story, iFood’s Remote Agents Platform has completed more than 25,000 tasks and consumed more than 27 billion tokens. OpenAI reports an average inference cost of US$0.04 per platform run. It also says that, after migration to the platform, an internal security product more than doubled both its fix accuracy and the number of vulnerabilities it resolved.

Those are vendor-reported deployment figures, not an independent benchmark. In particular, US$0.04 is not the cost of building or operating your automation. It is the reported average inference cost for iFood’s runs; it excludes the implementation, integrations, testing, review, hosting, and support a business workflow may need.

The architecture is more instructive than the headline. OpenAI describes a task beginning with a prompt and environment requirements submitted through a REST call. A remote runner executes it in an isolated sandbox, the platform publishes a merge request, and the result is processed into a predefined response contract using Structured Outputs. The story does not establish how every merge request is reviewed or approved before merging.

For a small business, the takeaway is not “build a platform like iFood’s.” It is: ask for a proposed code change and a verifiable result, not a chat response that says the job is done.

Pick a handoff, not an agent feature

The right first coding-agent project is a narrow handoff with a clear trigger, permitted action, and visible result. “Connect sales and accounting” leaves critical decisions open. “Create one draft invoice when an approved proposal is marked ready for invoicing” gives an implementer something testable.

Consider a business where an accepted proposal starts three manual steps: check the CRM customer, prepare an invoice, and post an internal update. A general-purpose chatbot can draft a message about that work. A coding agent can help implement a service that performs the approved parts of it through supported APIs.

Start by mapping the handoff before choosing a tool:

Decision First-version answer
Trigger An approved proposal receives ready_for_invoicing status
Required data Customer identifier, agreed items, currency, payment terms
Lookup Match an existing customer using the identifier
Permitted write Create a draft invoice
Recorded result Link the draft invoice identifier to the proposal
Human gate An owner checks the draft before it is sent
Out of scope Sending invoices, changing customer records, taking payment

The scope matters. If the customer identifier is wrong, an automated invoice can attach to the wrong account. If the event arrives again, a naïve integration can create another draft. Limiting the first release to drafts keeps the costly decision—sending a financial document—with a person.

This is also where you decide whether you need custom code at all. If your existing apps support the trigger, lookup, draft creation, and error handling you need through a conventional workflow tool, use that. Bring in a coding agent when the handoff requires custom validation, an unsupported connection, or behavior the off-the-shelf workflow cannot express reliably.

Give the agent an acceptance brief it can implement

An acceptance brief turns a vague automation request into a build-and-test assignment. It should tell the coding agent what data it may use, what it may change, how success is observed, and when it must stop. OpenAI’s Codex development-workflow example similarly emphasizes observable acceptance criteria, verification commands, approval gates, and a handoff or stop condition.

Here is a brief you can adapt. The field names and commands are illustrative; they are not claims about a particular CRM or accounting API.

job: create_draft_invoice_from_approved_proposal

trigger:
  event: proposal_status_changed
  required_status: ready_for_invoicing

required_inputs:
  - proposal_id
  - customer_identifier
  - agreed_items
  - currency
  - payment_terms

allowed_actions:
  - read_existing_customer
  - create_draft_invoice
  - record_draft_invoice_id_on_proposal

prohibited_actions:
  - create_or_edit_customer
  - send_invoice
  - charge_customer

completion:
  - draft_invoice_id_is_recorded
  - draft_matches_approved_proposal
  - owner_can_open_draft_for_review

failure_behavior:
  missing_customer_identifier: stop_and_request_input
  accounting_service_unavailable: record_retryable_failure
  repeated_proposal_event: return_existing_result

verification:
  - run_tests_for_valid_and_incomplete_proposals
  - run_duplicate_event_test
  - demonstrate_result_in_test_environment

handoff:
  - proposed_code_change
  - test_results
  - test_environment_demonstration
  - known_limitations

Provide anonymized sample records with the brief: a complete proposal, one missing a customer identifier, and a repeated event. Include the exact field mapping your team uses. “Customer” might mean a contact in one system and a billing organization in another; the agent should not guess.

Then specify the engineering deliverables. Ask for a code change you can inspect, the tests run and their results, a demonstration against a test environment, and a list of unresolved assumptions. If an API does not support a required action—or the account lacks permission—the correct result is to stop and report that limitation, not silently substitute a different workflow.

A useful instruction is: Do not send invoices. Do not create customer records to make a test pass. If the customer lookup is ambiguous, stop and return the candidate records for review. Those constraints are part of the product behavior, not merely prompting style.

Engineer the failure path before the successful one

The critical implementation problem is not creating a draft once; it is creating the correct draft despite missing data, retries, and partial failures. The service needs durable state so it can tell a new proposal event from one it has already processed.

The basic flow is straightforward:

  1. Authenticate and validate the incoming event.
  2. Confirm that the proposal is approved and ready for invoicing.
  3. Check whether this proposal already has a recorded draft.
  4. Validate the required fields and match the existing customer.
  5. Create a draft through the accounting system’s supported API.
  6. Store the result and make it available for owner review.

Step three needs more than an in-memory check. Events may arrive twice, and two workers may process them concurrently. A durable record keyed by proposal identifier, protected by a database uniqueness constraint or equivalent mechanism, prevents both workers from independently claiming the same job.

There is a subtler edge case: the accounting API creates a draft, but your service fails before saving its identifier. On retry, the local record appears incomplete. Calling “create draft” again may produce a duplicate. If the accounting API supports a stable idempotency key or searching drafts by an external proposal reference, use that capability and test it. If it does not, pause that uncertain case for human reconciliation rather than assuming another create call is safe.

The tests should prove the behavior, not just exercise the happy path:

Test input Expected observation
Valid approved proposal One draft with the agreed fields; identifier linked to proposal
Missing customer identifier No invoice created; input requested
Unknown or ambiguous customer No invoice created; review required
Accounting service unavailable Failure recorded; retry follows a defined policy
Same event delivered again Existing result returned; no second draft
Creation succeeds but local save fails Recovery or manual reconciliation; no blind second creation

The agent can write much of this code and its tests. An engineer or implementation owner still needs to confirm authentication, permissions, API behavior, secret handling, and what happens when a service is unavailable. Keep test credentials separate from production credentials, and give the integration only the access its first version requires.

Treat the output as a change request, not an approved deployment

A coding agent’s finished task should enter your normal change process: review the diff, run tests, demonstrate the workflow, and approve deployment separately. A merge request is a useful handoff artifact because it makes proposed changes inspectable; it is not proof that the business process is safe.

Structured output helps another system parse an agent’s result, but a valid response shape does not prove the invoice fields are correct. OpenAI’s Structured Outputs documentation says applications must still handle refusals, incomplete responses, and API errors, and validate business rules outside the schema. OpenAI likewise describes Codex Code Review as an additional reviewer, not a replacement for tests, branch protections, or required approvals.

Before release, ask the owner to inspect drafts produced from representative test proposals. Compare the customer, items, currency, and payment terms with the approved source record. Confirm that incomplete records stop, duplicate events do not create duplicates, and the owner knows where to find a failed job.

After release, measure the handoff you actually built. Record how long review takes, how often a person corrects a draft, how many jobs stop for missing information, and whether duplicate events are handled correctly. Compare that with the manual process before claiming time savings. Real numbers, no estimates: an impressive agent run count or a low reported inference cost cannot tell you whether your invoice workflow saves money.

A practical place to start

For a proposal-to-invoice workflow, start by identifying the repeated handoff, defining what the automation may change, and making its result reviewable. That means beginning with a draft and a testable acceptance brief—not assuming an agent can safely run billing on its own. The same approach applies to other small-business workflow automation where email, customer records, and operational tools fail to connect.


Want more like this?

BizFlowAI focuses on practical AI automation for solopreneurs and small teams. A YouTube channel link is not included here because its official URL has not been confirmed.

Lazar Milićević is a senior engineer who builds AI automations that ship.

Frequently asked questions

What can a coding agent do for a small business?

A coding agent can help build and maintain a custom connection when a business workflow does not fit an off-the-shelf tool. For example, it could help implement a service that receives an approved-proposal event, checks the customer record, and creates a draft invoice through the accounting system’s supported API. The work still needs appropriate permissions, validation, testing, and a person responsible when something fails.

How do I define a first coding-agent automation?

Write a one-page acceptance brief for one specific handoff. For proposal-to-invoice automation, name the trigger, required customer and payment details, the action of creating a draft invoice, and the invoice identifier the system should return. Specify that a person approves the draft before it is sent. Also define what happens when an identifier is missing, the accounting service is unavailable, or the same proposal arrives twice.

How do I test a coding-agent-built invoice workflow?

Give the coding agent or implementation partner an acceptance brief and anonymized sample records. Ask for a proposed change, test results, and a demonstration in a test environment. Check that valid records create the expected drafts, incomplete records stop, and repeated events do not create duplicate invoices. Keep the first version limited to drafts, and track review time and corrections before claiming time savings.

Why does repository count matter when evaluating a coding-agent deployment?

Repository count shows the scale of a software environment, not the value a coding-agent deployment produced. OpenAI’s customer story says iFood applies coding agents across 15,000 repositories, but that figure does not establish how many agents worked simultaneously, how many changes reached production, or how much money was saved. For a first small-business automation, a completed handoff that can be tested and reviewed is a more useful criterion.