Smart365Guide logoSmart365Guide
Documentation

Developer Docs

Everything you need to integrate Smart365Guide into your product.

ASDK · Agentic SDK

Giving an agent a URL does not connect its tools. Use the new ASDK setup to expose published browser paths through MCP or the browser SDK.

Read the ASDK integration guide

Integrate an SDK guide with your AI agent

Start with one web workflow in staging. Embedding the widget and connecting an external agent are separate setup steps. Your backend remains responsible for its data and permissions. The typed guide can be exposed to any compatible tool-calling agent through an MCP or custom adapter. Codex is the tested reference; Claude, ChatGPT and local model clients need their own adapter configuration and validation before making performance claims.

  1. Register the application. Create an account, open Dashboard → Applications, register your app and allowed domains, and copy its active embed license key.
  2. Publish a bounded action. In the Network Console, register your REST or MCP provider. Define exact input schemas, scopes, approval rules, workflow steps and an independent readback check. Publish only reviewed actions.
  3. Supply the app guide. Embed the SDK and list the published capability IDs. Provide only relevant, authorized context such as a selected record or timezone. Refresh that context when the app state changes.
  4. Connect an agent adapter. The adapter reads the licensed guide and retrieves the current authorized contracts from Smart365 MCP. Use the SDK helpers to create typed tools and compact execution arguments. Configure an MCP-capable client such as the tested Codex integration, or translate these contracts into your model client's tool-calling format in a custom adapter.
  5. Grant access and test. The user connects the provider account and grants scopes. Keep the delegated agent key in the adapter/server, never in browser code. Verify exact saved fields, replay safety and revocation in staging before production.

Browser-side guide registration

Replace the license and capability ID with the values registered for your app. Load the SDK once; do not combine this manual initialization example with an auto-initializing script tag.

<script src="https://www.smart365guide.com/sdk/smart365guide.js"></script>
<script>
  const sdk = Smart365Guide.init({
    licenseKey: "YOUR_LICENSE_KEY",
    endpoint: "https://www.smart365guide.com"
  });
  Smart365Guide.registerAgentGuide({
    name: "Your product",
    version: "1",
    actions: [{
      name: "smart365_complete_job",
      capabilityId: "PUBLISHED_CAPABILITY_ID"
    }]
  }, () => ({
    timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,
    currentRoute: window.location.pathname
  }));
  sdk.ready.catch(() => {
    // Display an integration error; do not treat failure as ready.
  });
  window.addEventListener("smart365:agent-result", () => {
    // Refresh your normal authorized backend reads and UI.
  });
</script>

Inside the external agent adapter

The adapter calls Smart365Guide.getAgentGuide() in the integrated browser, then authenticates to https://www.smart365guide.com/api/v1/network/mcp with its delegated key. Fetch each listed capability with inspect_capability. Download and pin the SDK's agent-guide.mjs module for the adapter; the browser manifest never grants authority.

import { createAgentTools, agentExecutionArguments } from "./agent-guide.mjs";

const tools = createAgentTools(guide, authorizedCards);
// Expose these schemas as MCP tools or your client's tool format.
const args = await agentExecutionArguments(action, input, uniqueRequestId);
const receipt = await smartMcp.callTool({
  name: "execute_capability",
  arguments: args
});
// Forward the receipt; notify the browser to refresh its UI.
// New requests get new IDs; retries retain their original ID.

The server rechecks grants, approval and account binding on every execution. A verified receipt confirms the saved state; uncertain results need recovery, not blind write retries. The guide is bounded to 16 KB including context and rejects common credential fields. Send relevant context, rather than your entire database.

See the tested standalone FieldDesk integration source and measured comparison. The console records named agent keys, execution steps, approvals, outcomes, errors and verification timing for work through Smart365. Company-specific token usage requires metering in your agent/model adapter. Agent-key names do not verify a vendor identity or reveal an agent's private reasoning. Other model clients and native screens need their own adapter and validation.

Compact context and verified multi-step workflows

Declare the context fields each action needs, then use Smart365Guide.getAgentContext() to read just those fields. Reuse unchanged manifest revisions while reading live state afresh. Missing or oversized fields are listed explicitly, so the agent can ask for information instead of guessing.

The server SDK includes NetworkAgentClient. It reuses authorized contracts and runs an application-owned plan with durable checkpoints, stable retry keys and verified output bindings. A workflow pauses at approval or uncertainty and advances only after a verified receipt. Your application supplies the private job store and defines the final business-state check.

