How agents recreate the systems, business rules, and connected data that specialized agents need to practice enterprise work.
"An enterprise agent does not operate against a collection of APIs. It operates inside a business world."
That world contains people, customers, contractors, projects, orders, messages, approvals, and obligations. Its state is distributed across applications built by different vendors, customized by different teams, and connected through integrations that are rarely simple. An action in one system can change what is possible in another. A technically valid API call can still be the wrong business decision.
To prepare an agent for that world, we need somewhere it can experience those relationships and consequences without putting real operations at risk.
That is the idea behind Zenera Gym: a synthetic enterprise environment for training and evaluating specialized agents.
Gym recreates the interfaces an agent uses and the coherent business reality behind them. REST APIs, tools exposed through Model Context Protocol (MCP) servers, email, calendars, ERP applications, and internal services become different ways of interacting with one synthetic world.
The distinctive part is how that world is constructed. Zenera agents build the simulated behavior and populate the connected state. The agent being trained operates inside the environment; Gym agents construct and maintain the environment around it.
The result is not just a set of convincing responses. It is a place where actions have consequences, those consequences persist, and an agent can practice doing enterprise work.
A foundation model may know a great deal about procurement, enterprise software, project management, and programming. It may understand how to call an API, interpret an invoice, or write a useful email.
But that general capability is not the same as operating inside your company.
Your SAP installation has custom objects. Your Jira projects have organization-specific statuses. An internal application exposes a workflow that does not exist in public documentation. Approval authority depends on a combination of business unit, contract value, and project phase. A supplier's legal entity, trading name, email domain, and vendor identifier do not necessarily match.
The unfamiliar environment is not simply a set of endpoints that the base model has never seen. It is the particular combination of interfaces, policies, relationships, and conventions that makes your business work.
Consider a manufacturing company, Northstar Manufacturing. A contractor, Apex Services, is scheduled to install a replacement production-line controller during a planned shutdown.
Then an email arrives:
The controller shipment is delayed. We may not be able to complete installation during the original window. Please confirm whether we should proceed with an alternative arrangement.
An agent asked to resolve this disruption needs more than email access.
The agent must connect these representations, determine what is still possible, and coordinate a response. It must not assume that a rescheduled calendar event authorizes a change order, or that a contractor's assurance constitutes delivery acceptance.
Even when every tool call is syntactically correct, the overall workflow can fail.
"Knowing how to use the tools is not the same as knowing how to operate the business."

For some tasks, good documentation and careful instructions are sufficient. For more demanding workflows, the agent needs structured practice: opportunities to act, discover mistakes, observe consequences, and improve.
Here, "training" does not necessarily mean updating model weights. It can mean improving the agent's instructions, skills, memory, planning, tool selection, or orchestration. It can also include collecting trajectories for model training. The common requirement is an environment in which the agent can gain relevant experience.
Giving an agent tools is relatively straightforward. Giving it a realistic place to practice using those tools is much harder.
An agent learns little about consequences if it is never allowed to take consequential actions. But unconstrained exploration in production is unacceptable.
A mistaken action can send a real email, change a supplier commitment, expose confidential information, modify an access policy, or release a payment. Even a reversible action may trigger notifications, integrations, or human work that cannot simply be undone.
An agent should not discover the meaning of "approve," "release," or "cancel" by experimenting on live business operations.
Staging is valuable, but a working application is not the same as a complete operating environment.
A useful training scenario may require the same contractor to exist in six systems, a purchase order with the right history, a sequence of related messages, a calendar conflict, a pending approval, and an invoice in exactly the right state. Permissions must be appropriate. Integration jobs must behave realistically. The scenario must survive long enough for an agent to complete it.
Preparing that environment manually is expensive. Repeating the work for hundreds of variations is worse. Some external products have limited sandboxes. Some internal services have no maintained test instance. Copies of production data introduce privacy, access-control, and maintenance concerns of their own.
Staging also tends to represent the configurations and cases that engineers have already prepared, not the broad range of situations an agent needs to encounter.
A conventional mock can return an invoice with the correct fields. Another mock can return a contractor. A third can return an email about a shipment.
But do they describe the same transaction?
If the agent updates the delivery date through one API, will the project system reflect the corresponding dependency? If it sends a message, can the recipient see it? If it deletes a resource, will a later search still return it?
Mocking each endpoint separately does not answer these questions.
At enterprise scale, the combined surface can span tens of thousands of REST operations and tools exposed by multiple MCP servers. The challenge is not just implementing their response schemas. It is maintaining meaningful behavior across the operations that participate in a workflow.

