Get Started

Build with Hikigai

Set up your workspace, deploy your first AI agent, then add the apps that use it: a web app, an Android app or an iOS app. Agents, apps and MCP servers run on GCP or AWS, on Hikigai's cloud or your own.

Beginner FriendlyNo-code agentsWeb · Android · iOSGCP & AWS

How it fits together

A project holds your agents (the AI), your apps (what your users open) and your MCP servers (tools the agents call). Apps are the only thing that can call agents at runtime, so the usual path is: set up → deploy an agent → try it in the playground → add an app that calls it.

1

Create Your Account

First, you'll need a Hikigai account. Signing in creates your personal workspace automatically.

1.
Visit login and sign in securely with your Google account.
2.
Access the developer console immediately. Use the org switcher in the sidebar to move between your personal workspace and any team organizations you join.

Personal account limits (Free)

  • 1 project · 2 agents · 0 apps / mobile apps / MCP servers
  • 10 requests/min · 20 requests/day · 5 agent invokes/day
  • Deploys use Hikigai's platform cloud (no team cloud account needed)
  • Personal workspaces cannot invite members

Apps need Pro (ask a Hikigai admin) or a team organization. Exceeding a limit returns HTTP 429 until the window resets. Full matrix: Usage Limits.

Staying personal?

Skip to Step 5: Create Project and deploy from your personal workspace. Continue below when you need a shared team org.

2

Create an Organization

Team organizations share projects, members, cloud accounts, and LLM keys. They run as Enterprise and deploy into your own cloud (not Hikigai's platform account).

1.
Open Create an organization (or use the org switcher → create).
2.
Enter an organization name (a URL-safe slug is generated for you). You become the Owner.
3.
Choose member project access:
  • Inherit: members can work on every project at their org role level.
  • Explicit: members only reach projects they are added to. Owners always see everything.
4.
Optionally add members by email and role now (they must already have a Hikigai account; they join immediately, no invite link). You can also add them later in Step 4.
5.
Click "Create organization", then switch to it in the sidebar org switcher.

Enterprise on your cloud

Team projects cannot deploy until an organization (or project) cloud account is linked. Complete Step 3 before deploying.

3

Link Cloud Accounts & Add LLM Keys

In a team org, configure shared defaults under Organization Settings. Owners and admins can edit these.

Link cloud accounts (your own cloud)

1.
Open Organization Settings → Cloud accounts.
2.
Add a GCP service-account JSON key or AWS credentials (assume-role preferred). Org accounts become the default for every project; a project can still attach its own override.
3.
Validate the credential, then use it when deploying. Setup details: Cloud accounts (GCP / AWS).

Add organization LLM keys (BYOK)

1.
In Organization Settings → LLM API keys, add keys for OpenAI, Google, Anthropic, and/or OpenRouter.
2.
These become organization defaults. Project members can still set a project-level override in project settings.

Personal vs team

Personal projects can deploy on Hikigai's platform cloud without a cloud account. Team organizations must use an org or project cloud account. LLM keys are optional but recommended so billing and quotas stay with your providers.

4

Add Members & Access

Manage the roster from Organization Members or Organization Settings. Assign each person a role that matches what they should do.

RoleCan do
OwnerFull control: members, settings, plan, delete organization.
AdminManage projects, members, cloud accounts, and LLM keys.
Release EngineerBuilds and deploys agents and apps.
Agentic / App DeveloperAgentic: agents. App Developer: apps and consuming agents.
TesterRead and invoke only; good for QA and stakeholders.
1.
Add a member by email and choose their org role. They must already have a Hikigai account; they join immediately (no invitation link).
2.
If access is Explicit, also add them to each project they need (Owners always reach all projects).
3.
Change or remove roles anytime from the members page.
5

Create a Project

Projects organize agents, apps, and MCP servers. Create them in the workspace selected in the org switcher (personal or team).

1.
Navigate to the Projects page in your console.
2.
Click "New Project" and enter a name and description (e.g. Healthcare Assistant, "AI agents for clinical documentation").
3.
Optionally attach project cloud accounts (AWS or GCP) to override the org default. Team orgs already inherit organization cloud accounts.
4.
Click "Create Project". You get a Project ID. There is no API key to copy: from your computer you sign in with hikigai login.
6

Configure Your Agent

Configure your agent with the form; no code needed.

1.
Open your project's Agents tab and click "Deploy New".
2.
Select "Config-Based" deployment mode.
3.
Fill out the form (the cloud target is at the bottom).

Agent Name

A unique identifier for your agent, e.g. clinical-note-summarizer. Apps call the agent by this name (its slug).

Description

A short summary of what the agent does (at least 10 characters).

Instruction

Tell the agent what it should do. Be specific.
You are a clinical documentation assistant. Convert patient encounter transcripts into structured SOAP notes. Extract symptoms, vital signs, diagnoses, and treatment plans.

Model

The AI model, e.g. Gemini or Claude. See the Model Registry for what you can pick.

Input Schema

What your agent accepts (JSON Schema).
{
  "type": "object",
  "properties": {
    "transcription": { "type": "string", "description": "Raw patient visit transcript" },
    "patient_id": { "type": "string", "description": "Patient identifier" }
  },
  "required": ["transcription"]
}

Output Schema

What your agent returns (JSON Schema).
{
  "type": "object",
  "properties": {
    "subjective": { "type": "string" },
    "objective": { "type": "string" },
    "assessment": { "type": "string" },
    "plan": { "type": "string" }
  }
}

Cloud target

GCP or AWS. Personal projects can leave credentials empty to use Hikigai's cloud. Team orgs pick an organization or project cloud account (the org default is used when you leave the picker on default).
Start with a simple instruction and schema. You can refine them after testing your agent. Prefer code? Upload a Python ADK agent with "Code-Based", or deploy from CI with the Agent SDK.
7

Deploy Your Agent

1.
Click "Preview Code" to review the generated code.
2.
Check the instruction, schemas, cloud target and settings.
3.
Click "Deploy Agent" and watch the live progress until it is deployed.

Prefer code? Deploy from your computer with the SDK (AgentClient().deploy(…)) after hikigai login.

8

Test Your Agent

Try your agent in the console right away:

1.
Open your project's Playground tab (or the agent's page).
2.
Enter input matching your input schema (Form or JSON; you can attach files).
3.
Check the response.

