How to Build AI-native Agentic Systems That Don’t Cost Dollars and Tokens to Operate

By Arunabh Das

Published: 2026-07-29

URL: https://dasmachinelabs.substack.com/p/zero-token-architecture


Zero-Token Architecture - How to Build AI-native Agentic Systems That Don’t Cost Dollars and Tokens to Operate


The next generation of agentic systems will use AI to discover and compile workflows — then execute those workflows deterministically, reliably, and without recurring LLM inference.

Context

The first generation of AI agents is built around a simple loop:

Think → choose a tool → act → inspect the result → think again

It is an impressive pattern. It is also an expensive and fragile way to run a business process.

Every time a new customer arrives, the agent reads the instructions again. Every time an invoice is received, it reasons about the same accounting procedure again. Every time a sales lead enters the CRM, it reconstructs the same sequence of enrichment, qualification, assignment, and follow-up actions.

We are paying machines to repeatedly rediscover procedures we already know.

The next evolution of agentic software should therefore not be a larger model, a longer prompt, or an agent with access to even more tools.

It should be an architecture in which the model reasons once — and the system executes forever.

I call this a zero-token architecture.

A zero-token architecture uses AI during moments of uncertainty, but removes the LLM from the steady-state execution path of established workflows.

This does not mean zero computation. It does not mean zero infrastructure cost. It does not even mean that the system can never call a model.

It means that a known business process can run without consuming another LLM token.

Thus, the marginal cost of operating a ZTA Agent is zero.

AI agents are repeatedly interpreting what should already be software

Consider a typical sales agent.

When a lead arrives, the agent may:

-

Read the lead details.

-

Decide whether company enrichment is needed.

-

Select an enrichment tool.

-

inspect the result.

-

Decide how to score the lead.

-

Select a CRM owner.

-

Draft an acknowledgement.

-

Create a follow-up task.

-

Determine whether the workflow succeeded.

A general-purpose model may be invoked several times during that process.

That flexibility is useful when the procedure is unknown. Once the process has been accepted by the organization, however, continuing to ask an LLM what to do is analogous to asking a software developer to manually reinterpret the requirements every time a function runs.

Traditional software engineering solved this problem through compilation.

A human expresses an intention in a high-level language. A compiler converts it into an executable representation. The computer then runs that representation repeatedly without asking the programmer to explain it again.

Agentic systems can adopt the same pattern:

Natural-language intent
↓
AI-assisted workflow design
↓
Typed and validated specification
↓
Human or policy approval
↓
Deterministic execution

The model becomes a workflow compiler, not a permanent runtime dependency.

The three meanings of “zero token”

The phrase needs a precise definition because “zero token” can refer to several different ideas.

1. Zero LLM tokens during execution

The normal production path does not invoke a language model.

Rules, state machines, templates, APIs, policies, and ordinary application code perform the work.

This is the strictest form of zero-token execution.

2. Zero paid tokens

A local classifier, embedding model, or small self-hosted model may still process an input, but the organization does not incur metered inference charges.

This can reduce cost, but it is not literally token-free.

3. Near-zero-token operation

Most requests follow deterministic workflows. A model is called only when the system encounters ambiguity, a previously unseen request, an unstructured document, or an execution failure that existing code cannot resolve.

This is likely to be the most practical production architecture.

The phrase itself is not yet a formal technical standard. It has also been used humorously to describe completing work without AI and, in a separate security context, to describe preventing agents from seeing real API credentials. Here, I use it specifically to mean zero recurring LLM inference in a known workflow’s execution path.

The ZERO operating model

A production zero-token system can be organized around four stages:

Z — Zone the work

Separate work into two categories:

Deterministic work

-

A known trigger exists.

-

Inputs can be typed.

-

The procedure is established.

-

Tools have defined contracts.

-

Success can be validated.

-

Exceptions are enumerable.

Cognitive work

-

The request is novel.

-

Meaning is ambiguous.

-

Information is incomplete.

-

Multiple legitimate strategies exist.

-

The output requires research, judgement, or creativity.

The mistake is not using an LLM for cognitive work. The mistake is treating deterministic work as cognitive forever.


E — Encode successful reasoning

When an AI agent successfully completes a new task, the system should not merely save its final answer.

It should extract and store the reusable plan:

-

Trigger

-

Preconditions

-

Input schema

-

Ordered actions

-

Data dependencies

-

Tool contracts

-

Retry rules

-

Approval requirements

-

Failure paths

-

Output template

-

Validation conditions

