Watch Aspire live streamsDocsTry Aspire

Aspire supports writing AppHosts in multiple languages. While the orchestration engine is built on .NET, a guest/host architecture allows AppHosts written in TypeScript and Go, and additional languages in the future, to access Aspire integrations, service discovery, and the dashboard.

Aspire’s hosting integrations and deployment publishers are written in .NET and have already accumulated the runtime behavior needed for local orchestration, diagnostics, and publishing. Rewriting those integrations for every guest language would duplicate a large amount of behavior and significantly increase maintenance cost.

Instead, guest languages only declare resources such as AddRedisaddRedisAddRedis, AddPostgresaddPostgresAddPostgres, and WithReferencewithReferenceWithReference, while the .NET host handles orchestration concerns such as starting containers, wiring service discovery, running health checks, and generating deployment artifacts. The trade-off is a local IPC hop, which is much cheaper than maintaining the same integration surface independently in multiple languages.

When you run a TypeScript AppHost, the Aspire CLI orchestrates two processes:

  • Guest: your apphost.mts process, running in Node.js
  • Host: the Aspire orchestration server, running on .NET

The guest communicates with the host via JSON-RPC over a local transport: Unix sockets on macOS and Linux, and named pipes on Windows. Your code calls methods such as addRedis() or withReference(), and the generated SDK translates those calls into RPC requests.

A Go AppHost works the same way. The guest is your apphost.go program, which the CLI starts with go run ., and it calls methods such as AddRedis() and WithReference() from the generated aspire package.

Guest Process (Node.js)Managed ResourcesManaged ResourcesHost Process (Aspire Server)Host Process (Aspire Server)Local transportapphost.mtsGenerated SDK(.aspire/modules/)JSON-RPC ClientJSON-RPC ServerCapability DispatcherHosting IntegrationsDashboardContainersService Discovery
  1. The CLI prepares the host process with the required hosting packages.
  2. The ATS scanner inspects assemblies for exports and generates the SDK for your AppHost language into .aspire/modules/.
  3. The CLI starts the host process and creates the local socket or pipe endpoint.
  4. The CLI starts the guest process and passes connection details through environment variables.
  5. The guest connects and invokes capabilities such as CreateBuildercreateBuilderCreateBuilder, addRedis, build, and RunAsyncrunRun.
  6. The host orchestrates resources, starts the dashboard, and manages the application lifecycle.

The guest process authenticates to the host with a one-time token generated for that session and passed through environment variables at startup. The local transport is also protected by operating system file permissions, so only processes running as the same user can connect. There are no public network ports involved in guest-to-host communication.

The Aspire Type System, or ATS, is the contract that bridges .NET and guest languages. Every exported type that crosses the boundary gets a portable type identity derived from its assembly and type name.

CategoryDescriptionSerialization
Primitivestring, int, bool, double, and similar scalar typesJSON native values
Enum.NET enum typesString member names
HandleOpaque references to host-side objectsJSON handle envelopes
DTOData transfer objects marked for exportJSON objects
CallbackGuest-provided delegate functionsCallback identifiers
ArrayImmutable collectionsJSON arrays
List / dictionaryMutable collectionsHandles for properties, JSON for parameters
.NET typeTypeScript representation
PrimitivesNative TypeScript primitives
EnumsString literal unions
Resource typesTyped handle objects with fluent methods
DTOsInterfaces serialized as JSON
CollectionsArrays and Record<string, T>
DelegatesAsync callback functions

Resource types are passed by handle. The actual instance remains in the host process, while the TypeScript SDK keeps a reference and dispatches method calls as JSON-RPC requests.

.NET typeGo representation
Primitivesstring, bool, and float64 for numbers
EnumsString types with typed constants, such as aspire.ContainerLifetimePersistent
Resource typesInterfaces with chainable methods that return the same handle type
DTOsStructs serialized as JSON
CollectionsSlices such as []string and maps such as map[string]string
DelegatesGo functions

The Go SDK passes resource types by handle in the same way. Each resource interface wraps a handle to the host-side object, and calling a method sends a JSON-RPC request.

.NET APIs rely on inheritance, interfaces, and generics. Guest SDKs do not need to expose that full shape directly. During scanning, ATS flattens the exported type system so the generated guest API is easier to consume:

  • Concrete types receive the full set of applicable capabilities.
  • Interface relationships are expanded into directly callable members.
  • Generic constraints are resolved into exportable concrete surfaces.

That flattening means a resource such as RedisResource can expose fluent methods from shared interfaces alongside Redis-specific APIs without requiring guest languages to model the original inheritance tree.

The TypeScript SDK is generated from hosting integration assemblies. When you add an integration with aspire add, the CLI:

  1. Loads the integration assembly.
  2. Scans exported methods and types.
  3. Applies ATS rules, including polymorphism flattening.
  4. Emits typed TypeScript wrappers into .aspire/modules/.

This keeps the SDK in sync with the .NET implementation. Integration authors do not hand-write TypeScript bindings; they export their .NET APIs and the CLI generates the guest surface automatically.

For a Go AppHost, the CLI emits a Go package into .aspire/modules/. See Generated SDK.

If you’re building a hosting integration and want it to work with TypeScript AppHosts, see Multi-language integrations.

The AppHost model is the same regardless of language. A TypeScript or Go AppHost defines the same resources, references, and dependency graph as a C# AppHost. The difference is the authoring syntax.

ConceptC#TypeScriptGo
Create builderDistributedApplication.CreateBuilder(args)await createBuilder()aspire.CreateBuilder()
Add resourcebuilder.AddRedis("cache")await builder.addRedis("cache")builder.AddRedis("cache")
Reference.WithReference(db).withReference(db).WithReference(db)
Wait for.WaitFor(api).waitFor(api).WaitFor(api)
Build and runbuilder.Build().Run()await builder.build().run()builder.Build() then app.Run()

The resulting dashboard, service discovery behavior, health checks, and deployment artifacts come from the same host-side orchestration engine.