Agents
List and inspect agents, and run the local code dev loop — pull, push, deploy.
Agents are the steps your pipeline runs. Premia ships built-in agents (planner, developer, reviewer, QA, …) and lets you add custom agents — either config-only or full code agents you edit locally and deploy to our cloud.
The code dev loop is: pull → edit → push → deploy.
The run(context) contract
Code agents export a single run(context) function. Premia wraps it in a hosted
managed function (image, secrets, logging) — you never manage infrastructure. See
Custom code agents for the full contract.
premia agents list
List every agent available in your org (built-in and custom).
premia agents list [--json]SLUG NAME TYPE RUNTIME DEPLOY
plan Planner built-in
execute Developer built-in
review Reviewer built-in
security-lens Security Lens code python deployed
triage-bot Triage Bot configTYPE is built-in for Premia's agents, otherwise the custom agent type
(code or config). DEPLOY shows the deployment status for code agents.
premia agents view
Show one agent's configuration.
premia agents view <slug> [--json]Security Lens (security-lens)
Reviews diffs for auth and data-exposure issues.
type code
model claude-sonnet-4-6
runtime python
deploy deployedpremia agents pull
Download a code agent's source to a local file so you can edit it.
premia agents pull <slug> [--force]| Flag | Description |
|---|---|
--force | Overwrite an existing local file. |
Writes ./<slug>.py (or .ts for TypeScript agents). If the agent has no code
yet, Premia writes a starter template so the contract is obvious:
# Custom Premia agent. You write run(context); Premia wraps it in a managed
# function (image, secrets, logging) and hosts it — no infra to manage.
#
# context holds the data you bound to this agent (run, repo, pr_diff, plan_output, …).
# 'logger' is available (logger.log("info", "…")). Return a dict.
def run(context: dict) -> dict:
logger.log("info", "hello from my agent")
return {"status": "done", "output": "edit me"}✓ Pulled security-lens → security-lens.pypremia agents push
Upload your local changes back to the agent (this stages the code; it goes live
on the next deploy).
premia agents push <slug> [--file <path>]| Flag | Description |
|---|---|
--file <path> | Path to the source file. Defaults to ./<slug>.<ext>. |
✓ Pushed security-lens.py → security-lens (1284 bytes)
Deploy it: premia agents deploy security-lensIf the default file isn't found, the command exits 3 and tells you to pass
--file or run premia agents pull <slug> first.
premia agents deploy
Build and deploy a code agent to our cloud.
premia agents deploy <slug> [--wait]| Flag | Description |
|---|---|
--wait | Block until the deploy finishes (deployed or failed). |
→ Deploying security-lens…
Check status: premia agents view security-lensWith --wait, the CLI polls every 4s and reports the outcome, exiting 1 if the
build fails:
→ Deploying security-lens…
✓ deployedThe full loop
Pull the agent to a local file: premia agents pull security-lens
Edit security-lens.py — implement your run(context).
Push your changes: premia agents push security-lens
Deploy to the cloud: premia agents deploy security-lens --wait
See Models & secrets for choosing a model and giving your agent credentials.