SDK methods
Helpers on StackgenClient. Pick Python, TypeScript, or Go. A row links to a code sample when a journey page shows that call. Methods without a Go name hide when Go is selected.
Runnable scripts for the common journeys are in code samples.
Client setup
Build a client from the environment, compose a workflow in code, or check whether a follow-up Ask joined the turn that is already running.
StackgenConfig.from_env
StackgenConfig.fromEnv
ConfigFromEnv
Build config from STACKGEN_URL, STACKGEN_TOKEN, and STACKGEN_WORKSPACE_ID.
StackgenClient.from_env
StackgenClient.fromEnv
NewClientFromEnv
Build a client from those same environment variables.
create_agent
createAgent
CreateAgent
Describe an agent in code before you publish a workflow.
create_stage
createStage
CreateStage
Describe one workflow stage and which agent runs it.
create_workflow
createWorkflow
CreateWorkflow
Start a workflow composition you finish with then and commit.
WorkflowBuilder.then
WorkflowBuilder.then
WorkflowBuilder.Then
Append a stage to the workflow you are composing.
WorkflowBuilder.commit
WorkflowBuilder.commit
WorkflowBuilder.Commit
Freeze the builder into a workflow you can publish.
WorkflowDefinition.to_payload
WorkflowDefinition.toPayload
WorkflowDefinition.ToPayload
Return the JSON body for a committed workflow.
is_steer_response
isSteerResponse
IsSteerResponse
Return true when a follow-up Ask was absorbed by the turn already running.
Aiden
Call these on client.aiden. They cover Ask, webhooks, sessions, agents, integrations, schedules, policy, audit, and chat.
aiden.start_ask
aiden.startAsk
Aiden.StartAsk
Start an Ask turn on a new or existing session and return session and trace ids without waiting.
aiden.wait_for_execution
aiden.waitForExecution
Aiden.WaitForExecution
Poll an execution until it settles.
aiden.wait_for_subscribe_complete
aiden.waitForSubscribeComplete
Aiden.SubscribeExecution
Follow the execution stream until the turn completes.
aiden.stream_execution_events
aiden.streamExecutionEvents
Yield AG-UI text and tool-call events until the turn finishes.
aiden.list_agents
aiden.listAgents
Aiden.ListAgents
List agents in the workspace for a chat target picker.
aiden.list_workflows
aiden.listWorkflows
Aiden.ListWorkflows
List workflows in the workspace for a chat target picker.
aiden.run_ask_and_download_artifact
aiden.runAskAndDownloadArtifact
Aiden.RunAskAndDownloadArtifact
Start Ask, wait until the artifact is ready, and download it.
aiden.get_run_status
aiden.getRunStatus
Aiden.GetRunStatus
Read whether a run you started elsewhere is still going, failed, or ready, in one shot.
aiden.get_execution_trace
aiden.getExecutionTrace
Aiden.GetExecution
Read one execution trace by trace id.
aiden.list_executions
aiden.listExecutions
Aiden.ListExecutions
List recent executions, optionally for one session.
aiden.download_execution_debug_zip
aiden.downloadExecutionDebugZip
Aiden.DownloadExecutionDebugZip
Download the execution debug ZIP for a trace id.
aiden.list_execution_tool_calls
aiden.listExecutionToolCalls
List tool calls recorded on an execution trace.
aiden.list_sessions
aiden.listSessions
Aiden.ListSessions
Search sessions by text or source.
aiden.get_session
aiden.getSession
Aiden.GetSession
Read one session by id.
aiden.list_session_artifacts
aiden.listSessionArtifacts
Aiden.ListSessionArtifacts
List files attached to a session.
aiden.download_session_artifact
aiden.downloadSessionArtifact
Aiden.DownloadSessionArtifact
Download one named session file to a local path.
aiden.download_session_artifacts
aiden.downloadSessionArtifacts
Aiden.DownloadSessionArtifacts
Download every named file on a session into a directory.
aiden.export_session
aiden.exportSession
Aiden.ExportSession
Fetch the session report, notes, or evidence when you want the write-up without a file download.
aiden.terminate_session
aiden.terminateSession
Aiden.TerminateSession
Stop work still running for a session.
aiden.fork_session
aiden.forkSession
Branch a session so a new run starts from an existing one.
aiden.update_session
aiden.updateSession
Aiden.UpdateSessionMetadata
Rename, star/unstar, or archive/unarchive a session. Only the fields you pass change.
aiden.download_session_attachment
aiden.downloadSessionAttachment
Aiden.DownloadSessionAttachment
Download a chat attachment by its stable attachment_id.
aiden.delete_session_attachments
aiden.deleteSessionAttachments
Aiden.DeleteSessionAttachments
Delete every stored chat attachment for a session.
aiden.run_webhook_and_download_report
aiden.runWebhookAndDownloadReport
Aiden.RunWebhookAndDownloadReport
Trigger a webhook, wait for the session report, and download it.
aiden.trigger_webhook
aiden.triggerWebhook
Aiden.TriggerWebhook
Post a payload to start a webhook workflow and return without waiting.
aiden.get_webhook_run
aiden.getWebhookRun
Aiden.GetWebhookRun
Read one webhook invocation by id.
aiden.list_webhook_runs
aiden.listWebhookRuns
Aiden.ListWebhookRuns
List invocations for a webhook.
aiden.wait_for_webhook_session
aiden.waitForWebhookSession
Aiden.WaitForWebhookSession
Poll a webhook invocation until it has a session id.
aiden.create_webhook
aiden.createWebhook
Aiden.CreateWebhook
Create a webhook, including an acknowledgement status and headers when the provider needs an immediate response, or a filter_cel condition to skip unrelated deliveries.
aiden.get_webhook
aiden.getWebhook
Aiden.GetWebhook
Read one webhook by id.
aiden.update_webhook
aiden.updateWebhook
Aiden.UpdateWebhook
Update a webhook, including acknowledgement status, headers, and the filter_cel condition (send an empty string to clear it).
aiden.preview_webhook_filter
aiden.previewWebhookFilter
Aiden.PreviewWebhookFilter
Try a draft filter_cel condition against a sample event and headers. Saves nothing and starts no work.
aiden.delete_webhook
aiden.deleteWebhook
Aiden.DeleteWebhook
Delete a webhook.
aiden.create_schedule
aiden.createSchedule
Aiden.CreateSchedule
Create a schedule that starts work on a timer.
aiden.trigger_schedule
aiden.triggerSchedule
Aiden.TriggerSchedule
Run a schedule once, now.
aiden.list_schedule_runs
aiden.listScheduleRuns
Aiden.ListScheduleRuns
List runs for a schedule.
aiden.delete_schedule
aiden.deleteSchedule
Aiden.DeleteSchedule
Delete a schedule.
aiden.publish_workflow
aiden.publishWorkflow
Aiden.PublishWorkflow
Register the agents and publish a workflow you composed with create_workflow.
aiden.start_workflow_run
aiden.startWorkflowRun
Start a named workflow and return session and trace ids without waiting.
aiden.run_workflow
aiden.runWorkflow
Start a named workflow and pass an optional input body.
aiden.delete_workflow
aiden.deleteWorkflow
Delete a workflow.
aiden.register_agent
aiden.registerAgent
Aiden.RegisterAgent
Register an agent, including the integrations and approval settings it should use.
aiden.update_agent
aiden.updateAgent
Aiden.UpdateAgent
Update an agent's mutable fields, including the integration list.
aiden.get_agent
aiden.getAgent
Aiden.GetAgent
Read one agent by name.
aiden.deregister_agent
aiden.deregisterAgent
Remove an agent registration.
aiden.get_agent_health
aiden.getAgentHealth
Read the latest health check for an agent.
aiden.start_agent_chat
aiden.startAgentChat
Aiden.StartAgentChat
Start a chat with one agent.
aiden.start_agent_chat_with_files
aiden.startAgentChatWithFiles
Aiden.StartAgentChatWithFiles
Start a chat turn with one or more file attachments (multipart/form-data).
aiden.list_integrations
aiden.listIntegrations
Aiden.ListIntegrations
List integrations in the workspace.
aiden.list_integration_types
aiden.listIntegrationTypes
Aiden.ListIntegrationTypes
List the integration types you can connect.
aiden.get_integration
aiden.getIntegration
Aiden.GetIntegration
Read one integration, including discovered tools when you ask for them.
aiden.upsert_integration
aiden.upsertIntegration
Aiden.UpsertIntegration
Create or replace an integration from a body you build yourself.
aiden.upsert_integration_with_secrets
aiden.upsertIntegrationWithSecrets
UpsertIntegrationWithSecrets
Store Vault credentials and upsert the integration those credentials belong to.
aiden.delete_integration
aiden.deleteIntegration
Delete an integration.
aiden.test_integration_connection
aiden.testIntegrationConnection
Aiden.TestIntegrationConnection
Check whether an integration can reach its upstream service.
aiden.refresh_integration_tools
aiden.refreshIntegrationTools
Refresh the tool list discovered for an integration.
aiden.list_approvals
aiden.listApprovals
List human approvals waiting on an agent.
aiden.get_approval
aiden.getApproval
Aiden.GetApproval
Read one approval by id.
aiden.resolve_approval
aiden.resolveApproval
Aiden.ResolveApproval
Approve or reject a waiting human-in-the-loop request.
aiden.create_policy
aiden.createPolicy
Aiden.CreatePolicy
Create a policy. It does not govern an agent until you attach it.
aiden.attach_policy
aiden.attachPolicy
Aiden.AttachPolicy
Attach a policy to an agent. Shadow mode logs the decision and does not block.
aiden.detach_policy
aiden.detachPolicy
Aiden.DetachPolicy
Remove a policy from an agent.
aiden.delete_policy
aiden.deletePolicy
Aiden.DeletePolicy
Delete a policy.
aiden.evaluate_policy
aiden.evaluatePolicy
Aiden.EvaluatePolicy
Evaluate a policy against a sample input without running a turn.
aiden.when_policies_disagree
aiden.whenPoliciesDisagree
Aiden.WhenPoliciesDisagree
Choose what happens when several policies on one agent disagree.
aiden.break_glass
aiden.breakGlass
Aiden.BreakGlass
Open a time-limited outage bypass so the agent runs without policy enforcement.
aiden.get_break_glass
aiden.getBreakGlass
Aiden.GetBreakGlass
Read whether break-glass is active, who opened it, and when it expires.
aiden.end_break_glass
aiden.endBreakGlass
Aiden.EndBreakGlass
Turn policy enforcement back on after break-glass.
aiden.list_audit_events
aiden.listAuditEvents
Read the first page of audit events.
aiden.iter_audit_events
aiden.iterAuditEvents
Aiden.IterAuditEvents
Walk every matching audit event past the first page.
aiden.export_audit_events
aiden.exportAuditEvents
Aiden.ExportAuditEvents
Write matching audit events to an NDJSON file, in the native shape or OCSF.
aiden.get_audit_event
aiden.getAuditEvent
Read one audit event by id, including the full payload.
aiden.list_audit_facets
aiden.listAuditFacets
List facet values you can use to filter audit events.
aiden.list_chat_subscriptions
aiden.listChatSubscriptions
Aiden.ListChatSubscriptions
List Slack or Teams subscriptions that point at your app.
aiden.create_chat_subscription
aiden.createChatSubscription
Aiden.CreateChatSubscription
Point a chat channel at your app so messages start work.
aiden.get_chat_subscription
aiden.getChatSubscription
Read one chat subscription by id.
aiden.update_chat_subscription
aiden.updateChatSubscription
Update a chat subscription.
aiden.toggle_chat_subscription
aiden.toggleChatSubscription
Aiden.ToggleChatSubscription
Mute or resume a chat subscription without deleting it.
aiden.delete_chat_subscription
aiden.deleteChatSubscription
Aiden.DeleteChatSubscription
Delete a chat subscription.
aiden.create_knowledge_hub
aiden.createKnowledgeHub
Create a knowledge hub agents can read.
aiden.delete_knowledge_hub
aiden.deleteKnowledgeHub
Delete a knowledge hub.
aiden.create_knowledge_document
aiden.createKnowledgeDocument
Add a document to a knowledge hub.
aiden.get_knowledge_document
aiden.getKnowledgeDocument
Read one knowledge document by id.
aiden.list_knowledge_documents
aiden.listKnowledgeDocuments
List knowledge documents.
aiden.delete_knowledge_document
aiden.deleteKnowledgeDocument
Delete a knowledge document.
aiden.list_knowledge_items
aiden.listKnowledgeItems
List indexed items inside a knowledge hub.
aiden.create_skill
aiden.createSkill
Aiden.CreateSkill
Create a skill you can attach to a workflow stage.
aiden.delete_skill
aiden.deleteSkill
Delete a skill.
aiden.list_models
aiden.listModels
Aiden.ListModels
List models available to agents in the workspace.
aiden.llm.test_model
aiden.llm.testModel
Aiden.TestModel
Probe a model configuration without registering it; returns success/message.
aiden.llm.delete_model
aiden.llm.deleteModel
Aiden.DeleteModel
Delete a registered model.
aiden.llm.delete_provider
aiden.llm.deleteProvider
Aiden.DeleteLLMProvider
Delete an LLM provider. Delete its models first.
aiden.list_tools
aiden.listTools
List tools agents can call.
aiden.create_remote_runner
aiden.createRemoteRunner
Register a remote runner that executes tools outside the platform.
aiden.get_remote_runner
aiden.getRemoteRunner
Read one remote runner by id.
aiden.list_remote_runners
aiden.listRemoteRunners
List remote runners.
aiden.list_remote_runner_tasks
aiden.listRemoteRunnerTasks
List tasks queued on a remote runner.
aiden.revoke_remote_runner
aiden.revokeRemoteRunner
Revoke a remote runner so it can no longer execute tools.
SRE
Call these on client.sre. Pull alerts, start an investigation, wait for the RCA, and triage the inbox.
sre.list_alerts
sre.listAlerts
SRE.ListAlerts
List alerts, with optional status and text filters.
sre.get_alert
sre.getAlert
SRE.GetAlert
Read one alert by id.
sre.pull_alerts
sre.pullAlerts
SRE.PullAlerts
Start an async alert pull (joins an in-progress pull on 409).
sre.pull_alerts_and_wait
sre.pullAlertsAndWait
SRE.PullAlertsAndWait
Start a pull and wait until it finishes.
sre.wait_for_alert_pull
sre.waitForAlertPull
SRE.WaitForAlertPull
Poll one pull until completed or failed.
sre.get_alert_pull
sre.getAlertPull
SRE.GetAlertPull
Read one alert pull by id.
sre.list_alert_pulls
sre.listAlertPulls
SRE.ListAlertPulls
List recent alert pulls.
sre.ignore_alert
sre.ignoreAlert
SRE.IgnoreAlert
Mark an alert ignored.
sre.unignore_alert
sre.unignoreAlert
SRE.UnignoreAlert
Return an ignored alert to active.
sre.set_alert_attention
sre.setAlertAttention
SRE.SetAlertAttention
Override attention (needs_attention, needs_review, false_positive, others).
sre.update_alert
sre.updateAlert
SRE.UpdateAlert
Raw alert patch (do not send status and attention together).
sre.investigate_alert
sre.investigateAlert
SRE.InvestigateAlert
Start an investigation from an alert.
sre.investigate_alert_and_wait
sre.investigateAlertAndWait
SRE.InvestigateAlertAndWait
Start an investigation and wait for the RCA.
sre.wait_for_investigation
sre.waitForInvestigation
SRE.WaitForInvestigation
Poll while queued or running; return on completed, draft, or resolved.
sre.list_investigations
sre.listInvestigations
SRE.ListInvestigations
List investigations.
sre.get_investigation
sre.getInvestigation
SRE.GetInvestigation
Read an investigation, including status and the write-up when it is ready.
sre.list_investigation_groups
sre.listInvestigationGroups
SRE.ListInvestigationGroups
List investigations grouped by alert.
sre.resolve_investigations
sre.resolveInvestigations
SRE.ResolveInvestigations
Mark investigation threads resolved.
sre.cancel_investigations
sre.cancelInvestigations
SRE.CancelInvestigations
Cancel investigation threads.
sre.fork_investigation
sre.forkInvestigation
SRE.ForkInvestigation
Fork an investigation into a new thread that keeps the parent RCA.
sre.list_remediation_checks
sre.listRemediationChecks
SRE.ListRemediationChecks
List post-remediation verification rows for an investigation.
DevOps
Call these on client.devops. Sync the Ops Inbox, wait for triage, approve a request, and discover workflows from recent tickets.
devops.setup_status
devops.setupStatus
DevOps.SetupStatus
Read which ticket trackers are connected.
devops.sync_requests
devops.syncRequests
DevOps.SyncRequests
Pull tickets into the Ops Inbox.
devops.list_requests
devops.listRequests
DevOps.ListRequests
List inbox requests with status and matched workflow.
devops.get_request
devops.getRequest
DevOps.GetRequest
Read one request by id.
devops.fetch_request
devops.fetchRequest
DevOps.FetchRequest
Import one ticket key such as CORE-981.
devops.fetch_and_wait
devops.fetchAndWait
DevOps.FetchAndWait
Fetch one ticket and wait until triage settles.
devops.wait_for_triage
devops.waitForTriage
DevOps.WaitForTriage
Poll while status is new or triaging.
devops.approve_and_wait
devops.approveAndWait
DevOps.ApproveAndWait
Approve a request and wait for the run.
devops.approve_request
devops.approveRequest
DevOps.ApproveRequest
Approve a request without waiting.
devops.wait_for_execution
devops.waitForExecution
DevOps.WaitForExecution
Poll until execution_status is completed or failed.
devops.post_source_comment
devops.postSourceComment
DevOps.PostSourceComment
Post a comment on the upstream ticket.
devops.defer_request
devops.deferRequest
DevOps.DeferRequest
Defer a request for later review.
devops.reopen_request
devops.reopenRequest
DevOps.ReopenRequest
Move a resolved request back to awaiting_approval.
devops.retriage_request
devops.retriageRequest
DevOps.RetriageRequest
Queue a fresh AI classification.
devops.stop_triage
devops.stopTriage
DevOps.StopTriage
Stop active triage.
devops.list_workflows
devops.listWorkflows
DevOps.ListWorkflows
List workflows eligible for request execution.
devops.inbox_funnel
devops.inboxFunnel
DevOps.InboxFunnel
Read Ops Inbox funnel metrics for a period.
devops.start_workflow_discovery
devops.startWorkflowDiscovery
DevOps.StartWorkflowDiscovery
Start workflow discovery from recent tickets.
devops.wait_for_workflow_discovery
devops.waitForWorkflowDiscovery
DevOps.WaitForWorkflowDiscovery
Poll discovery until ready or failed.
devops.latest_workflow_discovery
devops.latestWorkflowDiscovery
DevOps.LatestWorkflowDiscovery
Read the latest discovery run.
Vault
Call these on client.vault when you store and rotate secrets yourself. For a working integration in one call, use aiden.upsert_integration_with_secrets.
vault.store_secret
vault.storeSecret
Vault.StoreSecret
Store a secret from a Vault body you assemble yourself.
vault.get_supported_metadata
vault.getSupportedMetadata
Vault.GetSupportedMetadata
List Vault categories, subcategories, and the keys each one expects.
find_supported_format
findSupportedFormat
Import this helper and find one Vault category row by category and subcategory.
vault.list_secrets
vault.listSecrets
Vault.ListSecrets
List secrets, with optional filters.
vault.get_secret
vault.getSecret
Vault.GetSecret
Read one secret by id.
vault.update_secret
vault.updateSecret
Vault.UpdateSecret
Update a secret by id.
vault.delete_secret
vault.deleteSecret
Vault.DeleteSecret
Delete a secret by id.
vault.store_github_secret
vault.storeGithubSecret
Vault.StoreGithubSecret
Store a GitHub token secret for an integration.
vault.store_grafana_secret
vault.storeGrafanaSecret
Vault.StoreGrafanaSecret
Store a Grafana URL and token.
vault.store_kafka_secret
vault.storeKafkaSecret
Store Kafka bootstrap servers and optional SASL fields.
vault.store_generic_secret
vault.storeGenericSecret
Vault.StoreGenericSecret
Store an arbitrary key-value secret.
Context Graph
Call these on client.contextGraph (Python context_graph, Go ContextGraph) for workspace graph inventory, connectors, and search.
context_graph.health
contextGraph.health
ContextGraph.Health
Check Context Graph liveness.
context_graph.ready
contextGraph.ready
ContextGraph.Ready
Check Context Graph readiness.
context_graph.get_workspace_status
contextGraph.getWorkspaceStatus
ContextGraph.GetWorkspaceStatus
Readiness + record counts + per-connector sync health in one call.
context_graph.list_record_types
contextGraph.listRecordTypes
ContextGraph.ListRecordTypes
List record types in the workspace graph.
context_graph.get_record
contextGraph.getRecord
ContextGraph.GetRecord
Read one record by type and id.
context_graph.query_records
contextGraph.queryRecords
ContextGraph.QueryRecords
Run a graph record query.
context_graph.get_schema
contextGraph.getSchema
ContextGraph.GetSchema
Fetch the full schema catalog.
context_graph.get_schema_type
contextGraph.getSchemaType
ContextGraph.GetSchemaType
Fetch schema for one record type.
context_graph.list_connectors
contextGraph.listConnectors
ContextGraph.ListConnectors
List available connectors.
context_graph.list_connector_sources
contextGraph.listConnectorSources
ContextGraph.ListConnectorSources
List configured connector sources.
context_graph.list_connector_syncs
contextGraph.listConnectorSyncs
ContextGraph.ListConnectorSyncs
Page connector sync history.
context_graph.get_connector_sync
contextGraph.getConnectorSync
ContextGraph.GetConnectorSync
Read one connector sync by id.
context_graph.start_connector_sync
contextGraph.startConnectorSync
ContextGraph.StartConnectorSync
Start an async connector sync and return its sync_id.
context_graph.sync_and_wait
contextGraph.syncAndWait
ContextGraph.SyncAndWait
Start a connector sync and poll until it settles.
context_graph.list_connector_schedules
contextGraph.listConnectorSchedules
ContextGraph.ListConnectorSchedules
List connector sync schedules.
context_graph.set_connector_schedule_interval
contextGraph.setConnectorScheduleInterval
ContextGraph.SetConnectorScheduleInterval
Change how often one connector schedule runs.
context_graph.list_entity_link_rules
contextGraph.listEntityLinkRules
ContextGraph.ListEntityLinkRules
List entity link rules for the workspace.
context_graph.search_graph_tools
contextGraph.searchGraphTools
ContextGraph.SearchGraphTools
Search graph tools by query string or request body.