Research into agentic plan caching supports this distinction between caching an answer and caching a reusable plan. One study reported an average serving-cost reduction of approximately 46.6% while maintaining task performance by extracting, adapting, and reusing structured plan templates.

A plan might be encoded as a versioned workflow specification:

id: enterprise-lead-intake
version: 3

trigger:
type: crm.lead.created
input_schema:
required:
- lead_id
- email
- company_domain
steps:
- id: enrich_company
tool: company.enrich
arguments:
domain: $.event.company_domain
retry:
maximum_attempts: 3
- id: score_lead
tool: lead.score
arguments:
lead: $.event
company: $.steps.enrich_company.output
- id: assign_owner
tool: crm.assign_owner
arguments:
lead_id: $.event.lead_id
score: $.steps.score_lead.output.score
territory: $.steps.enrich_company.output.country
- id: create_follow_up
tool: crm.create_task
arguments:
owner_id: $.steps.assign_owner.output.owner_id
lead_id: $.event.lead_id
due_in_hours: 24
- id: acknowledge
tool: messaging.render_and_send
arguments:
template: enterprise-lead-received
recipient: $.event.email
success:
all_steps_completed: true
on_failure:
workflow: operations.review_failed_lead

This is no longer a suggestion written in prose. It is an executable contract.

JSON Schema is well suited to this boundary because it provides a declarative language for expressing the expected structure, constraints, and data types of JSON documents.

R — Run deterministically

After a plan has been encoded, validated, and approved, a durable workflow engine executes it without asking a language model what comes next.

A production runtime should provide:

-

Durable state

-

Retries

-

Timeouts

-

Idempotency

-

Scheduled waits

-

Compensation

-

Human approval pauses

-

Versioned workflow definitions

-

Auditable execution history

Temporal, for example, defines workflow execution as durable, reliable, and scalable function execution. Its workflow model requires deterministic behaviour, while side effects such as calling external services are isolated into activities.

The runtime flow becomes:

Typed event
↓
Workflow lookup
↓
Schema validation
↓
Policy evaluation
↓
Deterministic actions
↓
Result validation
↓
Structured output

There is no agent conversation in this path.

There is no repeated chain of thought.

There is no need to send the tool catalogue, system prompt, conversation history, or organizational policies back to a model.


O — Observe exceptions

Zero-token architecture does not try to eliminate uncertainty. It contains uncertainty inside an explicit exception lane.

When a workflow cannot continue, the runtime produces a structured exception:

{
“type”: “workflow_resolution_failed”,
“workflow”: “vendor_invoice_processing”,
“execution_id”: “exec_92831”,
“reason”: “No approved tax rule exists for this jurisdiction”,
“context”: {
“jurisdiction”: “QC”,
“document_type”: “invoice”,
“currency”: “CAD”
},
“completed_steps”: [
“extract_invoice”,
“identify_vendor”
],
“allowed_actions”: [
“request_human_review”,
“propose_policy”,
“propose_workflow_patch”
]
}

Only this compact exception needs to be sent to the model.

The model can then:

-

Ask for missing information.

-

Recommend an existing workflow.

-

Propose a new branch.

-

Generate a workflow patch.

-

Escalate the decision to a person.

Once the exception has been resolved, reviewed, tested, and promoted, the same case should not require model reasoning again.

The architecture becomes a learning loop:

Unknown case
↓
AI-assisted resolution
↓
Structured workflow or rule
↓
Testing and approval
↓
Known case
↓
Zero-token execution

The system becomes less dependent on inference as it gains operational experience.

The production architecture

A serious zero-token platform needs three distinct planes.

1. AI control plane

The control plane handles uncertainty and system evolution.

It can use models such as Kimi, Claude, GPT, or a local model to:

-

Interpret natural-language requirements

-

Propose workflows

-

Generate schemas

-

Map fields between systems

-

Diagnose failed executions

-

Suggest policies

-

Create test cases

-

Explain workflow changes

-

Convert successful agent traces into reusable plans

The control plane is allowed to be probabilistic because its output is not immediately trusted.

Its proposals must pass through validation, testing, policy checks, and — where appropriate — human approval.

2. Deterministic execution plane

The execution plane runs approved workflows.

A practical stack might include:

FastAPI                 Event and API ingress
CloudEvents             Standardized event envelopes
Pydantic/JSON Schema    Typed contracts
Temporal                Durable workflow execution
PostgreSQL              Workflow registry and execution records
Redis                   Locks, deduplication, and transient state
OPA                     Policy decisions
MCP/tool adapters       External-system integrations
Jinja2                  Deterministic message rendering
OpenTelemetry           Traces, metrics, and logs

