Skip to main content

TaskConfig (Task-Level)

Defines task-level configuration from task.toml files. Import: from harbor.models.task.config import TaskConfig

Fields

str
default:"'1.0'"
Task configuration version.
dict[str, Any]
default:"{}"
Arbitrary task metadata (author, description, tags, etc.).
VerifierConfig
default:"VerifierConfig()"
Verifier configuration for this task.
AgentConfig
default:"AgentConfig()"
Agent execution configuration.
EnvironmentConfig
default:"EnvironmentConfig()"
Environment resource configuration.
SolutionConfig
default:"SolutionConfig()"
Solution script configuration.
str | None
default:"None"
Source dataset name if task is from a dataset.

Methods

model_validate_toml

Create a TaskConfig from TOML string.
str
required
TOML-formatted configuration string.
TaskConfig
Parsed configuration object.

model_dump_toml

Serialize TaskConfig to TOML string.
str
TOML-formatted configuration.

Example

AgentConfig (Task-Level)

Agent execution settings in task configuration. Import: from harbor.models.task.config import AgentConfig

Fields

float
default:"600.0"
Agent execution timeout in seconds (10 minutes default).

Example

EnvironmentConfig (Task-Level)

Environment resource configuration in task definition. Import: from harbor.models.task.config import EnvironmentConfig

Fields

float
default:"600.0"
Environment build timeout in seconds (10 minutes default).
str | None
default:"None"
Pre-built Docker image to use instead of building from Dockerfile.
int
default:"1"
Number of CPU cores allocated to the environment.
int
default:"2048"
Memory allocation in megabytes (2GB default).
int
default:"10240"
Storage allocation in megabytes (10GB default).
int
default:"0"
Number of GPUs to allocate.
list[str] | None
default:"None"
Acceptable GPU types (e.g., ['H100', 'A100', 'T4']). None means any GPU is acceptable.
bool
default:"True"
Whether to allow internet access in the environment.
list[MCPServerConfig]
default:"[]"
MCP (Model Context Protocol) servers available to agents.
str | None
default:"None"
Path to skills directory in the environment. Contents are copied to the agent’s skills directory.

Deprecated Fields

str | None
deprecated
Deprecated. Use memory_mb instead. Format: '2G', '512M', etc.
str | None
deprecated
Deprecated. Use storage_mb instead. Format: '10G', '5120M', etc.

Example

VerifierConfig (Task-Level)

Verifier execution configuration. Import: from harbor.models.task.config import VerifierConfig

Fields

float
default:"600.0"
Verifier execution timeout in seconds (10 minutes default).
dict[str, str]
default:"{}"
Environment variables for the verifier script.

Example

SolutionConfig

Solution script configuration. Import: from harbor.models.task.config import SolutionConfig

Fields

dict[str, str]
default:"{}"
Environment variables for the solution script.

Example

MCPServerConfig

Configuration for an MCP (Model Context Protocol) server. Import: from harbor.models.task.config import MCPServerConfig

Fields

str
required
Name of the MCP server.
str
default:"'sse'"
Transport protocol: 'sse', 'streamable-http', or 'stdio'.
str | None
default:"None"
Server URL (required for sse and streamable-http transports).
str | None
default:"None"
Command to start the server (required for stdio transport).
list[str]
default:"[]"
Command-line arguments (for stdio transport).

Validation

The config validates that:
  • url is provided for sse and streamable-http transports
  • command is provided for stdio transport

Examples

SSE Transport

STDIO Transport

Multiple Servers

Complete task.toml Example