Calling the agent from your own code

  • While you develop: from your computer, after hikigai login (6 hours, your project, your role).
  • In production: from an app you add to the project (next step): a deployed web app, or a registered Android / iOS app.

Anything else is refused: an old project API key gets 401 PROJECT_KEYS_REMOVED, and a token copied out of the console gets 401 as well. This keeps your agents and your bill safe even if a key leaks.

9

Add an App

In your project open Apps → New App and choose what you are building:

App typeWhat you doWhat you get
Web AppDeploy your code from GitHub or a ZIPA live HTTPS URL. Your server code calls agents with the SDK
AndroidRegister your app (package name)A config file (hikigai-services.json) with your app's gateway URL
iOSRegister your app (bundle ID)A config file (HikigaiService-Info.plist) with your app's gateway URL
Android + iOSReact Native / Flutter: register both at onceOne registration and config file per platform
Apps need Pro or a team organization (Free has 0 apps). Every app (web or mobile) appears in the project's Apps list with its status, deployments, metrics, logs, and Stop / Resume / Redeploy.

9a. Web App

Your code runs on Hikigai (GCP or AWS) and gets a live HTTPS URL. Your server code calls agents directly; no keys to manage.

Deploying a web app

YouHikigai
  1. 1YouChoose your code

    Apps → New App → Web App → GitHub repository, or a ZIP upload.

  2. 2YouCheck the settings

    Name, port, build / start commands, size, cloud. Most are detected for you.

  3. 3HikigaiBuild and deploy

    Detects the framework, builds the container, runs it on GCP or AWS. You watch the live log.

  4. 4HikigaiYour app is live

    A live HTTPS URL, with the HIKIGAI_* variables set inside the app.

With GitHub, every push to the branch redeploys automatically (or click Redeploy).

What happens when a user uses your web app

User’s browserYour app (server)HikigaiYour agent
  1. 1User’s browserUser clicks something in your app

    The browser calls your own server route, e.g. POST /api/analyze.

  2. 2Your app (server)Your server calls the agent

    With the SDK: client.agent("icd-10-coder").invoke(note). It uses HIKIGAI_PLATFORM_URL and the app key for you.

  3. 3HikigaiHikigai checks it is your deployed app

    Calls from anywhere else are refused.

  4. 4Your agentThe agent answers

    The answer goes back to your server, which sends it to the browser.

Deploy

1.
Apps → New App → Web App → Next.
2.
Source: choose GitHub (pick a repository and branch; the first time, click Install GitHub App to give Hikigai access) or Upload (a .zip of your project, up to 500 MB).
3.
Configure: check the fields below (most are detected for you).
4.
Deploy: watch the live build log. When it finishes, the app's URL is shown on its page.

Configure fields

App Name

Shown in the console and used in the app's URL, e.g. patient-portal.

Description (optional)

A short note for your team.

Root Directory (GitHub, for monorepos)

The folder that contains the app, e.g. apps/web. Leave empty for the repository root.

Build Command / Start Command

Detected from your framework (e.g. npm run build / npm start). Change them only if your project needs something else.

Port

The port your server listens on. Detected (3000 for Node, 8000 for Python, 8080 for Go). Your app also gets it as PORT: listen on process.env.PORT / os.environ["PORT"].

CPU / Memory

Container size. The smallest (0.25 vCPU / 512 MB) is enough for most web apps; raise it for heavy servers.

Cloud target

Where it runs: Hikigai's cloud, or your organization's GCP / AWS account. Usually leave the default.

Supported frameworks

Detected automatically. If your repository has its own Dockerfile (in the root directory), it is used instead.

FrameworkDetected byDefault port
Next.js / Nuxtnext, nuxt in package.json3000
React / Vue (Vite or CRA)react-scripts, @vitejs/plugin-react, vue3000
Express / Node.jsexpress3000
FastAPIfastapi / uvicorn in requirements.txt8000
Flask / Django / Pythonrequirements.txt or pyproject.toml8000
Gogo.mod8080
Static HTMLindex.html3000

Environment variables

