플랫폼 · API 및 웹훅

슬라이드가 아닌 HTTPS로 통합

서버 간 채팅을 구현하고, 토큰을 자체 UI로 스트리밍하고, FlexyAgents 호스트에서 종료되는 웹훅으로 자동화를 실행하세요. 아래 경로는 실제 Next.js 핸들러입니다. FlexyAgents API 연결을 생성한 뒤 배포 화면에서 값을 복사하세요.

  • POST /api/agents/{agentId}/chat은 FlexyAgents automation-app connection에 tie된 Bearer token을 accept한 뒤 widget과 동일 RAG + model stack을 run합니다
  • Optional streaming은 NDJSON chunk를 return하고 non-streaming은 single assistant payload로 collapse합니다
  • Per-IP rate limit이 plan check 전 apply됩니다. hosted plan은 token budget enforce, BYOK는 missing provider key 시 explicit error return
  • Webhook trigger, channel callback, outbound integration이 동일 tenancy model 공유 — 모두 organization_id 및 agent record로 resolve

먼저 키가 필요하신가요? 워크스페이스 만들기 설정 → API 키 또는 에이전트 연결 모달을 여세요.

한눈에 보는 HTTP 엔드포인트

경로는 Next.js 라우트 트리를 반영합니다. 배포 화면의 에이전트 ID와 호스트로 플레이스홀더를 교체하세요.

  • POST/api/agents/{agentId}/chat

    Agent chat & streaming

    messages array(role + content)와 optional stream flag가 있는 JSON body를 보냅니다. Bearer auth는 agent connection에 저장된 FlexyAgents API key를 validate합니다. key auth 성공 시 organization_id가 자동으로 resolve됩니다.

  • POST/api/webhooks/automations/...

    Automation trigger ingress

    publish된 automation이 payload를 deserialize하고 executeAutomation을 call하는 webhook URL을 expose할 수 있습니다 — OAuth 없이 flow를 kick off해야 하는 own service에 유용합니다.

  • GET/POST/api/webhooks/*

    Channel & provider webhook

    /api/webhooks 아래 sibling route가 WhatsApp, Instagram, Facebook Messenger, inbound email 등 vendor callback을 처리하여 omnichannel deployment가 domain에 stay합니다.

  • Integrations → Webhooks

    Outbound delivery

    FlexyAgents가 conversation 또는 system event를 SIEM, data lake, ticketing bridge로 push해야 할 때 dashboard에서 signed outbound webhook을 configure합니다.

최소 비스트리밍 호출

curl -X POST "https://YOUR_APP_HOST/api/agents/AGENT_ID/chat" \
  -H "Authorization: Bearer YOUR_FLEXYAGENTS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"messages":[{"role":"user","content":"Hello"}],"stream":false}'

해당 에이전트에 FlexyAgents 앱을 연결한 뒤 배포 → API 에서 복사한 값으로 교체하세요.

Invoke

Widget과 동일 brain의 HTTPS-first chat

Deployment screen이 live host에 curl snippet copy. handler는 automation connection store로 API key validate, behavior + knowledge load, 다른 channel처럼 usage increment.

  • Messages array contract

    Body는 minimum one chat turn 포함. executor는 retrieval용 latest user message까지 history trim하지만 future use multi-turn array accept.

    • validator에서 role은 user, assistant, system으로 limit
    • documented일 때만 header에 metadata attach — JSON contract 우선
    • invalid shape는 faster debug용 Zod detail string과 400 return
    Open Deployment tab
  • Streaming mode

    stream: true 설정 시 NDJSON chunk(one JSON object per line) receive. frontend token arrive 시 UI flush.

    • hosted widget parity 원하는 mobile/desktop client ideal
    • mid-stream error도 JSON line serialize — parser recover
    • proxy aggressively buffer response 시 streaming disable
  • Bearer API key vs session cookie

    Service account는 agent마다 generate된 FlexyAgents connection key 사용. interactive tester authenticated dashboard session rely 가능하나 server-to-server는 always Bearer token.

    • Key other automation credential과 rest encrypt
    • Key rotate해도 URL agent ID change 안 함
    • invalid/missing key model spend accrue 전 401 return
    Model billing context
  • Production에서 볼 limit

    Redis-backed rate limit traffic spike 시 429 return. plan enforcement hosted/BYOK monthly cap MESSAGE_LIMIT_REACHED, hosted inference token ceiling add.

    • Automation과 chat 동일 org-level accounting story share
    • support talk 시 error payload correlation ID log
    • billing allow throughput 추가 시 upgrade 또는 credit add
    Usage & plans

Events

Stack을 FlexyAgents로 bring — event push back out

Inbound route vendor signature normalize. outbound configuration other integration 옆. automation flow 내 arbitrary HTTP POST 가능.

  • Automation webhook trigger

    flow webhook trigger publish 시 FlexyAgents path segment store, parsed body로 executeAutomation call 전 payload verify.

    • Slack, CRM, custom REST endpoint call agent step pair
    • generic ingress enable 전 upgraded plan require feature gating
    • OAuth trigger와 동일 automation run history log surface
    Automations overview
  • Channel provider callback

    WhatsApp, Instagram DM, Messenger, inbound email each public HTTPS endpoint register — Meta, Twilio, mail provider verify 및 deliver.

    • vendor console callback URL deployment host match configure
    • verification handshake live traffic과 동일 route
    • compliance-sensitive payload already audit infrastructure stay
    Channel deployments
  • Outbound HTTP action

    Automation action templated body로 customer-owned URL POST/PUT — first-party connector wait 없이 "notify Opsgenie" 또는 "create Jira ticket".

    • automation builder trigger field JSON body map
    • retry/error handling automation executor default follow
    • delivery 전 human-readable summary agent step combine

Reference

Spec, doc, exploratory tool

Marketing page narrative stay. engineer docs site, repo inline OpenAPI definition, tenant ID always match deployment page snippet rely.

  • Documentation hub

    /docs conceptual guide start, developer-focused /api quick start, authentication primer, tabbed reference cross-link.

    • curl, JavaScript, widget embed pattern emphasize example
    • SDK/Postman promise actually ship download match
    • marketing/technical writer align gap support report
    Open docs
  • OpenAPI source of truth

    Repository comprehensive OpenAPI document auth scheme, chat payload, ancillary REST resource — file에서 client generate 또는 Postman import.

    • versioning package release cadence follow, landing page 아님
    • staging/production base URL spec servers list enumerate
    • local developer localhost /api/agents/{id}/chat production tenant host 동일 path
    Developer API page
  • Widget & mobile companion

    Not every experience raw REST need — embeddable script visitor context 동일 chat endpoint call. web self-service plus backend job widget pair API access.

    • Hosted page already tested agent configuration reuse
    • CSP/cookie policy configure widget origin allow
    • email deep link query parameter hosted chat open
    Web surfaces

API를 자동화, 채널, 분석의 거버넌스와 함께 활용하세요.

다음 단계

동작하는 curl을 복사한 뒤 프로덕션에 맞게 강화하세요

FlexyAgents 연결 키를 생성하고 비밀 저장소에 붙여넣은 뒤, 자동화 웹훅을 소유한 경로로 지정하세요. 준비되면 성공 팀이 이미 사용하는 동일한 분석 워크스페이스에 관측 가능성을 연결하세요.