ntro.workspace.Client is how you talk to Ntropii from Python. It wraps the same surface the CLI and MCP server use, organised into resource accessors.
Construction
- from_config
- Explicit
connection= param > env vars (NTRO_HOST, NTRO_API_KEY) > the connection named here > default_connection_name in the config file.Resource accessors
Each property onClient returns a resource client. All methods come in async + _sync flavours.
Identity
Integrations
Tenants & entities
Runbooks
A runbook is the deterministic Python templates that drive a workflow. Runbooks live inrunbook-templates/runbooks/<slug>/ and get deployed to the worker. The SDK surfaces them for browsing, fetching the LLM-facing skill definition, and pushing bundles.
Workflows
A workflow binds a runbook to an entity, optionally on a schedule. Per N-80, workflows are anchored to arunbookSlug (the deployed code identifier on the worker); a workflow with a friendly name like "Acme NAV monthly" dispatches to the registered nav-monthly worker code.
Most of the time, you won’t call these directly. The CLI’s
ntro workflow create --path ./runbooks/X/ --tenant T --entity E --schedule … wraps runbook deploy + workflow binding in a single
command. Use the resource accessors here when scripting or building
your own flow.Agents (external)
External agents are references to Managed Agents on host platforms (Anthropic, GitHub/Microsoft, …) that runbook steps can invoke viantro.workflow.agents.invoke. The SDK surfaces registration and lifecycle.
Agents are tenant-scoped. The same Anthropic agent id can be registered under multiple tenants — each registration becomes a separate Ntropii agent row with its own API key.
ntro.workflow.agents for the invoke API.
Tasks (workflow runs)
Async usage
Every method is async-first. Use it when you need concurrency or when you’re inside an async context (Temporal activities, FastAPI handlers):_sync wrappers are a convenience for scripts and notebooks — they call asyncio.run() internally and will fail if used inside an async function.
Exception types
All inherit from a common
NtroError base if you want a catch-all.
What’s next
Build runbooks
Concept walkthrough for authoring a runbook from scratch.
ntro.workflow
API reference for
NtroWorkflow, @runbook.step, and the orchestration primitives.Register agents
Bring an external agent (Claude Managed, Copilot) into a runbook step.
MCP server
Same surface, exposed to coding agents.