20  Deployment Patterns

Production deployment:

20.1 One-Tool Programmable Gateway

For applications with a broad internal SDK, prefer a host-registered module over a large set of separate tools. The host registers a narrow facade object, and sandboxed Tactus code imports it with require(...).

runtime = TactusRuntime(procedure_id="host-gateway")
runtime.register_python_module("your_app", app_module)
local app = require("your_app")
return app.api.list({})

The model can compose the module APIs into a task-specific tool by writing code. Because Tactus has Agent as a first-class primitive, that code can also call a bounded sub-agent with access to the host module. This keeps the base MCP context small: document the gateway and its discovery calls first, then let the agent request focused docs when it needs a particular capability. Plexus uses this pattern for its execute_tactus MCP server: one MCP tool accepts a Tactus snippet, and the runtime injects plexus as a global host module. It keeps MCP client setup small while leaving authentication, policy, tracing, budgets, and SDK implementation inside the host application.