Skip to content
Skip to main content
HTTP integration

AIP

HTTP integration

Invoke an Agent from your server, continue conversations, read replies, and stop execution.

Prepare the invocation URL

Ensure the Agent is enabled and test the same task in debugging first. These examples perform real execution.

Send the first message

curl --fail-with-body "$AIP_HOOK_URL" \
  -H 'Content-Type: application/json' \
  --data '{
    "action": "created",
    "payload": {
      "session_id": "requirements-demo-001",
      "request_id": "message-001",
      "prompt": "Organize this requirement: support staff can enter an order number to check its status.",
      "context": {"source": "requirements-form"}
    }
  }'

Reuse session_id within a conversation. Use a new request_id for each new message; for a retry, retain the original identifier and request content. These identifiers are examples; generate distinct identifiers for separate conversations and messages in your application.

After acceptance, read execution events. Successful submission does not mean the task is complete.

Receive streamed replies

curl -N --fail-with-body "$AIP_HOOK_URL" \
  -H 'Content-Type: application/json' \
  --data '{
    "action": "sse",
    "payload": {
      "session_id": "requirements-demo-001",
      "after_event_id": 0
    }
  }'

Use the session identifier from the response. Save the last received event sequence, resume from it after disconnection, and deduplicate by sequence.

Continue the conversation

curl --fail-with-body "$AIP_HOOK_URL" \
  -H 'Content-Type: application/json' \
  --data '{
    "action": "prompted",
    "payload": {
      "session_id": "requirements-demo-001",
      "request_id": "message-002",
      "signal": "continue",
      "prompt": "Sort the open questions by priority."
    }
  }'

Stop generation

curl --fail-with-body "$AIP_HOOK_URL" \
  -H 'Content-Type: application/json' \
  --data '{
    "action": "prompted",
    "payload": {
      "session_id": "requirements-demo-001",
      "signal": "stop"
    }
  }'

Closing SSE only stops event reception. To stop execution, send the stop request above and continue observing the outcome.

Request fields

FieldUsed inMeaning
actionAll requestscreated, prompted, or sse
payload.session_idAll requestsIdentifies one conversation
payload.request_idNew messagesRetry identification; new value per new message
payload.promptFirst and continued messagesInput text
payload.contextFirst-message exampleBusiness context object
payload.signalpromptedcontinue or stop
payload.after_event_idsseRead after the specified event position

Your service owns its message entry point, user validation, and session mapping. Assign distinct session identifiers to different customers.

Meet HastLearn about Hast AIP, Hast Agent, Hast GTM, and delivery with the FDE team.About AIPConfigure Agents and connect business systems using the FDE delivery workbench.Create your first AgentConfigure, save, and debug an Agent without external services.Configure and manage AgentsSet responsibilities, models, and capabilities, and maintain the active configuration.Manage SkillsWrite, import, and select the skill files used by Agents.Add a knowledge baseIndex URLs or files so an Agent can retrieve information from them.Manage business secretsStore credentials and bind them to Agents without exposing real values in examples.Connect business toolsLet Agents call HTTP services with explicit inputs and authentication.Configure long-term memoryChoose what memory an Agent can read and where new memory is written.Debug an AgentTest saved configurations, conversation continuity, and tool results.Import, export, and copyReuse configurations and recheck resources and credentials after migration.HTTP integrationInvoke an Agent from your server, continue conversations, read replies, and stop execution.MCP integrationConnect external Agent clients to AIP tools with a Public API Key.About Task AgentPlan, execute, and deliver complete tasks with tools, files, and lasting context.Complete your first taskSubmit a request, review the plan, and inspect the final output.Plan, execute, and manage conversationsRefine plans, stop execution, and manage conversation history.Upload, view, and download filesProvide inputs and keep the files created by your tasks.Connect apps and configure capabilitiesAuthorize external apps and maintain context across tasks.Create scheduled tasksSet recurrence and timezone, then inspect each run's result.Task Agent troubleshootingCheck access, connections, task state, and files.API quickstartCreate a key, submit a task, and read execution results.Event streamingRead SSE frames, resume after disconnection, and interpret Event v2.API referenceExplore public endpoint parameters, authentication, and response schemas.About GTMUse a shared website project for research, visibility analysis, and marketing drafts.Create your first GTM projectEnter a website, wait for initialization, and inspect the first results.Manage projects and website contextSwitch projects, refresh site information, and manage project settings.Company analysis and project documentsReview product, competitor, and marketing context before content tasks.SEO and website performanceRead PageSpeed reports for mobile and desktop.AI brand mentionsInspect buyer questions and whether model answers mention your brand.Connect Google AnalyticsAuthorize an account, choose a GA property, and inspect traffic reports.Generate and publish X draftsCreate posts, review previews, and finish publishing on X.Generate article draftsSet style, language, and audience, then review and copy Markdown.Use Growth AgentRead project context or start supported background operations in conversation.Run status and troubleshootingCheck queueing, dependencies, and results without treating unfinished work as missing data.Plans and usageCheck access, consumption, and billing for the current Profile.