"The hard part is not generating realistic records. It is making those records belong to the same world."
Zenera Gym starts from the world rather than treating every endpoint as an independent response generator.
The world contains business entities, their relationships, their history, and their current state. Service interfaces expose different representations of that world.
In the Northstar scenario, Apex Services can appear as:
V-104 in SAP.C-882 in an internal application.dispatch@apex.example in email.These are not unrelated synthetic objects that happen to have similar names. They are representations of the same contractor.
The purchase order refers to the same project discussed in email. The installation task depends on the delivery described in that order. The invoice is held for an acceptance condition that belongs to the same business process.
Coherence has several dimensions:
These distinctions matter because plausible text is a weak substitute for a consistent environment.

Real enterprises are not perfectly synchronized. A project board may lag behind the ERP. An email may contain an outdated commitment. Two applications may disagree because a synchronization job has not run.
A useful synthetic world can reproduce these conditions. The distinction is that the discrepancy has a defined explanation.
An intentional delay is part of the scenario. An accidental contradiction between two independently generated responses is a simulation defect.
Gym's objective is therefore not to make every system say the same thing. It is to make the systems behave as parts of the same reality.
A credible enterprise world cannot be specified by an API schema alone. It needs three complementary inputs: the interface contract, the business semantics, and the world story.
OpenAPI and Swagger specifications describe REST operations, parameters, request bodies, response structures, and resource relationships. MCP tool definitions describe another interaction surface: the tools an agent can invoke and the inputs those tools accept.
These contracts tell Gym what the agent can call and what a structurally valid interaction looks like.
But structure is only the beginning.
Consider an internal operation:
POST /invoices/{invoiceId}/releaseThe schema may define an invoice identifier and a response containing a status. It may not explain whether "release" means removing a hold, approving an invoice, scheduling payment, or executing a transfer.
Those are very different actions.
The meaning lives in the organization's semantic layer: its rules, domain concepts, state transitions, permissions, and integrations.
Relevant evidence can include:
For the invoice operation, that evidence might establish:
Releasing an invoice requires recorded delivery acceptance and finance approval. Release removes the payment hold. Settlement is scheduled separately by the payment service.
To recreate this behavior, Gym must preserve the distinction among acceptance, approval, release, and settlement. Returning "status": "released" to every request would match a response shape while teaching the agent the wrong business process.
Source code is particularly useful for proprietary APIs because important behavior is often absent from prose documentation. A service implementation may reveal an additional validation condition. A mapping function may show that an ERP vendor identifier corresponds to a differently named field in an internal system. An event handler may reveal that a state change triggers a downstream update rather than an immediate synchronous write.
The objective is to reconstruct the relevant behavior, not to copy an entire application or assume that a language model can infer every hidden rule.
Where documentation, tests, and source code disagree, the intended behavior needs to be resolved explicitly. Otherwise, a simulator can become confidently wrong.
The story specifies a particular business reality.
It describes who exists, what they are trying to accomplish, which transactions and commitments already exist, what has happened, and which unresolved conditions the agent will encounter.
For example:
Northstar Manufacturing is replacing a controller on production line 4. Apex Services is the installation contractor. Purchase order PO-731 covers the controller and installation. The planned shutdown ends Friday at 18:00. Apex has reported a shipment delay. Its proposed replacement technician does not yet have current site certification. Invoice INV-204 is on hold until installation is accepted. Finance has not authorized an exception.
This short description has consequences across the environment.
SAP needs the relevant contractor and purchase order. Email needs a plausible conversation history. The internal contractor service needs the technician and certification state. The calendar needs the shutdown window. Jira needs the installation task and its dependencies. The payment service needs an invoice whose state agrees with the acceptance policy.
The story is not decorative background attached to random sample data. It guides the construction of the scenario's connected state.
A good story specifies not only what exists but also what does not.
If no finance exception has been approved, searching for an approval must not cause the environment to invent one. If the replacement technician lacks certification, reading another endpoint must not produce a valid certificate merely because it would help complete the task.
The environment must preserve inconvenient facts.
Otherwise, an agent can learn to search until the simulator supplies a convenient answer rather than learning to handle a genuinely blocked workflow.
The story can contain information that is hidden from the agent under training.
Gym may know why a shipment is delayed, that a contractor will accept a particular alternative, or that a record is stale. The agent should discover those facts only through the observations available to its role.
The scenario definition belongs to the environment. It is not a privileged briefing that should silently leak into the agent's context.

