For the complete documentation index, see llms.txt. This page is also available as Markdown.

Quickstart

Build your first agent on the InteractiveAI platform with the iai CLI: author one policy and one routine, stand up a tool server, deploy the agent, and talk to it through the chat UI or the SDK.

Context — This guide builds a minimal but real agent — Mercedes, a car-rental assistant for "DriveAway" — on the InteractiveAI platform. The platform hosts and runs the agent; you author its content, deploy it with the iai CLI, and talk to it over the chat UI or the SDK. You don't run any agent container yourself. Time: ~30 minutes.

Prerequisites:

  • A project created in the InteractiveAI platform (an organization + project you can deploy into).

  • The iai CLI installed and authenticated — run iai login, then iai organizations / iai projects to select your org and project (or pass -o/-p on each command).

  • An LLM router API key and a project API key pair (Platform UI → Project Settings → API Keys).

  • Python 3.12+ for the tool server and the SDK client.

Every iai subcommand has --help (e.g. iai routines create --help); use it for the full flag set.

YAML examples follow manifest schema 6.1.5. Manifest and content shapes are schema-versioned and differ across runtime versions — see Versioning & compatibility.

What you'll build

  you author          platform hosts             you run / consume
  ──────────          ──────────────             ─────────────────
  system prompt  ┐
  policy         ├──► InteractiveAI ──► Mercedes ──chat UI / SDK──► you
  routine        ┘    (content +        (agent)   ◄──
  agent config        runtime)             │
                                           └──MCP──► your car-catalog tool server

Everything below is authored in the platform with iai — the platform catalog is the source of truth for your content; there's nothing to keep in sync locally. The steps: author the content (system prompt, policy, routine), stand up a tool server, then deploy the agent and chat with it.

1. Author the content in the platform

Content — the system prompt, routines, policies, glossaries, and macros — lives in the platform's versioned catalog. Each iai … create stores one item (and assigns it version 1); the agent config you write in step 3 references each by name and pins a version.

System prompt

The agent's persona and ground rules — an unstructured prompt. Create it inline:

For anything longer, put the text in a file and use --file system-prompt.txt instead of --content.

Policy

A condition → action rule applied on every turn. Put it in stay-on-topic.yaml:

(Concepts: Policies. More patterns: Authoring policies. iai policies schema prints the full field set.)

Routine

A multi-node flow. Put it in car-search.yaml:

Note the structure: a chat node (ask), a tool node (search), a chat node (present), connected by transitions — never tools and speech on the same node. This is the single most important authoring rule; see Routines.

2. Stand up the tool server

The run-search node calls cars:search_cars — a tool your agent reaches over the Model Context Protocol. You host this server; the platform-run agent connects to it at the address you'll put in the agent config, so it must be reachable from the platform (a public URL or one your platform networking allows). cars_mcp.py:

The docstring is not decoration — the agent's model reads it to decide how to call the tool. See Connecting tools.

3. Write the agent config

The agent config is what the agent does: which model it uses, which content it loads, and which tool servers it connects to. It references the content you created by name and pins exact versions. agent-config.yaml:

Things to notice:

  • This file is the agent_config block — the agent's identity (name, agent type, runtime version, secrets, endpoint) is passed as CLI flags in step 4, not written here. (The manifest reference documents the full object; the CLI splits it into config-file + flags.)

  • Every secret is a ${VAR} env-ref — the platform supplies the value at deploy time from the secret bundle; literal secrets are rejected.

  • context.* entries reference the content you authored in step 1 by name and pin an exact version.

  • mcps[].hostname is where the running agent reaches your tool server.

  • iai agents schema --schema-version 6.1.2 prints the full config schema.

4. Deploy the agent

Create the secret bundle carrying the four ${VAR} values the config references:

Then create the agent. --id is the agent type from the marketplace (interactive-agent); --version is the runtime image version (run iai agents catalog to list available versions); --endpoint exposes a URL you can reach:

The platform validates the config, fetches the pinned content, connects your tool server, and starts the agent. On first deploy it also runs startup evaluation (model calls — a minute or two for this one routine); the agent becomes reachable once that settles, and subsequent deploys reuse the evaluation cache.

To change anything later — new content versions, a different model, a runtime upgrade — edit and re-run with iai agents update driveaway-demo --file agent-config.yaml (or --version <new> for a runtime upgrade). Check progress and the assigned URL with iai agents describe driveaway-demo.

5. Talk to it

Through the chat UI

With --endpoint, the agent is exposed at a URL like https://driveaway-demo-<project-hash>.interactive.ai (read the exact one from iai agents describe driveaway-demo). The built-in chat UI is that URL with /chat appended:

Open it in a browser, sign in with the agent API key when prompted (the UI sets a cookie so its own requests authenticate), and chat with Mercedes directly — the fastest way to try the agent without writing code.

Through the SDK

For a real integration, reach the agent over the SDK at the same endpoint URL, authenticating with the AGENT_API_KEY:

chat.py:

Either way you should see the greeting, possibly a short preamble while the search tool runs, and a reply quoting the Volvo XC60 at 95 EUR/day. Try "what's the meaning of life?" to watch the stay-on-topic policy fire.

6. What just happened

  1. iai agents create submitted your config; the platform resolved the ${VAR} secrets from driveaway-secrets and loaded the prompt, routine, and policy from the catalog at their pinned versions.

  2. The agent connected to your MCP server and catalogued cars:search_cars.

  3. Your message activated the car-search routine (its condition matched); the engine walked chat → tool → chat across the turns, matching the policy set on every turn. The full mechanics: Conversation lifecycle.

Where to go next

Goal
Guide

Richer flows: branching, multi-tool

More behaviour rules

Integrate your tools / other providers' tools over MCP

A real channel (web, Zendesk, Slack)

Typed backend automations

Ground answers in documents

The full platform deploy lifecycle

Last updated

Was this helpful?