Skip to content

The Dockfile

The Dockfile (Dockfile.yaml) is the single configuration file that defines everything about your AI agent deployment. It is validated against the DockSpec Pydantic model in dockrion_schema. Unknown fields are allowed (extra="allow") for forward compatibility.

version: "1.0"
agent:
name: my-agent
handler: app.service:handle
io_schema:
input:
type: object
properties:
query:
type: string
output:
type: object
expose:
rest: true

Only version, agent, io_schema, and expose are required. Everything else is optional.

PageWhat it covers
2.1 agentname, entrypoint vs handler, framework, validation rules
2.2 io_schemaInput/output contracts, types, strict mode
2.3 authAuthentication modes: API key, JWT, OAuth2, roles, rate limits
2.4 policiesTool gating, prompt injection blocking, output redaction
2.5 secretsDeclaring required and optional secrets
2.6 streamingSSE, async runs, event types, backends, StreamContext
2.7 observabilityPrometheus metrics, Langfuse, log levels, structured logging
2.8 build configDocker build includes, excludes, auto-detection
2.9 env substitution${VAR} and ${VAR:-default} syntax, .env loading order
2.10 metadataMaintainer, version, tags
2.11 Complete exampleFull annotated Dockfile with every section

Previous: 1. Introduction | Next: 3. CLI Reference →