Hikigai sets these in your app. The HIKIGAI_* variables are locked (you can't change them); PORT follows the Port field unless you set your own PORT in the Environment tab:

VariableWhat it is
HIKIGAI_PLATFORM_URLThe address your server code uses for every Hikigai call (agents, rooms, MCP, …).
HIKIGAI_API_KEYYour app’s key. A new one on every deployment; it only works from inside this app. The SDK uses it for you.
HIKIGAI_PROJECT_IDYour project.
HIKIGAI_APP_IDThis app.
HIKIGAI_PUBLIC_PLATFORM_URLHikigai’s public address, for code that runs in the browser.
PORTThe port to listen on (the Port field).

Your own variables (database URLs, third-party keys, feature flags) go in the app's Environment tab. Mark secrets as secret; they are encrypted. Redeploy to apply changes. Never put keys in your repository.

Notifications

Your server sends notifications with client.notifications.publish(…) to topics the project's Notifications tab allows this app on. Browsers get them by web push, with a key Hikigai made for your organization (nothing to sign up for): serve hikigai-sw.js from your site's root, call enableWebPush from @hikigai/app-sdk/browser in the page, and register the result from your server with registerBrowser / register_browser. See Node App SDK → Notifications.

Manage

  • Redeploy rebuilds from GitHub (or reuses the uploaded build). With GitHub, every push to the branch redeploys automatically.
  • Stop / Resume turns the app off and on. Rollback returns to an earlier deployment.
  • Logs / Metrics show build logs, runtime logs and traffic. Settings has a custom domain and Delete.

Deploy fails or the app won't start?

Your server must listen on PORT and answer GET / with a success response (the health check). Check the build log and the Logs tab.

Next: call your agents from the app.

9b. Android App

Your app stays on your users' phones. You register it, and Hikigai gives it its own gateway URL: the app calls your agents, rooms and MCP servers there. Only your real app can use it (App Check), and you choose what it may call.

Setting up an Android app (once)

YouHikigai
  1. 1YouRegister the app

    Apps → New App → Android: package name, fingerprints, what it may use.

  2. 2HikigaiCreates your gateway URL

    Shows Building, then Live (a few minutes).

  3. 3YouDownload the config file

    hikigai-services.json → put it in the app folder. It holds gateway_url.

  4. 4YouCreate a debug token

    Development registrations only, for debug builds. It works only together with proof from your app (package name + signing key), so a copy is useless elsewhere.

What your app does when a user uses it

Your mobile appHikigaiYour agent
  1. 1Your mobile appGet an App Check token

    Challenge first, then Play Integrity (phones with Google Play) or Key Attestation (phones without). Debug builds add the debug token.

    POST {gateway_url}/v1/app-check/exchange
    { "platform": "android", "challenge": "…", "integrity_token": "…" }
  2. 2HikigaiChecks it is your real app

    Package name and signing key must match. Returns an App Check token, valid 15 minutes (5 with a debug token).

    { "app_check_token": "eyJ…", "expires_in": 900 }
  3. 3Your mobile appCall the agent

    Send the token in a header, as often as needed.

    POST {gateway_url}/v1/agents/cpt2-code-agent/invoke
    X-Hikigai-App-Check: eyJ…
    { "message": "Patient seen for…" }
  4. 4HikigaiChecks the session and what the app may use

    Refuses with APP_CHECK_REQUIRED, NOT_ALLOWED or LOGIN_REQUIRED if something is wrong.

  5. 5Your agentThe agent answers

    The answer comes back to your app.

After 15 minutes, or when a call returns 401, go back to step 1. A call that is already open (live voice, a room) keeps running.

Register

Apps → New App → Android → Next, then fill in:

Nickname (optional)

A name for your team, e.g. Acme Care.

Android package name

The applicationId in Android Studio: Gradle Scripts → build.gradle.kts (Module :app) → defaultConfig. Must match exactly; it can't be changed later.

SHA-256 signing certificate fingerprints

Lets Hikigai recognize builds signed with your key; any other build is refused, debug token or not. One per line.
  • Debug builds: in Android Studio's Terminal run .\gradlew signingReport (Windows) or ./gradlew signingReport (Mac/Linux), copy SHA-256 under Variant: debug. Each developer's machine has its own debug key: add each one (remove it to cut that developer off), or share one team debug keystore and keep it private.
  • Release (Google Play): Play Console → your app → Test and release → App integrity → App signing → App signing key certificate → SHA-256.
  • Release APKs shared as a file (Google Drive, chat): add the Upload key certificate SHA-256 from the same page; those APKs are signed with your upload key.

Play Integrity key

A Google service-account JSON key so Hikigai can check Play Integrity results. Needed for every phone with Google Play, debug builds included (phones without Google Play use Key Attestation, which needs no key):
  1. Play Console → your app → Test and release → App integrity → link a Google Cloud project. Your Google account must be an Owner of the project, or Play shows "Project not found"; a new project just for this is simplest.
  2. In that Google Cloud project, enable the Google Play Integrity API.
  3. IAM & Admin → Service accounts → Create (no roles needed), then Keys → Add key → JSON, and upload the file here.
It is stored encrypted and never sent to your app. It costs nothing: no billing account is needed, and each app gets 10,000 checks a day (raised for free on request in Play Console).

Mode

Enforce (recommended) and Monitor both refuse apps that fail App Check; Monitor also logs each failure, which helps while rolling out to existing users.

What the app may use

All agents / All MCP servers in this project (default, includes ones you add later), or Only the ones I pick (search and tick them). For Rooms and WebRTC, list room names, prefix patterns such as visit-*, or * for every room. Anything not allowed is refused with NOT_ALLOWED.

Require a signed-in end user for every call

Tick only if your app has a sign-in screen. Every call must then also send the user's sign-in token. Users are managed in the app's User Management tab and sign in from the app with /v1/auth/login (see Sign users in below).

Where the backend runs

Hikigai's cloud or your organization's cloud. Usually leave the default.

Click Register. The app's page opens and shows Building, then Live(a few minutes). Everything below is on its Overview tab. All settings except the package name can be changed later. A new app starts in Development, so debug tokens work for test builds. Before publishing, add the release fingerprints and the Play Integrity key, then click Promote to production on the Overview tab (debug tokens stop working; the config file stays the same).

Add the config file

1.
When the app is Live, click Download hikigai-services.json.
2.
In Android Studio, switch the Project panel from Android to Project view and put the file in the app folder, next to build.gradle.kts.
3.
Read gateway_url from it, for example into BuildConfig (below), then click Sync Project with Gradle Files.
{
  "config_version": 1,
  "project_id": "9016559f-…",
  "mobile_app_id": "1:9016559f:android:0f16d82127f64e7e",
  "platform": "android",
  "package_name": "com.example.myapp",
  "gateway_url": "https://android-myapp-backend-9016559f.apps.hikigaiplatform.io"
}
// app/build.gradle.kts
val hikigai = groovy.json.JsonSlurper()
    .parseText(file("hikigai-services.json").readText()) as Map<*, *>

android {
    buildFeatures { buildConfig = true }
    defaultConfig {
        buildConfigField("String", "HIKIGAI_GATEWAY_URL", "\"${hikigai["gateway_url"]}\"")
    }
}

Nothing in the file is secret. It stays the same when the backend is redeployed; download it again only if you delete the app and register it again.

Your gateway URL

gateway_url in the config file is the address your app sends every request to. You can also see it at the top of the app's page in the console, under its name. In this guide, {gateway_url} means that address. For example, with the file above:

{gateway_url}/v1/app-check/exchange → https://android-myapp-backend-9016559f.apps.hikigaiplatform.io/v1/app-check/exchange

Get an App Check token

Every call needs an App Check token in the X-Hikigai-App-Check header. It is valid for 15 minutes (5 with a debug token); get a new one when it expires or when a call returns 401. Changing a security setting of the app (what it may use, sign-in, mode, keys) or Revoke all mobile sessions ends every phone's session, so phones get a new token.

Every build, debug or release, proves it is your app the same way: it asks for a one-time challenge, gets it signed, and sends the result. Hikigai checks that the package name and the signing key match this registration.

1.
Ask for a challenge: POST {gateway_url}/v1/app-check/challenge → { "challenge": "…", "expires_in": 300 } (one use, 5 minutes).
2.
Phones with Google Play: request a Play Integrity token (library com.google.android.play:integrity), a standard request with requestHash set to the challenge (or a classic request with setNonce(challenge)).
3.
Phones without Google Play (e.g. newer Huawei): create a key in the Android Keystore with the challenge as its attestation challenge and send the key's certificate chain (Key Attestation, Android 7+).
4.
Debug builds also send a device debug token (development registrations only).
POST {gateway_url}/v1/app-check/exchange

{ "platform": "android", "challenge": "…", "integrity_token": "…" }          // with Google Play
{ "platform": "android", "challenge": "…", "key_attestation": ["MIIC…", …] } // without Google Play
// debug builds: either body plus  "debug_token": "hkdbg_…"

→ 200 { "app_check_token": "eyJ…", "expires_in": 900, "verified": true }   // 300 with a debug token

The whole thing in Kotlin (copy it as it is):

// app/build.gradle.kts
dependencies { implementation("com.google.android.play:integrity:<latest>") }
val local = java.util.Properties().apply {
    rootProject.file("local.properties").takeIf { it.exists() }?.inputStream()?.use { load(it) }
}
android {
    buildTypes {
        // The debug token lives in local.properties (hikigai.debugToken=hkdbg_…), never in Git or release builds.
        getByName("debug") { buildConfigField("String", "HIKIGAI_DEBUG_TOKEN", "\"${local.getProperty("hikigai.debugToken", "")}\"") }
        getByName("release") { buildConfigField("String", "HIKIGAI_DEBUG_TOKEN", "\"\"") }
    }
}
// AppCheck.kt (run off the main thread)
import android.content.Context
import android.os.Build
import android.security.keystore.KeyGenParameterSpec
import android.security.keystore.KeyProperties
import android.util.Base64
import com.google.android.gms.tasks.Tasks
import com.google.android.play.core.integrity.IntegrityManagerFactory
import com.google.android.play.core.integrity.StandardIntegrityManager.PrepareIntegrityTokenRequest
import com.google.android.play.core.integrity.StandardIntegrityManager.StandardIntegrityTokenRequest
import java.net.HttpURLConnection
import java.net.URL
import java.security.KeyPairGenerator
import java.security.KeyStore
import org.json.JSONArray
import org.json.JSONObject

const val CLOUD_PROJECT_NUMBER = 123456789012L // Google Cloud project linked in Play Console

// Show e.message to the user: it says why the phone was refused.
class AppCheckException(message: String) : Exception(message)

fun getAppCheckToken(context: Context): String {
    val challenge = post("/v1/app-check/challenge", JSONObject()).getString("challenge")
    val body = JSONObject().put("platform", "android").put("challenge", challenge)
    try {
        // Phones with Google Play: Google signs the challenge.
        val manager = IntegrityManagerFactory.createStandard(context)
        val provider = Tasks.await(manager.prepareIntegrityToken(
            PrepareIntegrityTokenRequest.builder().setCloudProjectNumber(CLOUD_PROJECT_NUMBER).build()))
        val token = Tasks.await(provider.request(
            StandardIntegrityTokenRequest.builder().setRequestHash(challenge).build()))
        body.put("integrity_token", token.token())
    } catch (e: Exception) {
        // No Google Play (e.g. Huawei): the phone's secure hardware signs it.
        body.put("key_attestation", JSONArray(keyAttestationChain(challenge)))
    }
    if (BuildConfig.HIKIGAI_DEBUG_TOKEN.isNotEmpty()) body.put("debug_token", BuildConfig.HIKIGAI_DEBUG_TOKEN)
    return post("/v1/app-check/exchange", body).getString("app_check_token")
}

fun keyAttestationChain(challenge: String): List<String> {
    if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N) {
        throw AppCheckException("This phone can't be verified: it needs Google Play or Android 7 or later.")
    }
    val alias = "hikigai-app-check"
    val generator = KeyPairGenerator.getInstance(KeyProperties.KEY_ALGORITHM_EC, "AndroidKeyStore")
    generator.initialize(
        KeyGenParameterSpec.Builder(alias, KeyProperties.PURPOSE_SIGN)
            .setDigests(KeyProperties.DIGEST_SHA256)
            .setAttestationChallenge(challenge.toByteArray(Charsets.UTF_8))
            .build()
    )
    generator.generateKeyPair() // replaces the previous key under this alias
    val keyStore = KeyStore.getInstance("AndroidKeyStore").apply { load(null) }
    return keyStore.getCertificateChain(alias).map { Base64.encodeToString(it.encoded, Base64.NO_WRAP) }
}

