Skip to main content

Overview

This section documents the public API exposed by @interopio/ai-web.

AI Web is the package to use when you are building a custom assistant frontend and want direct access to agents, threads, tools, resources, Working Context, and MCP Apps from application code. It can also enable Code Mode to orchestrate tools through code.

What This Reference Covers​

The AI Web API reference is organized around these companion pages:

Main Integration Surface​

Most integrations follow the same high-level flow:

  1. Initialize io.Connect in your application.
  2. Call IoAiWebFactory(io, config).
  3. Use the returned API to list agents, create threads, run agents, inspect tools, and read resources.
  4. Optionally enable Working Context, Code Mode, and MCP Apps through configuration.

Runtime Namespaces​

The object returned by IoAiWebFactory exposes these primary namespaces:

NamespacePurpose
agentsList agents and start streaming or generated runs
threadsCreate, list, update, and delete conversation threads
toolsList tools, enable or disable them, and call them directly
resourcesList MCP resources and read resource content
systemDisconnect active MCP transports
contextAccess the Working Context API when configured
mcpAppsManage MCP App instances when configured

The returned API also includes server, but the main public integration points for frontend applications are the namespaces above.

Code Mode is configured through config.codeMode, not a separate runtime namespace. When AI Web owns the LLM request, it can virtualize tools from connected MCP servers into one model-facing tool catalog and run generated tool orchestration in an isolated environment. See CodeModeConfig for setup and Enable Code Mode for an example.

Before You Start​

AI Web expects:

  • an initialized IOConnectBrowser.API or IOConnectDesktop.API instance
  • a backend that implements the io.Intelligence Agent Protocol reachable through agentServer.baseUrl
  • optional MCP transport configuration when you want tools or resources

For a product-level explanation of where AI Web fits, see AI Web Overview.