Documentation

Build with Hikigai

Deploy AI agents, ship full-stack applications, and run MCP tool servers on GCP or AWS — everything you need to build with the Hikigai platform.

Getting Started

Quick Start

  1. Create a Hikigai account and get your API key
  2. Set up Project Members and roles for collaboration
  3. Deploy an agent using the web wizard or API
  4. Invoke your agent via REST API

Hikigai provides a simple way to deploy AI agents powered by Google's ADK and Vertex AI. You can create agents using our config-based approach (no code) or upload custom Python code.

Authentication

All API requests require authentication using a Bearer token. Get your API key from the dashboard.

curl -X GET "https://api.hikigai.com/v1/agents" \
  -H "Authorization: Bearer YOUR_API_KEY"
Security Tip: Hikigai supports Bring Your Own Key (BYOK) for LLM providers. Configure your own API keys in Project Settings to use your organization's existing quotas and billing.

Deploy an Agent

Config-Based Deployment

The easiest way to deploy an agent. Just provide a name and instruction:

curl -X POST "https://api.hikigai.com/v1/agents/deploy/config" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "my-sentiment-analyzer",
    "instruction": "Analyze the sentiment of the given text and return positive, negative, or neutral with a confidence score.",
    "model": "gemini-2.0-flash",
    "category": "Natural Language Processing"
  }'

Code-Based Deployment

For custom logic, upload your agent.py file:

# agent.py
from google.adk.agents import Agent

def analyze_sentiment(text: str) -> dict:
    """Custom sentiment analysis logic."""
    return {"analyzed": True}

root_agent = Agent(
    name="my-agent",
    model="gemini-2.0-flash",
    instruction="Analyze sentiment...",
    tools=[analyze_sentiment],
)

Invoke an Agent

Once deployed, invoke your agent with a simple POST request:

curl -X POST "https://api.hikigai.com/v1/agents/my-sentiment-analyzer/invoke" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "I love this product! It works great."
  }'

Response

{
  "agent_id": "abc123",
  "response": "The sentiment is positive with high confidence (0.92).",
  "metadata": {
    "latency_ms": 245,
    "timestamp": "2024-01-15T10:30:00Z"
  }
}

Deploy an App

Hikigai lets you deploy full-stack web applications directly from a GitHub repository. The platform handles framework detection, Docker image building, container orchestration, and gives your app a live production URL — all in minutes.

How App Deployment Works

1

Connect Source

Link your GitHub repo or upload a ZIP archive. Hikigai authenticates via a GitHub App for secure, scoped repository access.

2

Framework Detection

The platform analyzes your repository to detect the framework (Next.js, React, FastAPI, etc.) and generates an optimized Dockerfile.

3

Build & Push

The platform builds a Docker image and pushes it to a private container registry for the selected cloud provider.

4

Deploy

The image is deployed to your chosen cloud target on GCP or AWS — with health checks and a live HTTPS URL.

Deploy via Console

The easiest way to deploy is through the Hikigai Console. Navigate to your project, click New App, and follow the 3-step wizard:

  1. Source — Choose GitHub and select your repository and branch, or upload a ZIP file.
  2. Configure — Review the auto-detected framework, set environment variables, choose CPU/memory resources, and configure the number of instances.
  3. Deploy — Click deploy and watch real-time streaming build logs. Once complete, your app is live.

Deploy via API

You can also create and deploy apps programmatically using the Platform API:

# Step 1: Create an app in your project
curl -X POST "https://api.hikigai.ai/v1/projects/{project_id}/apps" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "display_name": "My Healthcare Portal",
    "framework": "nextjs"
  }'
# Step 2: Connect a GitHub repository
curl -X POST "https://api.hikigai.ai/v1/projects/{project_id}/apps/{app_id}/github/connect" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "installation_id": "136386010",
    "repo_full_name": "your-org/your-repo",
    "branch": "main"
  }'
# Step 3: Trigger a deployment
curl -X POST "https://api.hikigai.ai/v1/projects/{project_id}/apps/{app_id}/deploy" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "cpu": 256,
    "memory": 512,
    "min_instances": 1,
    "env_vars": {
      "NODE_ENV": "production"
    }
  }'

Supported Frameworks

The platform auto-detects your framework from the repository structure and generates an optimized, multi-stage Dockerfile tailored to it:

FrameworkDetectionBase ImageBuild Command
Next.jsnext.config.* in rootnode:20-alpinenpm run build (standalone)
React (Vite)vite.config.* in rootnode:20-alpine + nginxnpm run build → static serve
Express / Node.jsserver.js or index.jsnode:20-alpinenpm install → node start
FastAPImain.py + fastapi in requirementspython:3.11-slimpip install → uvicorn
Flaskapp.py + flask in requirementspython:3.11-slimpip install → gunicorn
Djangomanage.py in rootpython:3.11-slimpip install → gunicorn
Static HTMLindex.html in rootnginx:alpineCopy files → nginx serve

Build Pipeline

When you trigger a deployment, the following pipeline executes:

