iblai-api-agent-create
Create a brand-new agent from a template. This is the step before
configuring an agent: it mints a new agent and returns its unique_id, which
you then hand to the /iblai-api-agent-* skills (settings, llm, prompts,
datasets, …) to configure further. To duplicate an existing agent instead of
starting from a template, use /iblai-api-agent-setting (fork).
Auth & conventions
- Base URL:
https://api.iblai.app
- Header:
Authorization: Api-Token $IBLAI_API_KEY on every request.
- Path vars:
{org} = $IBLAI_ORG, {username} = $IBLAI_USERNAME.
- Not connected yet? Run
/iblai-api-login first to populate IBLAI_ORG,
IBLAI_USERNAME, and IBLAI_API_KEY.
Reads
- GET
https://api.iblai.app/dm/api/search/orgs/{org}/users/{username}/mentors/ — list existing agents in the org (useful to pick a fork source or confirm names are free).
- GET
https://api.iblai.app/dm/api/ai-mentor/orgs/{org}/users/{username}/mentor/categories/ — category options (to assign after creation via /iblai-api-agent-setting).
Writes
- POST
https://api.iblai.app/dm/api/ai-mentor/orgs/{org}/users/{username}/mentor-with-settings/ — create a new agent from a template (returns the created agent with its unique_id):{
"template_name": "string (required, e.g. ai-mentor)",
"new_mentor_name": "string (required)",
"display_name": "string",
"description": "string",
"system_prompt": "string",
"llm_provider": "string"
}
Example
Create a data-science agent from the default ai-mentor template, then capture
its unique_id for follow-up configuration:
curl -X POST \
"https://api.iblai.app/dm/api/ai-mentor/orgs/$IBLAI_ORG/users/$IBLAI_USERNAME/mentor-with-settings/" \
-H "Authorization: Api-Token $IBLAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"template_name": "ai-mentor",
"new_mentor_name": "Data Science Tutor",
"description": "Helps users with statistics and Python."
}'
# → response includes "unique_id"; use it as {mentor} in the other skills
Notes
template_name defaults to ai-mentor on most orgs; the create call accepts
any template the org exposes.
- Creation is intentionally minimal — set only name + a couple of fields here,
then drive the rest with the focused skills:
/iblai-api-agent-setting,
/iblai-api-agent-llm, /iblai-api-agent-prompt, /iblai-api-agent-dataset,
/iblai-api-agent-tool, etc., using the returned unique_id as {mentor}.
- To copy an existing agent rather than start from a template, use the fork
endpoint in
/iblai-api-agent-setting.
- End-to-end example: the
iblai/quickstarts
Python client wraps these calls — create an agent, open a session, and chat with it
from a script (see also /iblai-api-agent-session for the chat transport).
Reference material
Doc-sourced material preserved from the developer docs:
references/quickstart.md — the iblai/quickstarts Python client outlined: env vars and the create-agent → open-session → chat-over-WebSocket flow, with the runnable client (quickstart.py + api.py) preserved in assets/.
references/agent-file-format.md — the .iblai Markdown agent-file format (iblai/standard pointer).
1---2name: iblai-api-agent-create3description: Create a new ibl.ai agent from a template via the platform API — set name, display name, description, system prompt, and LLM provider; returns the new agent's unique id. Use when creating an agent from scratch, then configure it with the other /iblai-api-agent-* skills.4---56# iblai-api-agent-create78Create a brand-new agent from a template. This is the step **before**9configuring an agent: it mints a new agent and returns its `unique_id`, which10you then hand to the `/iblai-api-agent-*` skills (settings, llm, prompts,11datasets, …) to configure further. To duplicate an existing agent instead of12starting from a template, use `/iblai-api-agent-setting` (fork).1314## Auth & conventions1516- **Base URL:** `https://api.iblai.app`17- **Header:** `Authorization: Api-Token $IBLAI_API_KEY` on every request.18- **Path vars:** `{org}` = `$IBLAI_ORG`, `{username}` = `$IBLAI_USERNAME`.19- Not connected yet? Run **`/iblai-api-login`** first to populate `IBLAI_ORG`,20 `IBLAI_USERNAME`, and `IBLAI_API_KEY`.2122## Reads2324- **GET** `https://api.iblai.app/dm/api/search/orgs/{org}/users/{username}/mentors/` — list existing agents in the org (useful to pick a fork source or confirm names are free).25- **GET** `https://api.iblai.app/dm/api/ai-mentor/orgs/{org}/users/{username}/mentor/categories/` — category options (to assign after creation via `/iblai-api-agent-setting`).2627## Writes2829- **POST** `https://api.iblai.app/dm/api/ai-mentor/orgs/{org}/users/{username}/mentor-with-settings/` — create a new agent from a template (returns the created agent with its `unique_id`):30 ```json31 {32 "template_name": "string (required, e.g. ai-mentor)",33 "new_mentor_name": "string (required)",34 "display_name": "string",35 "description": "string",36 "system_prompt": "string",37 "llm_provider": "string"38 }39 ```4041## Example4243Create a data-science agent from the default `ai-mentor` template, then capture44its `unique_id` for follow-up configuration:4546```bash47curl -X POST \48 "https://api.iblai.app/dm/api/ai-mentor/orgs/$IBLAI_ORG/users/$IBLAI_USERNAME/mentor-with-settings/" \49 -H "Authorization: Api-Token $IBLAI_API_KEY" \50 -H "Content-Type: application/json" \51 -d '{52 "template_name": "ai-mentor",53 "new_mentor_name": "Data Science Tutor",54 "description": "Helps users with statistics and Python."55 }'56# → response includes "unique_id"; use it as {mentor} in the other skills57```5859## Notes6061- `template_name` defaults to `ai-mentor` on most orgs; the create call accepts62 any template the org exposes.63- Creation is intentionally minimal — set only name + a couple of fields here,64 then drive the rest with the focused skills: `/iblai-api-agent-setting`,65 `/iblai-api-agent-llm`, `/iblai-api-agent-prompt`, `/iblai-api-agent-dataset`,66 `/iblai-api-agent-tool`, etc., using the returned `unique_id` as `{mentor}`.67- To copy an existing agent rather than start from a template, use the **fork**68 endpoint in `/iblai-api-agent-setting`.69- **End-to-end example:** the [`iblai/quickstarts`](https://github.com/iblai/quickstarts)70 Python client wraps these calls — create an agent, open a session, and chat with it71 from a script (see also `/iblai-api-agent-session` for the chat transport).7273## Reference material7475Doc-sourced material preserved from the developer docs:7677- [`references/quickstart.md`](references/quickstart.md) — the [`iblai/quickstarts`](https://github.com/iblai/quickstarts) Python client outlined: env vars and the create-agent → open-session → chat-over-WebSocket flow, with the runnable client (`quickstart.py` + `api.py`) preserved in [`assets/`](assets/).78- [`references/agent-file-format.md`](references/agent-file-format.md) — the `.iblai` Markdown agent-file format ([`iblai/standard`](https://github.com/iblai/standard) pointer).