Deployment pipeline (recommended)
Connect a Git repository to your app in the AgentMark dashboard. When you push, the platform runs a two-step pipeline that syncs your files and deploys your handler code.Setup
- Push your project to a Git repository (GitHub or GitLab).
- In the dashboard, navigate to your app’s Settings.
- Under “Repository”, connect your repository and select a branch.
How the pipeline works
Every push to your connected branch triggers a two-step deployment:- File sync — The platform syncs your prompt templates (
.prompt.mdx), components (.mdx,.md), and datasets (.jsonl) between your repository and the platform. - Code deploy — If a handler file is detected, the platform bundles your code and deploys it to a managed machine. Your handler executes prompts when triggered from the dashboard, API, or experiments.
npm create agentmark@latest include a handler.ts file automatically.
Code deployment currently supports TypeScript only. Python support is coming soon. Python projects can still use file sync and run prompts via Connect.
Handler detection
The platform determines your handler file using this order:handlerkey inagentmark.json— If your config includes ahandlerfield, the platform uses that path.
agentmark.json
- Fallback:
handler.tsin the repository root — If nohandlerkey is set, the platform checks for ahandler.tsfile at the root of your repository.
Re-triggering deployments
After your first successful deployment, you can re-trigger individual steps from the deployment card in the dashboard:- Re-sync — Pull the latest files from your repository without rebuilding code. Use this when you only changed prompt templates or datasets.
- Rebuild — Re-bundle and redeploy your handler code without re-syncing files. Use this when you need to pick up new environment variables.
- Full deploy — Run both file sync and code deploy.
Environment variables
Configure environment variables for your deployed handler in the dashboard under Settings > Environment Variables. These variables are injected during the build step and available to your handler at runtime. Add your AI provider keys (such asOPENAI_API_KEY or ANTHROPIC_API_KEY) and any other secrets your handler needs. Changes to environment variables take effect on the next deployment — trigger a Rebuild to apply them immediately.
CLI deploy
For projects that don’t use Git — or for CI/CD pipelines that need programmatic control — useagentmark deploy to upload files directly.
.prompt.mdx, .mdx, .md, and .jsonl files from your AgentMark directory and uploads them to the platform.
CLI deploy syncs files only. It does not bundle or deploy handler code. If you need managed code deployment, use the deployment pipeline instead.
CLI deploy and the deployment pipeline are mutually exclusive per app. If your app is connected to a Git repository, disconnect it in Settings before using
agentmark deploy.Have Questions?
We’re here to help! Choose the best way to reach us:
- Join our Discord community for quick answers and discussions
- Email us at hello@agentmark.co for support
- Schedule an Enterprise Demo to learn about our business solutions