1
Source ResolutionClone the repository at the specified branch and commit SHA.
2
Framework DetectionAnalyze package.json, requirements.txt, and project structure to identify the framework.
3
Dockerfile GenerationRender a multi-stage Dockerfile from a framework-specific Jinja2 template with optimized caching layers.
4
Docker BuildAWS CodeBuild builds the Docker image with layer caching for faster subsequent builds.
5
Image PushThe built image is tagged and pushed to a private AWS ECR repository.
6
ECS Task RegistrationA new ECS task definition is registered with the image URI, CPU/memory, and environment variables.
7
Service DeploymentThe cloud service is created or updated with the new container. Rolling deployment ensures zero downtime.
8
Health CheckECS monitors container health. Once the task is running and healthy, the deployment is marked as successful.

Real-time Build Logs

Monitor every phase of your build with server-sent event (SSE) streaming. Connect to the log stream endpoint to receive live updates in your terminal or application:

# Stream build logs in real time
curl -N "https://api.hikigai.ai/v1/projects/{project_id}/apps/{app_id}/deployments/{deploy_id}/logs/stream" \
  -H "Authorization: Bearer YOUR_API_KEY"

# Response (SSE):
# data: {"phase": "BUILD", "message": "Step 1/8: FROM node:20-alpine AS base"}
# data: {"phase": "BUILD", "message": "Step 2/8: WORKDIR /app"}
# data: {"phase": "BUILD", "message": "Step 3/8: COPY package*.json ./"}
# data: {"phase": "DEPLOY", "message": "Task registered: arn:aws:ecs:..."}
# data: {"phase": "DEPLOY", "message": "Service updated, waiting for stability..."}
# data: {"phase": "COMPLETE", "message": "Deployment successful"}

Auto-Deploy on Git Push

Once your GitHub repository is connected, Hikigai can automatically redeploy your app whenever you push to the configured branch. The GitHub App webhook triggers a new build with the latest commit SHA, so your production app stays in sync with your code.

Automatic deployments use the same build settings (CPU, memory, env vars) from your most recent manual deployment. You can update these settings at any time from the Console.

App Environment

Every deployed app receives a set of platform environment variables that are automatically injected into the container at runtime. These let your app interact with Hikigai services without any manual configuration.

Auto-Injected Variables

VariableDescriptionExample
HIKIGAI_API_KEYDeploy-scoped API key for calling platform serviceshk_deploy_abc123...
HIKIGAI_PROJECT_IDThe project this app belongs toproj_7f8a9b...
HIKIGAI_PLATFORM_URLBase URL for platform API callshttps://api.hikigai.ai
HIKIGAI_APP_IDUnique identifier for this appapp_3d4e5f...
PORTPort your app should listen on3000

Using Platform Variables in Your App

Your deployed app can call any Hikigai agent using the auto-injected credentials. No API key management needed:

// Next.js API route — calling a Hikigai agent
export async function POST(req) {
  const { clinical_note } = await req.json();

  // These environment variables are auto-injected by the platform
  const response = await fetch(
    `${process.env.HIKIGAI_PLATFORM_URL}/v1/agents/icd-10-coder/invoke`,
    {
      method: "POST",
      headers: {
        "Authorization": `Bearer ${process.env.HIKIGAI_API_KEY}`,
        "Content-Type": "application/json",
      },
      body: JSON.stringify({ message: clinical_note }),
    }
  );

  return Response.json(await response.json());
}
# FastAPI endpoint — calling a Hikigai agent
import os, httpx

@app.post("/analyze")
async def analyze(note: str):
    async with httpx.AsyncClient() as client:
        resp = await client.post(
            f"{os.environ['HIKIGAI_PLATFORM_URL']}/v1/agents/icd-10-coder/invoke",
            headers={"Authorization": f"Bearer {os.environ['HIKIGAI_API_KEY']}"},
            json={"message": note},
        )
    return resp.json()

Custom Environment Variables

In addition to auto-injected variables, you can set your own environment variables during the Configure step. These are encrypted at rest and injected alongside platform variables.

Tip: Use custom environment variables for database connection strings, third-party API keys, feature flags, and any secrets your app needs. Never hard-code credentials in your repository.

MCP Servers

The Model Context Protocol (MCP) lets AI agents call external tools through a unified interface. Hikigai supports two paths: deploy your own MCP servers from GitHub, and connect to registry connectors (Epic EHR, Cerner, Athena Health, Google Health Connect, and more).

Deploy your own MCP server

From a project, create an MCP server, connect a GitHub repo (Python or Node), and deploy. The orchestrator builds the image, deploys to your chosen cloud target (GCP or AWS), probes initialize + tools/list, and auto-registers the server in the MCP registry and project connectors.

Deploy pipeline (high level)

  1. Source resolution from GitHub
  2. Runtime / framework detection
  3. Dockerfile generation
  4. Build and push image
  5. Deploy to catalog target on GCP or AWS
  6. MCP protocol validation (probe)
  7. Registry sync & marketplace metadata

Registry connectors

Epic EHR

epic-ehr

Connect to Epic FHIR APIs for patient records, appointments, medications, conditions, and observations.

