The AgentMark CLI automatically detects and runs Python projects with the appropriate dev server configuration.Documentation Index
Fetch the complete documentation index at: https://docs.agentmark.co/llms.txt
Use this file to discover all available pages before exploring further.
Starting the dev server
Project detection
The CLI identifies Python projects by checking for:pyproject.toml- Python project manifestagentmark_client.py- AgentMark client configuration.agentmark/dev_server.py- Auto-generated entry point
Virtual environment detection
The CLI automatically detects and uses virtual environments:Entry point resolution
The dev server entry point is resolved in this order:| Location | Description |
|---|---|
dev_server.py | Custom dev server (project root) |
.agentmark/dev_server.py | Auto-generated server |
Custom dev server
Create adev_server.py in your project root to customize the webhook server:
dev_server.py
Auto-generated server
When you runnpm create agentmark@latest, an entry point is created at .agentmark/dev_server.py:
.agentmark/dev_server.py
Environment variables
The dev server sets the following environment variables:| Variable | Value | Description |
|---|---|---|
PYTHONDONTWRITEBYTECODE | 1 | Prevents __pycache__ creation |
PYTHONUNBUFFERED | 1 | Ensures real-time output |
AGENTMARK_BASE_URL | http://localhost:{api_port} | API server URL for telemetry |
Server architecture
When you runnpx agentmark dev, three servers start:
- Receives prompt execution requests from the CLI
- Uses your
agentmark_client.pyconfiguration - Executes prompts via the configured adapter (Pydantic AI or Claude Agent SDK)
- Returns streaming or non-streaming responses
Port configuration
Override default ports with CLI options:| Option | Default | Description |
|---|---|---|
--webhook-port | 9417 | Webhook server port |
--api-port | 9418 | API server port |
--app-port | 3000 | UI server port |
Webhook handler
The webhook server implements two event types:prompt-run
Executes a single prompt:dataset-run
Executes a prompt across a dataset:Running prompts
With the dev server running, execute prompts from another terminal:Troubleshooting
Virtual environment not found
If you see “python not found” errors:Module not found
Ensure dependencies are installed in the correct virtual environment:Port already in use
If ports are busy, specify alternative ports:agentmark_client.py not found
The CLI requires agentmark_client.py in your project root:
Adapter-specific considerations
Pydantic AI
The Pydantic AI dev server usesaiohttp for async HTTP handling:
Claude Agent SDK
The Claude Agent SDK dev server handles agentic execution:Next steps
Python overview
Python SDK and project setup
Pydantic AI
Type-safe LLM interactions
Claude Agent SDK
Agentic task execution
Running prompts
Execute prompts from CLI
Have Questions?
We’re here to help! Choose the best way to reach us:
- Email us at hello@agentmark.co for support
- Schedule an Enterprise Demo to learn about our business solutions