Agentic systems behave predictably only when modeled as state-space systems, not as conversational loops or emergent reasoning engines. This section formalizes the mathematical structure underlying reliable agents.
The goal is to define:
- the system state,
- the operators acting on that state,
- the projection functions that isolate domains,
- the transition map,
- and the error dynamics.
This framing turns an LLM-driven workflow into something stable, testable, and verifiable.
1. System Definition
An agentic system can be expressed as a discrete-time dynamical system:
xₜ = system state at time t uₜ = operator output (proposed transition) yₜ = verified output (accepted transition)
The system consists of:
- State extractor Pₛ
- LLM/operator f
- Verifier V
- State integrator I
2. State Representation
The state captures everything the agent should know — no more.
Examples of real states:
- A structured representation of a form
- Current browser DOM slice
- Extracted employee info
- JSON spec for a payroll workflow
- Document section currently being processed
The state is not the entire context.
It is the minimal canonical representation.
xₜ ∈ S
where S is the set of all valid system states.
3. Domain Projection (Pₛ)
Before the operator is applied, the system isolates the relevant slice:
zₜ = Pₛ(xₜ)
Pₛ removes:
- irrelevant history,
- mixed domains,
- high-entropy tokens.
This step stabilizes the latent-space trajectory by constraining the model's input domain.
Real Example
Browser automation: Extract only the visible, high-signal DOM section relevant to the next action.
Document processing: Extract only the page/section that contains the field you are extracting.
Onboarding workflow: Extract only the incomplete step + its schema.
4. Operator (LLM) Dynamics
The operator f acts on the projected state:
uₜ = f(zₜ)
This is the proposed transition, not the accepted one.
The operator is:
- nonlinear,
- domain sensitive,
- stable only within certain manifold regions.
Real Example
Given a DOM slice, the operator proposes a sequence of actions:
actions = f(DOM_slice)
Given a structured schema, the operator proposes extracted fields:
fields = f(section)
5. Verification Layer (V)
The verifier ensures the operator's output matches domain constraints.
yₜ = V(uₜ)
Where:
- If uₜ is valid → yₜ = uₜ
- If uₜ is invalid → yₜ = error or corrected value
This prevents invalid transitions from propagating.
Real Example
Field extraction:
- Required field missing → reject
- Incorrect type → reject
- Extra fields → prune
Browser actions:
- Selector not found → reject
- Ambiguous action → reject
6. State Integration (I)
After verification, the system updates the state:
xₜ₊₁ = I(xₜ, yₜ)
This step moves the system forward.
Real Example
- After clicking an element, fetch new DOM slice → new state
- After extracting document fields, update partial record → new state
- After generating compliance steps, append validated steps → new state
7. Full Closed-Loop Model
The system as a loop:
zₜ = Pₛ(xₜ) uₜ = f(zₜ) yₜ = V(uₜ) xₜ₊₁ = I(xₜ, yₜ)
This loop is stable as long as:
- Pₛ isolates the correct domain,
- f operates only on canonical forms,
- V enforces strict domain constraints,
- I updates state deterministically.
8. Error Dynamics
Errors enter the system when:
- domain projection is wrong,
- the operator lands in the wrong manifold region,
- verification is incomplete,
- the integrator propagates partial errors.
We define the error term:
eₜ = yₜ - uₜ
and the total system error over T steps:
E = Σ ||eₜ||
Lower E ⇒ more verifiable agent.
Higher E ⇒ unstable agent.
9. Real-World Failure Examples
Example 1: Browser agent goes in a loop
Cause: zₜ contains irrelevant DOM → operator f proposes wrong action → verifier missing.
Example 2: Document fields hallucinated
Cause: entire document encoded → domain mismatch → manifold drift → wrong extraction.
Example 3: Workflow plan contradicts itself
Cause: long conversation context → state not canonical → unstable f → inconsistent yₜ.
10. Why State-Space Modeling Works
Because it removes magic:
- No reliance on context
- No chain-of-thought dependence
- No full-history accumulation
- No ambiguous states
Every part is:
- measurable,
- auditable,
- controllable,
- reproducible.
This is the foundation of verifiable agentic architecture.
11. Research Directions
Future work includes:
- formal stability analysis,
- attractor mapping for f,
- structured projection encoders,
- robust integration strategies,
- optimal domain boundaries.
This forms the mathematical backbone for building reliable AI-driven systems.