get_patient()search_appointments()get_medications()get_conditions()get_observations()

Cerner

cerner

Oracle Health (Cerner) access for demographics, allergies, immunizations, procedures, and clinical notes.

get_patient()get_allergies()get_immunizations()get_procedures()search_clinical_notes()

Athena Health

athena-health

Cloud EHR for patient management, encounters, vitals, and documents.

get_patient()search_encounters()get_vitals()get_documents()update_patient()

Google Health Connect

google-health-connect

Vitals, activity, sleep, and fitness data from Android devices via Health Connect.

sync_from_device()read_heart_rate()read_steps()read_sleep()get_vital_signs_dashboard()

Connecting agents to MCP connectors

Pass linked connector slugs when deploying or invoking an agent. The platform handles connection management; credentials are configured per project connector.

from hikigai.appsdk import AppClient

client = AppClient()
result = client.agent("clinical-note-coder").invoke(
    {"note": "Patient presents with acute chest pain..."},
    connectors={"epic-ehr": {}},
)
Note: MCP server deployments and registry connectors are project-scoped. Deployed MCP servers can also be submitted to the marketplace after moderation.

Multi-Cloud Deployment

Apps, agents, and MCP servers deploy to Google Cloud or AWS. Targets are catalog-driven (GET /api/v1/cloud/catalog) — the console and SDKs render forms from the same JSON Schema the API validates.

Google Cloud (GCP)

Deploy apps, MCP servers, and agents

Amazon Web Services (AWS)

Deploy apps, MCP servers, and agents

BYOC credentials

Attach AWS (assume-role preferred, or access key) or GCP service-account credentials on the project. With none attached, deployments use the platform account — unchanged from before BYOC.

from hikigai.appsdk import AppClient

client = AppClient(api_key=..., project_id=...)
catalog = client.cloud.catalog(workload="agent")
for service in catalog.services:
    print(service.id, service.display_name)

# AgentSDK deploy with an explicit target
from hikigai.agentsdk import AgentClient
agent = AgentClient(api_key=..., project_id=...).deploy(
    config,
    cloud_service="gcp-cloud-run",  # pick from the cloud catalog
    region="us-central1",
)

Rooms & Event Bus

Rooms

Project-scoped WebSocket rooms for realtime pub/sub — presence, bounded replay, and SDK RoomSession clients. See the API reference and AppSDK / AgentSDK Rooms docs.

Event Bus & webhooks

Platform events (agent deploy/delete, jobs, invocations, storage) ride a CloudEvents bus with in-memory, GCP Pub/Sub, or AWS EventBridge backends. Tenants receive events via HMAC-signed webhooks (client.events) or a realtime WebSocket stream. Configure subscriptions in the project Webhooks tab.

Platform API Reference

MethodEndpointDescription
GET/v1/agentsList all agents
GET/v1/agents/:idGet agent details
POST/v1/agents/deploy/configDeploy with config
POST/v1/agents/deploy/codeDeploy with code
POST/v1/agents/:slug/invokeInvoke agent
DELETE/v1/agents/:idDelete agent

App Deployment Endpoints

MethodEndpointDescription
POST/v1/projects/:id/appsCreate a new app
GET/v1/projects/:id/appsList all apps in a project
GET/v1/projects/:id/apps/:app_idGet app details
POST/v1/projects/:id/apps/:app_id/github/connectConnect GitHub repository
POST/v1/projects/:id/apps/:app_id/deployTrigger deployment
GET/v1/projects/:id/apps/:app_id/deploymentsList deployment history
GET/v1/.../deployments/:deploy_id/logs/streamStream build logs (SSE)
POST/v1/projects/:id/apps/:app_id/stopStop a running app
POST/v1/projects/:id/apps/:app_id/restartRestart a stopped app
DELETE/v1/projects/:id/apps/:app_idDelete app and cloud resources

MCP Server Endpoints

MethodEndpointDescription
POST/v1/projects/:id/mcp-serversCreate an MCP server
GET/v1/projects/:id/mcp-serversList MCP servers in a project
POST/v1/projects/:id/mcp-servers/:sid/deployTrigger MCP deployment
POST/v1/projects/:id/mcp-servers/:sid/refresh-toolsRe-probe tools/list

Cloud Catalog Endpoints

MethodEndpointDescription
GET/v1/cloud/catalogList providers, services, regions, schemas
POST/v1/cloud/targets/validateDry-run a deployment target

SDKs

Official SDKs for popular languages:

Py

Python

pip install hikigai-agentsdk hikigai-appsdk hikigai-core --upgrade

Available
JS

Node.js

@hikigai/agent-sdk · @hikigai/app-sdk

Available
Go

Go

go get hikigai

Coming Soon

Rate Limits

Rate limits vary by plan. Exceeding limits returns HTTP 429. For a full breakdown of what consumes quota (SDK invoke, playground, HTTP, deploy, identity, and more), see Usage Limits.

PlanRequests/minRequests/day
Free1003,000
Pro10010,000
Enterprise1,000100,000