CloudEvents provides a common specification for describing event data, reducing coupling between producers and consumers.

Open Policy Agent provides a declarative policy-as-code engine that can evaluate decisions over structured input independently from application code.

OpenTelemetry provides a vendor-neutral framework for producing and exporting traces, metrics, and logs, which is essential when a single execution may span several services and external tools.

3. Exception and learning plane

The exception plane receives cases that the deterministic runtime cannot safely resolve.

It should contain:

-

An exception queue

-

Complete execution traces

-

Redacted contextual information

-

Available tools and permitted actions

-

AI-assisted diagnosis

-

Human review

-

Workflow patch generation

-

Regression-test generation

-

Controlled promotion into production

This is where an agent belongs: at the boundary of what the organization knows, not inside every routine transaction.


Five contracts make the architecture production-ready

A zero-token system should not execute freeform AI output directly.

It should rely on five versioned contracts.

1. Event contract

Defines what happened.

{
“specversion”: “1.0”,
“type”: “crm.lead.created”,
“source”: “offsidecrm”,
“id”: “evt_123”,
“time”: “2026-07-29T16:00:00Z”,
“data”: {
“lead_id”: “lead_882”,
“email”: “[email protected]”,
“company_domain”: “example.com”
}
}

2. Workflow contract

Defines which actions execute and in what order.

It must include a version, compatible input schema, required permissions, retries, failure handling, and success criteria.

3. Tool contract

Defines what every integration accepts and returns.

{
“name”: “crm.assign_owner”,
“version”: “2.1.0”,
“input_schema”: {
“type”: “object”,
“required”: [”lead_id”, “territory”],
“properties”: {
“lead_id”: {”type”: “string”},
“territory”: {”type”: “string”}
}
},
“output_schema”: {
“type”: “object”,
“required”: [”owner_id”],
“properties”: {
“owner_id”: {”type”: “string”}
}
}
}

4. Policy contract

Defines what is permitted.

Examples include:

-

Whether an email can be sent automatically

-

Whether a refund requires approval

-

Which customer records an execution may access

-

Whether a workflow can cross geographic data boundaries

-

Which tools are permitted for a particular tenant

5. Result contract

Defines what completion means.

An execution should not be considered successful merely because no exception was thrown. It must satisfy explicit postconditions.


The deterministic router

The routing order should move from the cheapest and safest method to the most expensive and flexible:

1. Explicit workflow identifier
2. Typed event mapping
3. Exact rule match
4. Previously approved workflow match
5. Classical classifier
6. Small local model
7. Frontier LLM
8. Human review

An application should prefer:

POST /workflows/enterprise-lead-intake/executions

over:

POST /agent
Content-Type: application/json
{
“message”: “A new lead arrived. Figure out what we should do.”
}

The first request supplies the decision. The second pays a model to rediscover the decision.

Natural language remains valuable as an authoring interface. It should not be the only production interface.


Idempotency is non-negotiable

Agentic workflows often call systems that modify real-world state:

-

Send an email

-

Create an invoice

-

Issue a refund

-

Update a CRM

-

Schedule a shipment

-

Place an order

Network retries must not accidentally perform these actions twice.

Each execution and each side-effecting step should therefore carry an idempotency key:

tenant_id
+ workflow_id
+ workflow_version
+ event_id
+ step_id

Stripe’s API illustrates this pattern by storing the result associated with an idempotency key and returning that result when the same operation is retried.

A deterministic workflow that is not idempotent is predictable only until its first timeout.


Testing the workflow compiler

The AI control plane should be treated like a compiler that may produce invalid code.

Every generated workflow should pass through a promotion pipeline:

Generated proposal
↓
Schema validation
↓
Static safety analysis
↓
Tool and permission validation
↓
Unit and contract tests
↓
Historical-event replay
↓
Shadow execution
↓
Human or policy approval
↓
Canary deployment
↓
Production

Static checks

Reject workflows that contain:

-

Unknown tools

-

Unresolvable data references

-

Circular dependencies

-

Missing failure handlers

-

Unbounded loops

-

Unauthorized actions

-

Unversioned dependencies

-

Side effects without idempotency

-

Outputs that cannot be validated

Replay tests

Run the proposed workflow against historical events and compare its outcomes with previously accepted results.

Shadow mode

Execute the new workflow without performing side effects. Compare its proposed actions with the current production system.

Canary mode

Send a small percentage of eligible executions to the new version and monitor error rates, exceptions, latency, and business outcomes.

The model proposes. The platform verifies.


The economics