import { NetworkAgentClient } from '@smart365guide/sdk-agent';
const agent = new NetworkAgentClient({ key: process.env.S365_NETWORK_KEY });
const result = await agent.runWorkflow({
  requestId: savedBusinessRequestId,
  steps: reviewedWorkflowSteps,
  checkpoint: await jobStore.read(savedBusinessRequestId),
  saveCheckpoint: value => jobStore.save(savedBusinessRequestId, value)
});
// Resume with the same request and plan after owner approval.
// Earlier completed actions are not rolled back if a later step fails.

Network Console groups actual recorded steps and their verification states. Plan labels are integration-reported. External model tokens remain not measured. This release does not establish new performance savings or a Google integration.

Private agent information exchange

Register an application-bound agent in Agent Exchange. The provider publishes a typed information contract and shares an invitation with the requesting company. Both administrators approve the named agents, purpose, fields, lifetime and request budgets before information can flow.

The separate server-agent SDK is included in the downloadable package. Keep its exchange key on your server. Your provider worker polls its private inbox, checks record-level authorization in your own application and replies with only approved fields. The gateway queues information; it does not host an AI model or execute business actions.

Exchange MCP endpoint: https://www.smart365guide.com/api/v1/agent-exchange/mcp. Requests expire after 30–600 seconds. Either company can revoke sharing; package, application and credential permissions are checked throughout. Treat returned values as untrusted data. Registered credentials identify integrations, not proven AI model identities or independently verified answers.

Quickstart

1. Add the script tag

Add this one line to your HTML before the closing </body> tag:

<script src="https://www.smart365guide.com/sdk/smart365guide.js" async data-license-key="YOUR_LICENSE_KEY"></script>

2. Register your application

Create an application in Dashboard → Applications. Add each website hostname to its allowed domains and copy its active license key into the script tag. The SDK derives its API endpoint from the script URL.

3. React integration

import { useEffect } from 'react';

export function Guide() {
  useEffect(() => {
    let guide;
    const script = document.createElement('script');
    script.src = 'https://www.smart365guide.com/sdk/smart365guide.js';
    script.async = true;
    script.onload = () => {
      guide = window.Smart365Guide.init({
        licenseKey: 'YOUR_LICENSE_KEY',
        endpoint: 'https://www.smart365guide.com',
      });
    };
    document.head.appendChild(script);
    return () => {
      script.onload = null;
      script.remove();
      guide?.destroy();
    };
  }, []);
  return null;
}

4. Verify

Open your app and check that the assistant button appears. SDK initialization must return HTTP 200. An unknown or revoked key returns 401; a website outside the application’s allowed domains returns 403. Account sign-in is required for the dashboard, while customer embeds use their license key.

SDK Reference

Smart365Guide.init(config)

Initialize with licenseKey, endpoint, position, theme and hotkey. Returns an instance.

instance.destroy()

Unmount the assistant and remove its event listeners when your app component is removed.

Browser and app compatibility

Use the same script in React, Vue, Angular, Svelte, Rails, WordPress or a plain HTML app. The SDK uses browser APIs and license headers, and does not require third-party cookies or persistent storage. Dashboard sign-in requires first-party cookies. Speech recognition depends on browser support; typed input remains available.

For Electron, Tauri, WebView2 and mobile WebViews, load a registered HTTP or HTTPS app origin with JavaScript enabled. A sandboxed frame needs script and same-origin permissions. Native screens without a DOM require a platform adapter or the authenticated REST/MCP gateway; the browser widget cannot inspect them directly.

Workflow Setup

Workflows define what the AI teaches to your users. You can create them from your dashboard:

  1. Go to Dashboard → Workflows
  2. Click New Workflow
  3. Record steps using the browser recorder or define them manually
  4. Mark each action as safe or requires approval
  5. Publish the workflow to make it available to users

Desktop SDK

The public desktop SDK starter lets you embed Smart365Guide in Rust/Tauri, Rails, Python, .NET/C#, C++/Qt, Electron, WebView2, and other apps that render a web UI.

  1. Download the public starter from /downloads/smart365guide-desktop-sdk-1.1.1.zip
  2. Add smart365guide-desktop.js to your renderer process or load the hosted public script.
  3. Initialize with your license key, app name, platform, and endpoint.
  4. For Electron apps, use the included electron-preload.js bridge to expose safe native metadata to the renderer.
<script src="https://www.smart365guide.com/downloads/desktop-sdk/smart365guide-desktop.js"></script>
<script>
  Smart365GuideDesktop.init({
    licenseKey: "lk_your_license_key",
    endpoint: "https://www.smart365guide.com",
    appName: "Acme Desktop",
    platform: "electron"
  });
</script>