The three inputs should not be confused:
"Contracts define what can be called. Semantics define what those calls mean. The story defines the situation in which they happen."
Existing world state adds the fourth element: what has happened since the run began.
Zenera Gym uses agents on both sides of the environment boundary, with different responsibilities.
The agent under training is trying to accomplish a business task.
The Gym agents construct the mechanics and content of the world in which that task takes place.
This separation matters. The environment is not another assistant trying to help the task succeed. It must preserve the scenario and its rules, including when those rules make the task difficult or impossible without escalation.
A handler agent creates executable behavior for an operation.
Its responsibility is to determine:
The handler uses the API contract, related operations, semantic reference material, and established resource bindings.
If one endpoint lists messages and another retrieves a message by identifier, both must operate on the same underlying records. If an update changes a delivery commitment, a later read must not return the previous value simply because it came through a different operation.
Handlers are checked before reuse. Structural checks can validate responses against schemas, verify that requested identifiers are preserved, and walk pagination to detect loops or inconsistent termination.
Those checks are necessary, but they are not proof of complete business fidelity. An operation that returns a valid body can still implement the wrong policy. Semantic checks must examine the behavior that matters to the workflow.
A world agent creates the records that handlers operate on.
It uses the story, reference material, and existing world state to populate people, messages, transactions, and related resources.
When a part of the world has not yet been materialized, the world agent can construct it when needed. But this is completion of an established scenario, not permission to change the facts in response to what the trained agent wants.
A first read of the contractor's mailbox might require creating the relevant message history. A later read must encounter the same history, plus any changes that have occurred since.
References also need to resolve. If an invoice refers to a purchase order, the order cannot be an unrelated object generated with a conflicting vendor or amount.
The handler for listing invoices should not embed the names, amounts, and statuses for one particular training story. It should implement how invoice listing works.
The world supplies the invoices.
That separation allows the same mechanics to support different scenarios: a routine payment, a disputed delivery, an approval exception, or a duplicate-invoice investigation.
It also avoids turning every API request into an unconstrained language-model response. Once the handler exists, ordinary execution can reuse it. Model work is concentrated on constructing behavior and extending missing world content.

Consider a request to read the contractor associated with an order.
Gym resolves the operation and validates the request. If the relevant handler has not been built, the handler agent constructs and checks it. The handler then reads the world. If scenario-defined records are missing, the world agent materializes them consistently with existing facts.
The resulting state persists. A later request can retrieve the same contractor through another operation, follow its relationship to the order, or observe a change made during the run.
For write operations, the stored change becomes part of the world the agent will encounter next.