fun post(path: String, json: JSONObject): JSONObject {
    val conn = URL(BuildConfig.HIKIGAI_GATEWAY_URL + path).openConnection() as HttpURLConnection
    conn.requestMethod = "POST"
    conn.doOutput = true
    conn.setRequestProperty("Content-Type", "application/json")
    conn.outputStream.use { it.write(json.toString().toByteArray(Charsets.UTF_8)) }
    val ok = conn.responseCode < 300
    val text = (if (ok) conn.inputStream else conn.errorStream).bufferedReader().readText()
    if (!ok) {
        // e.g. { "detail": { "code": "APP_CHECK_FAILED", "message": "This phone can't be verified: …" } }
        val reason = runCatching { JSONObject(text).getJSONObject("detail").getString("message") }.getOrNull()
        throw AppCheckException(reason ?: "App Check failed (${conn.responseCode})")
    }
    return JSONObject(text)
}

CLOUD_PROJECT_NUMBER is the number of the Google Cloud project you linked for the Play Integrity key (Google Cloud console → project dashboard → Project number). Play Integrity has no stable device ID, so without sign-in each new token is a new anonymous user: agent conversations start over every 15 minutes. Turn on sign-in if your app needs continuity.

Debug tokens (development registrations only)

1.
Overview → Debug tokens → choose Device token → type a name (e.g. QA Pixel) → Create token. Copy it now; it is shown once. It expires after 24 hours; create a new one to keep testing.
2.
Put it in local.properties as hikigai.debugToken=hkdbg_… (the Gradle setup above reads it into debug builds only).
3.
The token works only together with the proof above from a build with this package name, signed with a registered key. A copy in any other app is refused. With the token, unlocked test phones are accepted too.
4.
Emulators: create them with a Google Play system image (Android Studio → Device Manager → a device with the Play Store icon), and choose Emulator token when you create the token. Google can't check the signing key on an emulator, so an emulator token still needs Play Integrity for your package name but skips the signing-key check, and expires after 6 hours. Without Google Play an emulator can't prove which app is calling, so it is refused.
Never ship a debug token in a release build. If one leaks, click Revoke next to it; to cut off a developer's machine, remove its debug key fingerprint.

