Skip to content

Examples

Complete applications built on the Agents API guide, each running against a real Core installation with a Project API key.

Parsar Agent workbench ​

A conversation workspace built on Core. Assemble Agents from a resource library and an environment template, then talk to them in a local Web chat or through Feishu bots that act as the Agent's identity. Both entries create ordinary public Sessions.

Source: example/parsar.

Run and configure it with the example README, which also owns its supported features, storage and validation.

What to look at ​

Each feature maps to one part of the API. Read the code next to the guide section:

FeatureAPI usedGuideCode
Server-side key and headersBearer key, OpenAI-Beta, route allowlistBefore you startserver.mjs
Agents with a Harness and modelx_agents_core.harness, model_providerCore extensionsserver/sessions.mjs
Web and Feishu conversationsPublic Session creation, input events, Turns and ItemsSend inputserver/sessions.mjs, server/feishu.mjs
Hosted Environments from templatesopenai_hosted with packages, files, env and setup_commandsCreate a Sessionserver/runtime-profile.mjs
Crash-safe Session creationIdempotency-Key, recovery from a lost responseIdempotencyserver/sessions.mjs
Live repliesEvent stream, text deltas, reconnect and reconcileStream eventssrc/lib/live-session.ts
Follow-ups and cancelInput events with idempotency keysSend inputsrc/Composer.tsx
HistoryPaging Turns and ItemsPaginationsrc/lib/api.ts
Skills and versions/skills, default versionSkillssrc/Skills.tsx

RL and evaluation rollouts ​

A Python script that runs batches of tasks as hosted Sessions, with any Harness and model, and grades each answer outside the sandbox. It shows Core as a rollout engine for RL training and evaluation. Each rollout is one Session with no network, task files as initial files and the answer as an Artifact.

Source: example/rl-eval.

Run and configure it with the example README, which also owns its output format, task format and training setup.

What to look at ​

FeatureAPI usedGuideCode
One Session per rolloutInline input, metadata and openai_hostedCreate a Sessionrl_eval.py
Task files without networkInline files and network.access: disabledInitial filesrl_eval.py
Harness and model matrixx_agents_core.harness, model, model_providerCore extensionsrl_eval.py
Wait, time out and cancelTurn list polling, agent.session.input.cancelCancelrl_eval.py
Answer outside the sandboxArtifacts under outputs/Artifactsrl_eval.py
Trajectories and usageItems and Turn usageTurns and Itemsrl_eval.py

To contribute an example, follow the application example boundary.

Released under the MIT License. © 2026 MiniMax-AI