DigitalOcean currently lists Kimi K3 at US$3 per million input tokens and US$15 per million output tokens for serverless inference.

Suppose a conventional agent consumes, per execution:

-

8,000 input tokens

-

1,000 output tokens

Its model cost is:

(8,000×3/1,000,000)+(1,000×15/1,000,000)=US$0.039(8,000×3/1,000,000)+(1,000×15/1,000,000)=US$0.039

At 100,000 executions:

100,000×US$0.039=US$3,900100,000×US$0.039=US$3,900

Now suppose an AI model compiles the workflow once using:

-

10,000 input tokens

-

2,000 output tokens

That compilation costs:

(10,000×3/1,000,000)+(2,000×15/1,000,000)=US$0.06(10,000×3/1,000,000)+(2,000×15/1,000,000)=US$0.06

The resulting economics are:

One-time AI-assisted compilation:   US$0.06
100,000 deterministic executions:   US$0 in LLM tokens

The workflow still incurs ordinary expenses for databases, compute, third-party APIs, monitoring, and engineering. Zero-token architecture eliminates a particular category of recurring cost: LLM inference on established procedures.

Prompt caching does not achieve the same result. Cached tokens are cheaper, but they are still processed and billed. A deterministic execution does not send the prompt at all.


Production metrics

The primary metric should be the zero-token hit rate:

Zero-token hit rate=successful executions without an LLM callall successful executionsZero-token hit rate=all successful executionssuccessful executions without an LLM call​

Supporting metrics should include:

-

LLM calls per completed business outcome

-

Cost per successful outcome

-

Workflow reuse rate

-

Exception rate

-

Human-escalation rate

-

Workflow-compilation frequency

-

Failed-step rate

-

Idempotency-conflict rate

-

Mean time to resolve an unknown case

-

Percentage of exceptions converted into reusable workflows

-

Cost avoided through deterministic execution

A system with a 95% zero-token hit rate is not merely cheaper than one with a 50% hit rate. It is usually more predictable, easier to test, faster, and easier to audit.


A maturity model

Level 0: Chat wrapper

Every request is sent to a model.

User → prompt → model → answer

Level 1: Tool-using agent

The model selects and invokes tools at runtime.

User → model → tool → model → tool → answer

Level 2: Cached context

System prompts and common context are cached, reducing — but not removing — inference expense.

Level 3: Reusable plans

Successful agent plans are stored and reused for related requests.

Level 4: Compiled workflows

Approved plans are converted into deterministic workflows. The model is removed from normal execution.

Level 5: Self-improving operations

Exceptions enter a controlled learning process that produces new workflows, tests, rules, and policies. The zero-token coverage of the system increases over time.

The goal is not to eliminate AI.

The goal is to progressively transform what the AI has learned into reliable software.


What should remain agentic?

Not every problem should be compiled.

LLMs remain appropriate for:

-

Open-ended research

-

Novel strategic analysis

-

Complex negotiation

-

Creative generation

-

Ambiguous customer requests

-

Unfamiliar documents

-

One-off investigations

-

Exception diagnosis

-

Workflow authoring

-

Explanations for humans

A useful rule is:

Use inference where uncertainty creates value. Use software where repetition creates value.

Trying to force every task into a deterministic workflow creates brittle systems. Sending every task through an LLM creates expensive and unpredictable systems.

The architecture should preserve a boundary between the two.


From agents to operational knowledge

The most important consequence of zero-token architecture is not cost reduction.

It is the creation of institutional memory.

In a conventional agent, knowledge remains trapped inside prompts, model weights, conversation histories, and ephemeral chains of tool calls.

In a zero-token system, accepted knowledge becomes:

-

A workflow

-

A schema

-

A policy

-

A test

-

A template

-

A versioned artifact

-

An auditable execution history

Every resolved exception can increase the organization’s automation coverage.

Every successful agent execution can become a candidate program.

Every repeated task can become cheaper, faster, and more predictable.

The system does not merely perform work.

It learns how the organization performs work — and turns that knowledge into software.


Conclusion

The first generation of AI products places a model in the middle of every interaction.

The next generation will be more selective.

Models will interpret new requirements, explore uncertain situations, diagnose exceptions, and compile solutions. Durable software will execute the established procedures.

That is the core of zero-token architecture:

Reason once.
Validate carefully.
Compile the result.
Execute repeatedly.
Invoke AI again only when reality changes.

The winning agentic platforms may not be the ones that consume the most intelligence.

They may be the ones that are best at preserving intelligence after it has been produced.

Stop paying models to rediscover procedures your organization already knows.