Which build uses what

  • Debug build (Android Studio, a debug APK you share): proof + device debug token. Works on development registrations only.
  • Emulator (Google Play system image): Play Integrity + emulator debug token (6 hours).
  • Release build installed from Google Play, including internal testing: Play Integrity. No token; works on development and production registrations.
  • Release APK shared as a file (Google Drive, chat): Play Integrity, as long as its signing key (usually your upload key) is registered.
  • Phones without Google Play (e.g. newer Huawei): Key Attestation. Google-certified phones work today; if phones from another manufacturer are refused, the Overview tab says so and Hikigai adds that manufacturer.
  • Rooted phones, unlocked bootloaders and emulators are refused in production.

Sign users in (optional)

If your app has users, add them on the app's User Management tab (email, password, role, metadata such as a patient id), then sign them in from the app. The gateway signs users in against that same list; the phone never names a user list.

POST {gateway_url}/v1/auth/login
X-Hikigai-App-Check: <app_check_token>
{ "email": "pat@clinic.com", "password": "…" }
→ 200 { "id_token": "eyJ…", "access_token": "eyJ…", "refresh_token": "eyJ…", "expires_in": 3600, … }

GET  {gateway_url}/v1/auth/me          Authorization: Bearer <id_token>   → { "email", "first_name", "role", "metadata", … }
POST {gateway_url}/v1/auth/refresh     { "refresh_token": "…" }           → new id_token (do this every hour)
POST {gateway_url}/v1/auth/logout      Authorization: Bearer <id_token>   → signs out everywhere; delete the saved tokens
POST {gateway_url}/v1/auth/forgot-password { "email" }  →  POST /v1/auth/reset-password { "email", "code", "new_password" }

Send the ID token as Authorization: Bearer on every call when sign-in is required. Sign-in calls are limited to 20 a minute from one address. The app can also create an account (/v1/auth/signup); roles and metadata are set in User Management. Full list: API Reference → Mobile Apps.

Call your agents

POST {gateway_url}/v1/agents/{agent}/invoke
Content-Type: application/json
X-Hikigai-App-Check: <app_check_token>
Authorization: Bearer <id_token from /v1/auth/login>     (only if sign-in is required)

{ "message": "Patient seen for a 30 minute follow-up of hypertension…" }
// Kotlin (run off the main thread)
val conn = URL("${BuildConfig.HIKIGAI_GATEWAY_URL}/v1/agents/cpt2-code-agent/invoke")
    .openConnection() as HttpURLConnection
conn.requestMethod = "POST"
conn.doOutput = true
conn.setRequestProperty("Content-Type", "application/json")
conn.setRequestProperty("X-Hikigai-App-Check", appCheckToken)
val payload = org.json.JSONObject().put("message", note).toString()
conn.outputStream.use { it.write(payload.toByteArray(Charsets.UTF_8)) }
val body = (if (conn.responseCode < 300) conn.inputStream else conn.errorStream)
    .bufferedReader().readText()

The response is the agent's normal response (same as calling it from a web app). All endpoints:

