Create and Run Agents
This page covers the full path from agent creation to first execution.Path A: Create agents in Console
In Console, go to AI agents and configure:- Agent name and description.
- Optional tool and knowledge-base attachments.
- Optional access and visibility settings.
- Optional MCP server attachments (covered in a separate page).
Path B: Create agents in your backend using Node SDK
Create a context and execute the agent
Use execution contexts to keep conversation state scoped to a user/session.What context_group means
context_group is the grouping key that decides which execution contexts belong to the same logical conversation scope.
Use a deterministic tenancy-safe format, for example workspace:<workspaceId>:user:<userId>.
For full session-type behavior (static vs signin), see Run Agents Inside Your App.
Raw HTTP fallback (non-SDK runtimes)
Production pattern
- Keep one stable
agent_nameper business capability. - Keep one
context_groupstrategy that maps to your tenancy model. - Store
agent_idand context metadata in your own DB for auditability. - Never let frontend clients call
/ai/*with backend API keys.