For a large enterprise API surface, constructing every operation and every possible record before a run is wasteful.
Gym can build behavior as operations are encountered and populate the relevant world as it is explored. Frequently used handlers can be reused, and selected operations can be prepared in advance.
This changes the preparation problem. Instead of manually coding every mock and assembling every dataset, developers specify interfaces, semantic evidence, and scenarios, then inspect and validate the resulting environment.
It does not remove the need for domain expertise. It makes that expertise reusable as environment definitions rather than scattering it across thousands of unrelated fixtures.
Return to the delayed controller installation.
The agent's job is not simply to acknowledge the email. It needs to determine whether there is an acceptable recovery plan and coordinate it within policy.
The agent reads the email and identifies Apex Services. It resolves that company to the appropriate contractor and vendor records.
It checks purchase order PO-731, finds the installation task, and reads the shutdown window. The revised delivery estimate conflicts with the original schedule.
An internal contractor API reveals a further constraint: the proposed replacement technician does not have current site certification.
A poor agent might immediately reschedule the meeting and tell everyone the issue is resolved.
A better agent recognizes that moving a calendar event does not remove the certification requirement or extend a production shutdown.
The agent sends a clarification using the simulated Gmail API. It asks whether Apex can provide a certified technician within the remaining window.
That message becomes an event in the shared world.
The contractor can receive it through a simulated Microsoft email interface. It is not a separate, independently generated message that merely resembles the original. The sender and recipient views correspond to the same communication, even though provider-specific identifiers and payload structures differ.
When the scenario calls for an external participant response, a Gym-side participant can respond according to its role, knowledge, and constraints. That participant should not know the task agent's hidden reasoning or automatically agree to every request.

Suppose Apex can provide a certified technician, but only if delivery arrives before a specified cutoff.
The agent can record a conditional recovery plan, update the project task, and request confirmation from the shutdown owner. It must distinguish a proposed schedule from an approved one.
If the required approval never arrives, escalation may be the correct outcome. If delivery misses the cutoff, the plan must change again.
Meanwhile, invoice INV-204 remains on hold. An email promising delivery is not proof of acceptance. A project status update is not finance approval. The environment must preserve those distinctions across tools.

This is the difference between answering an API call and simulating an operating environment.
"The agent changes the world, then has to operate in the world it changed."
A single successful walkthrough is not enough. An agent needs experience with variations that force it to reason about constraints rather than memorize a script.
The same environment can support routine tasks, exceptions, and situations where the correct answer is to stop and request help.
Systems: SAP, warehouse management, supplier email, production planning, quality systems, and internal inventory APIs.
Task: Recover from a component shortage.
But the obvious substitute stock is quarantined. One supplier can deliver quickly but lacks approval for the relevant product line. A second supplier has an approved component with a different lead time. A planning update can protect one customer order while disrupting another.
The agent must distinguish physical availability from usable inventory, understand dependencies, and avoid moving the problem downstream without disclosure.
Systems: monitoring, ServiceNow, Jira, network and virtualization APIs, configuration records, change management, and internal MCP tools.
Task: Diagnose and mitigate a service outage.
Some topology records are stale. A monitoring alert is a symptom rather than the root cause. One diagnostic tool times out. A proposed repair requires a change approval. A retry of a write could duplicate an operation that already succeeded.
The agent must gather evidence, handle uncertain tool outcomes, respect authorization boundaries, and verify recovery rather than assume that a successful API response means the service is healthy.
Systems: ERP, project management, document repositories, calendars, payment systems, and compliance APIs.
Task: Recover a delayed project.
The contractor's proposed schedule conflicts with site access. A certificate expires before the revised date. A scope change crosses a budget threshold. A payment milestone depends on an acceptance record that has not been created.
The agent must coordinate people and systems while preserving contractual and operational constraints.
Changing the wording of a task does not necessarily create a new challenge.
Meaningful variations change the underlying situation:
These conditions make recovery, verification, and escalation part of the task.
They also expose weaknesses that a clean happy-path demonstration can hide.
Gym is the environment in which experience happens. A training or evaluation process uses that experience.
Keeping those roles separate is important. A simulator does not, by itself, define the learning algorithm, reward function, or deployment decision.
A useful run produces more than an agent's final message.
It includes the observations available at each step, the actions taken, tool results, relevant state transitions, failures, retries, and final world state.
These trajectories make it possible to distinguish an agent that solved the problem correctly from one that reached an apparently successful result by violating policy or benefiting from a simulator defect.
The experience can support:
For the installation scenario, "the agent sent an email" is not a sufficient success criterion.
More meaningful questions include:
An agent that completes the nominal task by bypassing an approval should not receive the same result as one that follows the process.
Likewise, an agent that correctly identifies an impossible task should not be penalized simply because no installation was scheduled.
Where useful, measure efficiency as well: tool calls, unnecessary writes, elapsed time, and model cost. But speed should not compensate for violating a hard constraint.
Gym agents help construct the environment. They should not be the sole authority declaring that an agent's work is correct.
Use explicit outcome checks wherever possible: inspect persisted state, verify required relationships, confirm that forbidden actions did not occur, and test business invariants.
Model-based assessment can help with communication quality or ambiguous evidence, but it should complement observable checks rather than replace them.
The environment itself also needs validation. Cross-provider message delivery, denied writes, absent approvals, and duplicate requests should behave according to their defined contracts. Otherwise, a high score may measure adaptation to simulator mistakes.
An agent can overfit to a story just as it can overfit to a dataset.
If every scenario contains the same contractor, the same endpoint sequence, and the same successful resolution, the agent may learn a script rather than transferable behavior.
Held-out evaluation should vary entities, constraints, timing, workflow structure, and failure conditions. Evaluation scenarios and expected outcomes should not leak into the agent's training context.
Repeatable comparisons also require more than a random seed. The starting world, generated behavior, relevant configurations, and external-participant behavior need to be controlled or recorded. Where outcomes are stochastic, evaluate multiple runs rather than treating one favorable result as evidence of reliability.