EndpointUse
POST /v1/auth/login · refresh · logout, GET /v1/auth/meSign users in (users from the User Management tab)
POST /v1/agents/{agent}/invokeCall an agent, get the full answer
POST /v1/agents/{agent}/streamCall an agent, stream the answer (server-sent events)
POST /v1/agents/{agent}/live/sessionStart a live voice session with a live agent
POST /v1/rooms/{room}/tokenToken to join a WebSocket room
POST /v1/webrtc/{room}/media-tokenToken to join a WebRTC call
POST /v1/mcp/{server}Send an MCP request to one of your MCP servers
/v1/notifications/*Register for notifications, get them live or from the inbox (see Notifications below)

Notifications

Your deployed apps and the console can send notifications to the app (project → Notifications). No Firebase account is needed. The app talks to its gateway:

1.
Make a random installation ID once (16 to 128 letters, digits, - or _) and keep it. Send it as X-Hikigai-Installation-Id on every notifications call, with the App Check header (and the sign-in token when sign-in is required).
2.
Register at every start: POST /v1/notifications/devices with the time zone, language and, if you use Google's messaging library, the FCM token.
3.
While the app is open, keep GET /v1/notifications/stream open (server-sent events; reconnect when it ends after about 5 minutes). Messages arrive at once.
4.
When the app starts or wakes, call GET /v1/notifications/inbox to pick up what it missed.
5.
Report taps: POST /v1/notifications/receipts with the message's delivery_id and "opened".
POST {gateway_url}/v1/notifications/devices
X-Hikigai-App-Check: <app_check_token>
X-Hikigai-Installation-Id: <your install ID>
{ "timezone": "America/Chicago", "language": "en", "push_token": "<FCM token, if any>" }
→ 200 { "device_id": "…", "channel": "fcm", "topics": [], "room": … }    // "direct" without a token

Reaching a closed app

Without a Google key a message waits until the app next fetches its inbox, usually within 1 to 9 minutes of the app waking on its own timer. For instant delivery (optional): in the Firebase console add your Android app, then Project settings → Service accounts → Generate new private key. Add PUSH_FCM_SERVICE_ACCOUNT with the whole JSON file in the mobile app's Environment tab and Redeploy the gateway. Put google-services.json and Google's messaging library in the app and send the FCM token when registering. The key stays in the gateway, in your own cloud.

All notification routes: API Reference → Mobile notifications.

Errors

Errors from the gateway look like { "detail": { "code": "…", "message": "…" } }:

HTTPCodeWhat to do
401APP_CHECK_REQUIREDMissing or expired App Check token, or the session was revoked: get a new one.
401APP_CHECK_FAILEDThe exchange was refused (bad, revoked or proof-less debug token, failed Play Integrity or Key Attestation, used or expired challenge). The message says which.
401LOGIN_REQUIREDSign-in is required: send the user’s sign-in token.
403NOT_ALLOWEDThe agent or MCP server is not allowed for this app (What the app may use).
429RATE_LIMITEDMore than 120 requests a minute from one device, more than 10,000 a minute for the whole app, or more than 30 App Check requests a minute from one address. Slow down.
503APP_CHECK_FAILEDApp Check is briefly unavailable. Try again in a few seconds.

Any other error comes from the agent or the platform and is passed through as it is. Full reference: API Reference → Mobile Apps.

9c. iOS App

Same idea as Android: register the app, add the config file, get an App Check token, and call your gateway URL. Apple App Attest proves it's your real app.

Register

Apps → New App → iOS → Next:

iOS bundle ID

Xcode → your target → General → Bundle Identifier. Must match exactly; it can't be changed later.

Apple Team ID

Apple Developer → Membership details → Team ID (10 letters/digits). Needed for App Attest; not secret.

Nickname, Mode, What the app may use, Sign-in, Where the backend runs

Same as Android.

React Native or Flutter: choose Android + iOS. You get one app per platform, each with its own config file (android/app/hikigai-services.json and ios/…/HikigaiService-Info.plist).

Add the config file

1.
When the app is Live, click Download HikigaiService-Info.plist.
2.
Drag it into the root of your Xcode project and tick your app target.
3.
In Signing & Capabilities, add App Attest (for real devices).
let url = Bundle.main.url(forResource: "HikigaiService-Info", withExtension: "plist")!
let config = NSDictionary(contentsOf: url)!
let gatewayURL = config["GATEWAY_URL"] as! String

Get an App Check token

Simulator: App Attest doesn't work there, so use an emulator debug token (24 hours, development registrations only): { "debug_token": "hkdbg_…" }. Xcode builds on a real iPhone send App Attest as below plus a device debug token; that token is refused without App Attest for this Team ID and bundle ID, so a copy is useless in another app.

Real devices: App Attest

Getting an App Check token on a real iPhone (App Attest)

Your mobile appGoogle / AppleHikigai
  1. 1Your mobile appAsk for a challenge
    POST {gateway_url}/v1/app-check/challenge
    → { "challenge": "q8Xr…", "expires_in": 300 }
  2. 2Google / AppleApple signs it

    First time on this device: generateKey + attestKey. After that: generateAssertion. Both with SHA-256 of the challenge.

  3. 3Your mobile appSend it to Hikigai
    POST {gateway_url}/v1/app-check/exchange
    { "platform": "ios", "challenge": "…", "key_id": "…", "attestation" | "assertion": "…" }
  4. 4HikigaiChecks it with Apple’s rules

    Returns an App Check token, valid 15 minutes.

  5. 5Your mobile appCall your agents with the token

    Same as Android: X-Hikigai-App-Check header on every call.

After 15 minutes (or on 401), get a new challenge and send an assertion. In the Simulator, use an emulator token instead.
1.
Get a challenge: POST {gateway_url}/v1/app-check/challenge.
2.
First time on a device: DCAppAttestService.shared.generateKey() (save the key ID in the Keychain), then attestKey(keyId, clientDataHash: SHA256(challenge)), and send the attestation.
3.
After that: get a new challenge and send an assertion from generateAssertion(keyId, clientDataHash: SHA256(challenge)).
POST {gateway_url}/v1/app-check/exchange

// first time
{ "platform": "ios", "challenge": "…", "key_id": "…", "attestation": "<base64>" }
// later
{ "platform": "ios", "challenge": "…", "key_id": "…", "assertion": "<base64>" }
// Xcode builds: either body plus  "debug_token": "hkdbg_…"

→ 200 { "app_check_token": "eyJ…", "expires_in": 900, "verified": true }   // 300 with a debug token
// AppCheck.swift
import CryptoKit
import DeviceCheck

func appCheckToken() async throws -> String {
    let service = DCAppAttestService.shared
    var body: [String: Any] = ["platform": "ios"]
    var newKeyId: String?
    if service.isSupported {                      // false in the Simulator
        let challenge = try await post("/v1/app-check/challenge", [:])["challenge"] as! String
        let hash = Data(SHA256.hash(data: Data(challenge.utf8)))
        body["challenge"] = challenge
        if let keyId = loadKeyId() {              // from the Keychain
            body["key_id"] = keyId
            body["assertion"] = try await service.generateAssertion(keyId, clientDataHash: hash).base64EncodedString()
        } else {
            let keyId = try await service.generateKey()
            body["key_id"] = keyId
            body["attestation"] = try await service.attestKey(keyId, clientDataHash: hash).base64EncodedString()
            newKeyId = keyId
        }
    }
    #if DEBUG
    body["debug_token"] = hikigaiDebugToken       // device token on an iPhone, emulator token in the Simulator
    #endif
    let token = try await post("/v1/app-check/exchange", body)["app_check_token"] as! String
    if let keyId = newKeyId { saveKeyId(keyId) }  // keep the key only once Hikigai accepted it
    return token
}

post sends JSON to {gateway_url} and returns the decoded response; loadKeyId / saveKeyId keep the key ID in the Keychain. Keep hikigaiDebugToken out of Git (e.g. a local, git-ignored .xcconfig).

Which build uses what (iPhone)

  • Simulator: emulator token. Development registrations only; stops after 24 hours.
  • Xcode build on a real iPhone: App Attest (development environment) plus a device debug token. Accepted by development registrations only.
  • TestFlight and App Store: App Attest (production environment). Accepted by development and production registrations, so TestFlight works before you promote. Share builds with TestFlight: internal testers (up to 100, no review) or external testers (first build needs Apple's Beta App Review). Never ship a debug token in these builds.

Needs the App Attest capability in Xcode and the Apple Team ID on the registration; there is no key file or account to link. If App Check fails, the backend's Logs tab shows the reason on the /v1/app-check/exchange line.

Call your agents

var request = URLRequest(url: URL(string: "\(gatewayURL)/v1/agents/cpt2-code-agent/invoke")!)
request.httpMethod = "POST"
request.setValue("application/json", forHTTPHeaderField: "Content-Type")
request.setValue(appCheckToken, forHTTPHeaderField: "X-Hikigai-App-Check")
request.httpBody = try JSONSerialization.data(withJSONObject: ["message": note])
let (data, response) = try await URLSession.shared.data(for: request)

Endpoints and errors are the same as on Android.

Notifications

The app makes the same calls as on Android (installation ID, register, stream while open, inbox on wake, receipts), sending the APNs device token when it registers. Every iPhone notification goes through Apple, so the gateway needs your Apple key:

1.
Apple Developer → Certificates, Identifiers & Profiles → Keys → a new key with Apple Push Notifications service (APNs). Download the .p8 file (Apple lets you download it only once) and note the Key ID.
2.
In the mobile app's Environment tab add PUSH_APNS_KEY (paste the whole .p8 file), PUSH_APNS_KEY_ID and PUSH_APNS_TEAM_ID (your Apple Team ID), then Redeploy the gateway. The key stays in the gateway, in your own cloud.
3.
In Xcode add Push Notifications and Background Modes → Remote notifications, ask for permission, and send the device token (hex) as push_token.
POST {gateway_url}/v1/notifications/devices
X-Hikigai-App-Check: <app_check_token>
X-Hikigai-Installation-Id: <your install ID>
{ "push_token": "<APNs device token>", "timezone": "Europe/London", "language": "en" }
→ 200 { "device_id": "…", "channel": "apns", … }
// Xcode builds use Apple's sandbox: on a production registration add "apns_environment": "sandbox"

The project's Notifications tab shows whether the gateway has the Apple key. Use "options": { "private": true } on health messages (a top-level private is ignored): the lock screen shows only "New notification" and the app reads the message from its inbox.

Call Hikigai from your App

In a deployed web app, the SDK reads the variables Hikigai set and handles the token for you. Create the client with no arguments, in your server code (API routes, backend):

How your server calls an agent

Your app (server)HikigaiYour agent
  1. 1Your app (server)Swap the app key for an access token

    The SDK does this for you.

    POST $HIKIGAI_PLATFORM_URL/api/v1/auth/exchange
    X-API-Key: $HIKIGAI_API_KEY
  2. 2HikigaiChecks it is your deployed app

    Returns an access token, valid 5 minutes.

    { "access_token": "eyJ…", "expires_in": 300 }
  3. 3Your app (server)Call the agent with the token
    POST $HIKIGAI_PLATFORM_URL/api/v1/agents/icd-10-coder/invoke
    Authorization: Bearer eyJ…
  4. 4Your agentThe agent answers

    The answer comes back to your server code.

Before the 5 minutes are up (or when a call returns 401), go back to step 1. The SDK renews it automatically.
# Python: pip install hikigai-appsdk
from hikigai.appsdk import AppClient

client = AppClient()  # reads HIKIGAI_API_KEY, HIKIGAI_PROJECT_ID, HIKIGAI_PLATFORM_URL

@app.post("/analyze")
async def analyze(note: str):
    response = client.agent("icd-10-coder").invoke(note)
    return {"answer": response.content}
// Node.js: npm install @hikigai/app-sdk
import { AppClient } from "@hikigai/app-sdk";

const client = new AppClient();

export async function POST(req) {
  const { note } = await req.json();
  const agent = await client.agent("icd-10-coder");
  const response = await agent.invoke(note);
  return Response.json({ answer: response.content });
}

Without the SDK (any language)

Exchange the app's key for an access token, then send it on every call. The token lasts 5 minutes: get a new one before it expires, or when a call returns 401.

# 1. access token (valid 5 minutes)
curl -X POST "$HIKIGAI_PLATFORM_URL/api/v1/auth/exchange" \
  -H "X-API-Key: $HIKIGAI_API_KEY" \
  -H "X-Project-ID: $HIKIGAI_PROJECT_ID"
# → { "access_token": "eyJ…", "expires_in": 300, ... }

# 2. call an agent (by its name/slug)
curl -X POST "$HIKIGAI_PLATFORM_URL/api/v1/agents/icd-10-coder/invoke" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "X-Project-ID: $HIKIGAI_PROJECT_ID" \
  -H "Content-Type: application/json" \
  -d '{ "message": "Patient presents with acute chest pain…" }'
# → { "output": { ... }, "agent_id": "…", "status": "success", "session_id": "…", "latency_ms": 812, ... }
Always read HIKIGAI_PLATFORM_URL, HIKIGAI_API_KEY and HIKIGAI_PROJECT_ID from the environment; never copy their values into code. The key changes on every deployment. Browser code should call your own server routes, which then call Hikigai.

Streaming, live sessions, rooms, storage, end-user sign-in and more: SDK Reference and API Reference.

Develop on your computer

Sign your terminal in with your Hikigai account. Then your code can call agents, streams, live voice, rooms, speech and MCP from your computer, and deploy or manage what your role allows. No key to copy.

# Python (the command comes with hikigai-appsdk / hikigai-agentsdk)
pip install hikigai-appsdk
hikigai login

# Node.js
npm install @hikigai/app-sdk
npx @hikigai/app-sdk login
  1. The terminal shows a code and opens your browser on the console (sign in if asked).
  2. Pick the project, check that the code is the same as in the terminal, then click Approve.
  3. The terminal says Signed in. Your code now uses this login.

To skip choosing in the browser, name the project: hikigai login --project <project-id>. The project ID is on the project's page in the console.

from hikigai.appsdk import AppClient

client = AppClient()   # your computer: the hikigai login · deployed App: HIKIGAI_API_KEY
response = client.agent("icd-10-coder").invoke("Patient presents with acute chest pain…")
print(response.content)

The same code runs unchanged when you deploy it. Other commands:

hikigai whoami    # who is signed in, for which project, until when
hikigai token     # print the token, e.g. for curl or Postman:
curl "https://backend.hikigaiplatform.io/api/v1/agents/icd-10-coder/invoke" \
  -H "Authorization: Bearer $(hikigai token)" -H "X-Project-ID: <project-id>" \
  -H "Content-Type: application/json" -d '{ "message": "…" }'
hikigai logout    # end it now
  • A login lasts 6 hours. Then run hikigai login again.
  • It works for one project. For another project, log in again with its ID.
  • You get your role in that project: Owners, Admins, Agentic Developers and Release Engineers can also deploy agents (AgentClient().deploy(…)); App Developers can create and deploy apps but not agents; Testers can read and call agents only.
  • It does not work inside deployed Apps; they use their own HIKIGAI_API_KEY.
  • See or end your logins in the console under CLI logins. Removing someone from the project ends their logins at once.
  • The login is saved in ~/.hikigai/credentials.json, readable only by you. Python and Node.js share it.

Deploy & manage with plain HTTP

Everything the console does is also an HTTP API. From your computer, send the token from your hikigai login (hikigai token). It works for the project you signed in to, with your role there. There are no long-lived project API keys.

TOKEN=$(hikigai token)

# Create a web app from GitHub (install the Hikigai GitHub App once, from the console)
curl -X POST "https://backend.hikigaiplatform.io/api/v1/projects/$PROJECT_ID/apps" \
  -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
  -d '{ "name": "patient-portal", "source_type": "github",
        "github_repo_url": "https://github.com/acme/patient-portal", "github_branch": "main" }'

# Deploy it
curl -X POST "https://backend.hikigaiplatform.io/api/v1/projects/$PROJECT_ID/apps/$APP_ID/deploy" \
  -H "Authorization: Bearer $TOKEN"

# …or deploy a ZIP instead (app created with "source_type": "upload")
curl -X POST "https://backend.hikigaiplatform.io/api/v1/projects/$PROJECT_ID/apps/$APP_ID/deploy/upload" \
  -H "Authorization: Bearer $TOKEN" -F "file=@app.zip"

# Agent routes also need the project ID (deployment_status: pending | deploying | active | error | failed)
curl "https://backend.hikigaiplatform.io/api/v1/agents/my-agent" \
  -H "Authorization: Bearer $TOKEN" -H "X-Project-ID: $PROJECT_ID"

Old project API keys (hikigai_uni_…) no longer work: they get 401 PROJECT_KEYS_REMOVED. /api/v1/auth/exchange only takes a deployed App's own key (that is how apps get their 5-minute token).

All endpoints (apps, mobile apps, agents, MCP servers): API Reference.

MCP Servers

MCP servers give agents tools. Two options:

  • Deploy your own: project → MCP Servers → New, pick a GitHub repository (Python or Node). Hikigai builds and deploys it, checks it answers MCP, and lists its tools.
  • Use a connector: link a ready-made one from Connectors (e.g. Epic EHR, Cerner, Athena Health, Google Health Connect) and set its credentials in the project.

Use connectors when calling an agent from your app:

result = client.agent("clinical-note-coder").invoke(
    {"note": "Patient presents with acute chest pain…"},
    connectors={"my-ehr-connector": {}},
)

To call one of your MCP servers directly from a web app, ask Hikigai for an MCP token (a 1-hour ticket for that one server), then send it to the server in the header returned:

# 1. The App's token (inside the deployed App; the SDK does this for you)
POST $HIKIGAI_PLATFORM_URL/api/v1/auth/exchange
X-API-Key: $HIKIGAI_API_KEY
X-Project-ID: $HIKIGAI_PROJECT_ID
→ { "access_token": "…" }                 # on your computer: use $(hikigai token) instead

# 2. The MCP token
POST $HIKIGAI_PLATFORM_URL/api/v1/mcp/access-token
Authorization: Bearer <access_token>
{ "server": "my-mcp-server" }
→ { "token": "…", "header": "X-Hikigai-Mcp-Token", "mcp_url": "https://…" }

# 3. Call the MCP server with your MCP client
POST <mcp_url>
X-Hikigai-Mcp-Token: <token>

Full details and SDK examples: API reference → MCP Servers.

Mobile apps use POST {gateway_url}/v1/mcp/{server} instead (see Android).

Your Own Cloud

Agents, apps and MCP servers deploy to Google Cloud or AWS. Without a cloud account they run on Hikigai's cloud (personal projects). Team organizations attach their own (Step 3), and everything then runs in your account.

The cloud target picker in every deploy form lists what your account supports. From code: client.cloud.catalog(workload="agent") (SDK) or GET /api/v1/cloud/catalog.

Rooms & Event Bus

  • WebSocket rooms: project-scoped pub/sub (join, publish, presence, replay). Typical use: one client publishes live transcript events, others listen. API reference.
  • WebRTC: audio, video and in-call chat through Hikigai's media server. SDKs: connect_media / connectMedia. API reference.
  • Events & webhooks: get platform events (agent deployed, jobs, invocations, storage, WebRTC) as signed webhooks or a live stream. Set them up in the project's Webhooks tab.

Speech: Translate & Transcribe

Live speech without deploying an agent: WS /api/v1/speech/translate (speech-to-speech, 75+ languages) and WS /api/v1/speech/transcribe (speech-to-text, 85+ locales, live partial results). Any project with a Google Cloud account (Project settings or Organization settings → Cloud accounts); billed to your cloud. Try them in the project's Voice Lab tab, then use client.speech from your app. See API reference → Speech.

Limits

Limits depend on your plan. Exceeding one returns HTTP 429. What counts toward your quota: Usage Limits.

PlanProjectsAgentsInvokes/dayAppsMCPReq/minReq/day
Free125001020
Pro51050221003,000
EnterpriseUnlimitedUnlimitedUnlimitedUnlimitedUnlimited20010,000

Next Steps