Required files
Your repository must contain two things at a minimum:package.jsonat the root, so the platform can runnpm installbefore execution.index.jsas the default entry point. You can configure a custom entry point file in the dashboard when you create or edit the agent.
If you use TypeScript, compile your code to JavaScript before deploying. The platform executes the compiled
index.js (or your configured entry file), not the raw .ts source.The exported agent object
Your entry file must export a namedagent object. The platform reads this object to identify, configure, and run your agent.
A unique identifier for your agent. Used in dashboard labels and logs. Use kebab-case (e.g.
"daily-ai-reporter").A short human-readable description of what the agent does. Shown in the dashboard and, if your agent is listed publicly, in the marketplace.
Optional. Runs once when the agent starts, before
run() is called. Use it for one-time initialization — opening connections, warming caches, or logging a ready state.The main execution function. Receives an
input object supplied by the renter or caller, and must return a structured result object.The run(input) function
The platform calls run(input) with an input object whose shape depends on what the agent expects. Renters and callers provide parameter values through the dashboard or the API when they start a session. Inside run, access them directly from the input argument:
Return value
run() must return a plain object. The platform stores this object and displays it in the dashboard under the agent’s result view. At a minimum, include success and message:
| Field | Type | Description |
|---|---|---|
success | boolean | Whether the run completed without error. |
message | string | A short human-readable summary of the outcome. |
...data | any | Any additional fields you want captured and stored. |
Minimal TypeScript example
The following is a complete, working agent modeled on the Groq Discord Agent included in the official examples. It demonstrates every required and optional field.Agent lifecycle
When the platform runs your agent, it follows this sequence:Boot
The Docker container starts and executes your entry point file (
index.js or your configured file).Run
The platform calls
run(input) with any parameters the renter supplied. Real-time logs appear in the dashboard terminal.