A synthetic environment must remain separate from production destinations, credentials, and data. Routing an agent's email tool to Gym is not sufficient if another tool can still reach a live payment service.
Simulation also does not automatically make inputs safe. Source code, documentation, and scenario material may contain confidential information. They require appropriate access controls, model-provider policies, and handling.
The goal is not merely to avoid real writes. It is to establish a controlled boundary around the entire run, including what the agent can read, what it can contact, and where its outputs can go.
"Gym supplies experience. Evaluation determines whether that experience produces better behavior."
The value of Gym is not that an agent has seen a large volume of synthetic text. It is that the agent has practiced the structure of enterprise work.
It has had to connect records across systems, identify the consequences of its actions, distinguish a proposal from an approval, recover from failures, and recognize when it should not proceed.
That is a different preparation process from giving an assistant a set of tools and hoping its general knowledge is sufficient.
No simulator should be assumed to reproduce an entire enterprise perfectly.
The useful question is which aspects of the environment determine whether an agent behaves correctly.
For invoice handling, approval and acceptance semantics may matter far more than reproducing every reporting endpoint. For incident response, asynchronous operations, permissions, and diagnostic uncertainty may be essential. For scheduling, time zones, resource conflicts, and authorization boundaries can dominate.
Fidelity should follow the workflow's risks and dependencies.
Where a behavior cannot be established from available evidence, it should be treated as an assumption to validate, not silently elevated to ground truth.
An agent that performs well in Gym still needs validation against real system behavior.
Production may contain undocumented rules, unusual data, different latency, additional integrations, or policy changes that the environment does not yet represent.
Deployment therefore remains controlled: appropriate permissions, read-only or approval-gated stages where warranted, bounded exposure, monitoring, and clear escalation paths.
As real-world discrepancies are discovered, they become inputs for better scenarios and more faithful simulation. Operational incidents and near misses can inform new cases without requiring the same risky situation to happen again during training.
This creates a durable improvement cycle: learn from the real environment, recreate the relevant challenge safely, and prepare the next agent configuration before expanding its responsibility.
Zenera Gym brings together three ideas:
That is why the name is Gym rather than simply Eval. Evaluation measures what an agent can do. A Gym provides the environment in which it can practice doing it, while also supporting rigorous testing of the result.
"We do not train an enterprise agent only to answer questions about work. We give it a world in which to practice doing the work."
See how Zenera Gym recreates your systems, business rules, and connected data so specialized agents can practice before they operate.
Request a Demo