For the complete documentation index, see llms.txt. Markdown versions of all docs pages are available by appending .md to any docs URL.
kagent db migrate
Apply, roll back, and inspect database migrations
Apply, roll back, and inspect database migrations independently of server startup. Reads POSTGRES_DATABASE_URL from the environment when –db-url is omitted.
kagent db migrate [command]Subcommands:
kagent db migrate down- Roll back the N most-recent applied migrations for the selected sourcekagent db migrate force- Mark version V as applied without running its SQLkagent db migrate goto- Move the selected source’s schema to version Vkagent db migrate status- Show how many migrations are applied vs pending across all sourceskagent db migrate up- Apply all pending migrations across every registered sourcekagent db migrate version- Print the highest applied migration version
Flags:
--db-url string- PostgreSQL connection URL (defaults to value of POSTGRES_DATABASE_URL env var)-h, --help- help for migrate--source string- Migration source name for per-source ops (down/goto/force/version); inferred when only one source is registered. Not applicable to up or status — those aggregate across every registered source.
Global Flags:
--kagent-grpc-ca-file string- CA certificate file for KAgent gRPC--kagent-grpc-server-name string- TLS server name for KAgent gRPC--kagent-grpc-tls- Use TLS for KAgent gRPC--kagent-grpc-url string- KAgent gRPC target (default “localhost:8084”)