Pro-code agents are in the beta phase of development and may not be available on your enrollment. Functionality may change during active development.
main branch. Ontology type changes that exist only on the global branch are not reflected in generated types or available tools.Pro-code agents integrate with Global Branching, allowing you to develop and test agent code alongside branched Ontology and application changes without affecting the main branch. An agent running on a global branch uses that branch automatically for Ontology SDK (OSDK) and Ontology MCP reads and writes.
Before developing a pro-code agent on a global branch, ensure that:
Editor or Owner role on its Project.To develop an agent on a global branch:
Foundry creates a repository branch associated with the global branch and checks it out in the code workspace. Commit agent code changes to this repository branch as you iterate.
Run the agent from the code workspace with npm run start, as described in Build a pro-code agent in Foundry. The agent template resolves the global branch associated with the checked-out repository branch. OSDK and Ontology MCP operations then read from and write to that global branch.
If your agent calls an action, index the action's target object type on the same global branch before testing the action. In Ontology Manager, select the global branch, open the target object type, then select Index object type from the banner. Wait for indexing to finish before running the agent.
Published agent functions also receive the global branch context when invoked from a resource on the same global branch. A branched agent function and the data it writes are isolated from main and from other global branches.
Publishing makes the agent function available to resources on the same global branch:
main when the global branch is merged.Foundry creates a branched pre-release version and publishes the agent function to the global branch. Do not create the tag with Git directly; the repository interface creates the version required for a global branch.
You can republish to the same version target while iterating. Resources on the global branch that use the version target automatically resolve the latest branched pre-release. The published function is not available from main or from another global branch.
Do not change the agent API name or Ontology binding on a global branch while the agent function is published on another global branch. These values identify the function across global branches.
When the agent and its dependent resources are ready, create and merge a global branch proposal. Foundry merges the repository changes and publishes the selected stable version target to main. Resources that used the branched version target then resolve the stable version on main.
Before merging, ensure that the version target is still available on main and resolve any checks shown in the Global Branching application.