Run the Textual application.
When server_kwargs is provided (and agent is None), the app starts
immediately with a "Connecting..." banner and launches the server in the
background. Server cleanup is handled automatically after the app exits.
run_textual_app(
*,
agent: Any = None,
assistant_id: str | None = None,
backend: CompositeBackend | None = None,
auto_approve: bool = False,
cwd: str | Path | None = None,
thread_id: str | None = None,
resume_thread: str | None = None,
initial_prompt: str | None = None,
initial_skill: str | None = None,
mcp_server_info: list[MCPServerInfo] | None = None,
profile_override: dict[str, Any] | None = None,
server_proc: ServerProcess | None = None,
server_kwargs: dict[str, Any] | None = None,
mcp_preload_kwargs: dict[str, Any] | None = None,
model_kwargs: dict[str, Any] | None = None
) -> AppResult| Name | Type | Description |
|---|---|---|
agent | Any | Default: NonePre-configured LangGraph agent (optional). |
assistant_id | str | None | Default: NoneAgent identifier for memory storage. |
backend | CompositeBackend | None | Default: NoneBackend for file operations. |
auto_approve | bool | Default: FalseWhether to start with auto-approve enabled. |
cwd | str | Path | None | Default: NoneCurrent working directory to display. |
thread_id | str | None | Default: NoneThread ID for the session.
|
resume_thread | str | None | Default: NoneRaw resume intent from Resolved asynchronously during TUI startup. |
initial_prompt | str | None | Default: NoneOptional prompt to auto-submit when session starts. |
initial_skill | str | None | Default: NoneOptional skill name to invoke when session starts. |
mcp_server_info | list[MCPServerInfo] | None | Default: NoneMCP server metadata for the |
profile_override | dict[str, Any] | None | Default: NoneExtra profile fields from |
server_proc | ServerProcess | None | Default: NoneLangGraph server process for the interactive session. |
server_kwargs | dict[str, Any] | None | Default: NoneKwargs for deferred |
mcp_preload_kwargs | dict[str, Any] | None | Default: NoneKwargs for concurrent MCP metadata preload. |
model_kwargs | dict[str, Any] | None | Default: NoneKwargs for deferred When provided, model creation runs in a background worker after first paint so the splash screen appears immediately. |