monty
Monty — AI-powered Python development agent with MCP integration.
Installation
dagger install github.com/telchak/daggerverse/monty@v0.1.0Entrypoint
Return Type
Monty !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory | - | Python project source directory |
| pythonVersion | String ! | "3.13" | Python version for the MCP server containers |
| selfImprove | String ! | "off" | Self-improvement mode: 'off' (default), 'write' (update context file), 'commit' (update + git commit) |
Example
dagger -m github.com/telchak/daggerverse/monty@010621c997378db92da5969584001be575c5e5a7 call \
--python-version string --self-improve stringfunc (m *MyModule) Example(pythonVersion string, selfImprove string) *dagger.Monty {
return dag.
Monty(pythonVersion, selfImprove)
}@function
def example(python_version: str, self_improve: str) -> dagger.Monty:
return (
dag.monty(python_version, self_improve)
)@func()
example(pythonVersion: string, selfImprove: string): Monty {
return dag
.monty(pythonVersion, selfImprove)
}Types
Monty 🔗
AI-powered Python development agent. Uses the python-lft MCP server for linting, formatting, and testing, and the pypi-query MCP server for dependency intelligence and security auditing. Provides workspace tools for reading, editing, and searching files. Pass your Python project as --source and use the agent entrypoints (assist, review, write-tests, build, upgrade) to work with your code.
source() 🔗
Python project source directory
Return Type
Directory ! Example
dagger -m github.com/telchak/daggerverse/monty@010621c997378db92da5969584001be575c5e5a7 call \
--python-version string --self-improve string sourcefunc (m *MyModule) Example(pythonVersion string, selfImprove string) *dagger.Directory {
return dag.
Monty(pythonVersion, selfImprove).
Source()
}@function
def example(python_version: str, self_improve: str) -> dagger.Directory:
return (
dag.monty(python_version, self_improve)
.source()
)@func()
example(pythonVersion: string, selfImprove: string): Directory {
return dag
.monty(pythonVersion, selfImprove)
.source()
}pythonVersion() 🔗
Python version for the MCP server containers
Return Type
String ! Example
dagger -m github.com/telchak/daggerverse/monty@010621c997378db92da5969584001be575c5e5a7 call \
--python-version string --self-improve string python-versionfunc (m *MyModule) Example(ctx context.Context, pythonVersion string, selfImprove string) string {
return dag.
Monty(pythonVersion, selfImprove).
PythonVersion(ctx)
}@function
async def example(python_version: str, self_improve: str) -> str:
return await (
dag.monty(python_version, self_improve)
.python_version()
)@func()
async example(pythonVersion: string, selfImprove: string): Promise<string> {
return dag
.monty(pythonVersion, selfImprove)
.pythonVersion()
}selfImprove() 🔗
Self-improvement mode: ‘off’ (default), ‘write’ (update context file), ‘commit’ (update + git commit)
Return Type
String ! Example
dagger -m github.com/telchak/daggerverse/monty@010621c997378db92da5969584001be575c5e5a7 call \
--python-version string --self-improve string self-improvefunc (m *MyModule) Example(ctx context.Context, pythonVersion string, selfImprove string) string {
return dag.
Monty(pythonVersion, selfImprove).
SelfImprove(ctx)
}@function
async def example(python_version: str, self_improve: str) -> str:
return await (
dag.monty(python_version, self_improve)
.self_improve()
)@func()
async example(pythonVersion: string, selfImprove: string): Promise<string> {
return dag
.monty(pythonVersion, selfImprove)
.selfImprove()
}githubToken() 🔗
Return Type
Secret Example
dagger -m github.com/telchak/daggerverse/monty@010621c997378db92da5969584001be575c5e5a7 call \
--python-version string --self-improve string github-tokenfunc (m *MyModule) Example(pythonVersion string, selfImprove string) *dagger.Secret {
return dag.
Monty(pythonVersion, selfImprove).
GithubToken()
}@function
def example(python_version: str, self_improve: str) -> dagger.Secret:
return (
dag.monty(python_version, self_improve)
.github_token()
)@func()
example(pythonVersion: string, selfImprove: string): Secret {
return dag
.monty(pythonVersion, selfImprove)
.githubToken()
}prRepo() 🔗
Return Type
String ! Example
dagger -m github.com/telchak/daggerverse/monty@010621c997378db92da5969584001be575c5e5a7 call \
--python-version string --self-improve string pr-repofunc (m *MyModule) Example(ctx context.Context, pythonVersion string, selfImprove string) string {
return dag.
Monty(pythonVersion, selfImprove).
PrRepo(ctx)
}@function
async def example(python_version: str, self_improve: str) -> str:
return await (
dag.monty(python_version, self_improve)
.pr_repo()
)@func()
async example(pythonVersion: string, selfImprove: string): Promise<string> {
return dag
.monty(pythonVersion, selfImprove)
.prRepo()
}prNumber() 🔗
Return Type
Integer ! Example
dagger -m github.com/telchak/daggerverse/monty@010621c997378db92da5969584001be575c5e5a7 call \
--python-version string --self-improve string pr-numberfunc (m *MyModule) Example(ctx context.Context, pythonVersion string, selfImprove string) int {
return dag.
Monty(pythonVersion, selfImprove).
PrNumber(ctx)
}@function
async def example(python_version: str, self_improve: str) -> int:
return await (
dag.monty(python_version, self_improve)
.pr_number()
)@func()
async example(pythonVersion: string, selfImprove: string): Promise<number> {
return dag
.monty(pythonVersion, selfImprove)
.prNumber()
}prCommitSha() 🔗
Return Type
String ! Example
dagger -m github.com/telchak/daggerverse/monty@010621c997378db92da5969584001be575c5e5a7 call \
--python-version string --self-improve string pr-commit-shafunc (m *MyModule) Example(ctx context.Context, pythonVersion string, selfImprove string) string {
return dag.
Monty(pythonVersion, selfImprove).
PrCommitSha(ctx)
}@function
async def example(python_version: str, self_improve: str) -> str:
return await (
dag.monty(python_version, self_improve)
.pr_commit_sha()
)@func()
async example(pythonVersion: string, selfImprove: string): Promise<string> {
return dag
.monty(pythonVersion, selfImprove)
.prCommitSha()
}assist() 🔗
General Python coding assistant.
Reads code, answers questions, implements features, refactors, and uses Python MCP tools for linting, formatting, and package info. Returns the modified workspace directory.
Return Type
Directory !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| assignment | String ! | - | What you want the agent to do (e.g. 'Add a FastAPI endpoint with Pydantic validation') |
| source | Directory | null | Override source directory (uses constructor source if omitted) |
Example
dagger -m github.com/telchak/daggerverse/monty@010621c997378db92da5969584001be575c5e5a7 call \
--python-version string --self-improve string assist --assignment stringfunc (m *MyModule) Example(pythonVersion string, selfImprove string, assignment string) *dagger.Directory {
return dag.
Monty(pythonVersion, selfImprove).
Assist(assignment)
}@function
def example(python_version: str, self_improve: str, assignment: str) -> dagger.Directory:
return (
dag.monty(python_version, self_improve)
.assist(assignment)
)@func()
example(pythonVersion: string, selfImprove: string, assignment: string): Directory {
return dag
.monty(pythonVersion, selfImprove)
.assist(assignment)
}build() 🔗
Build, lint, or type-check a Python project.
Diagnoses build errors and suggests fixes using Python MCP tools. Returns the workspace directory with any fixes applied.
Return Type
Directory !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory | null | Source directory (uses constructor source if omitted) |
| command | String ! | "" | Build command to run (e.g. 'pip install -e .[dev]', 'python -m build') |
Example
dagger -m github.com/telchak/daggerverse/monty@010621c997378db92da5969584001be575c5e5a7 call \
--python-version string --self-improve string build --command stringfunc (m *MyModule) Example(pythonVersion string, selfImprove string, command string) *dagger.Directory {
return dag.
Monty(pythonVersion, selfImprove).
Build(command)
}@function
def example(python_version: str, self_improve: str, command: str) -> dagger.Directory:
return (
dag.monty(python_version, self_improve)
.build(command)
)@func()
example(pythonVersion: string, selfImprove: string, command: string): Directory {
return dag
.monty(pythonVersion, selfImprove)
.build(command)
}developGithubIssue() 🔗
Read a GitHub issue, route it to the best agent, and create a Pull Request.
A router LLM reads the issue and selects the optimal function — assist, upgrade, build, or write-tests — then calls it with extracted parameters. Comments on the issue with a summary and a link to the PR. Returns the PR URL.
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| githubToken | Secret ! | - | GitHub token with repo and pull-request permissions |
| issueId | Integer ! | - | GitHub issue number |
| repository | String ! | - | GitHub repository URL (e.g. 'https://github.com/owner/repo') |
| source | Directory | null | Override source directory (uses constructor source if omitted) |
| base | String ! | "main" | Base branch for the pull request |
| suggestGithubFixOnFailure | Boolean ! | false | Post a diagnostic comment on the issue if the agent fails |
Example
dagger -m github.com/telchak/daggerverse/monty@010621c997378db92da5969584001be575c5e5a7 call \
--python-version string --self-improve string develop-github-issue --github-token env:MYSECRET --issue-id integer --repository string --base string --suggest-github-fix-on-failure booleanfunc (m *MyModule) Example(ctx context.Context, pythonVersion string, selfImprove string, githubToken *dagger.Secret, issueId int, repository string, base string, suggestGithubFixOnFailure bool) string {
return dag.
Monty(pythonVersion, selfImprove).
DevelopGithubIssue(ctx, githubToken, issueId, repository, base, suggestGithubFixOnFailure)
}@function
async def example(python_version: str, self_improve: str, github_token: dagger.Secret, issue_id: int, repository: str, base: str, suggest_github_fix_on_failure: bool) -> str:
return await (
dag.monty(python_version, self_improve)
.develop_github_issue(github_token, issue_id, repository, base, suggest_github_fix_on_failure)
)@func()
async example(pythonVersion: string, selfImprove: string, githubToken: Secret, issueId: number, repository: string, base: string, suggestGithubFixOnFailure: boolean): Promise<string> {
return dag
.monty(pythonVersion, selfImprove)
.developGithubIssue(githubToken, issueId, repository, base, suggestGithubFixOnFailure)
}editFile() 🔗
Edit a file by replacing a string. The old_string must match exactly.
Returns a changeset showing the diff.
Return Type
Changeset !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| filePath | String ! | - | Path to the file relative to the workspace root |
| oldString | String ! | - | The exact string to find and replace |
| newString | String ! | - | The replacement string |
| replaceAll | Boolean ! | false | Replace all occurrences (default: first only) |
Example
dagger -m github.com/telchak/daggerverse/monty@010621c997378db92da5969584001be575c5e5a7 call \
--python-version string --self-improve string edit-file --file-path string --old-string string --new-string string --replace-all booleanfunc (m *MyModule) Example(pythonVersion string, selfImprove string, filePath string, oldString string, newString string, replaceAll bool) *dagger.Changeset {
return dag.
Monty(pythonVersion, selfImprove).
EditFile(filePath, oldString, newString, replaceAll)
}@function
def example(python_version: str, self_improve: str, file_path: str, old_string: str, new_string: str, replace_all: bool) -> dagger.Changeset:
return (
dag.monty(python_version, self_improve)
.edit_file(file_path, old_string, new_string, replace_all)
)@func()
example(pythonVersion: string, selfImprove: string, filePath: string, oldString: string, newString: string, replaceAll: boolean): Changeset {
return dag
.monty(pythonVersion, selfImprove)
.editFile(filePath, oldString, newString, replaceAll)
}glob() 🔗
Find files in the workspace matching a glob pattern.
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| pattern | String ! | - | Glob pattern (e.g. 'src/**/*.py', '**/*.toml') |
Example
dagger -m github.com/telchak/daggerverse/monty@010621c997378db92da5969584001be575c5e5a7 call \
--python-version string --self-improve string glob --pattern stringfunc (m *MyModule) Example(ctx context.Context, pythonVersion string, selfImprove string, pattern string) string {
return dag.
Monty(pythonVersion, selfImprove).
Glob(ctx, pattern)
}@function
async def example(python_version: str, self_improve: str, pattern: str) -> str:
return await (
dag.monty(python_version, self_improve)
.glob(pattern)
)@func()
async example(pythonVersion: string, selfImprove: string, pattern: string): Promise<string> {
return dag
.monty(pythonVersion, selfImprove)
.glob(pattern)
}grep() 🔗
Search file contents in the workspace using grep.
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| pattern | String ! | - | Search pattern (regex supported) |
| paths | String ! | "" | Comma-separated paths to search in (optional) |
| fileGlob | String ! | "" | Glob pattern to filter files (e.g. '*.py') |
| insensitive | Boolean ! | false | Case-insensitive search |
| limit | Integer ! | 100 | Maximum number of matching lines to return |
Example
dagger -m github.com/telchak/daggerverse/monty@010621c997378db92da5969584001be575c5e5a7 call \
--python-version string --self-improve string grep --pattern string --paths string --file-glob string --insensitive boolean --limit integerfunc (m *MyModule) Example(ctx context.Context, pythonVersion string, selfImprove string, pattern string, paths string, fileGlob string, insensitive bool, limit int) string {
return dag.
Monty(pythonVersion, selfImprove).
Grep(ctx, pattern, paths, fileGlob, insensitive, limit)
}@function
async def example(python_version: str, self_improve: str, pattern: str, paths: str, file_glob: str, insensitive: bool, limit: int) -> str:
return await (
dag.monty(python_version, self_improve)
.grep(pattern, paths, file_glob, insensitive, limit)
)@func()
async example(pythonVersion: string, selfImprove: string, pattern: string, paths: string, fileGlob: string, insensitive: boolean, limit: number): Promise<string> {
return dag
.monty(pythonVersion, selfImprove)
.grep(pattern, paths, fileGlob, insensitive, limit)
}pythonBuild() 🔗
Build a Python project.
Returns the source directory with dist/.
Return Type
Directory !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory ! | - | Python project source directory |
| command | String ! | "" | Custom build command (auto-detects if empty) |
Example
dagger -m github.com/telchak/daggerverse/monty@010621c997378db92da5969584001be575c5e5a7 call \
--python-version string --self-improve string python-build --source DIR_PATH --command stringfunc (m *MyModule) Example(pythonVersion string, selfImprove string, source *dagger.Directory, command string) *dagger.Directory {
return dag.
Monty(pythonVersion, selfImprove).
PythonBuild(source, command)
}@function
def example(python_version: str, self_improve: str, source: dagger.Directory, command: str) -> dagger.Directory:
return (
dag.monty(python_version, self_improve)
.python_build(source, command)
)@func()
example(pythonVersion: string, selfImprove: string, source: Directory, command: string): Directory {
return dag
.monty(pythonVersion, selfImprove)
.pythonBuild(source, command)
}pythonInstall() 🔗
Install Python project dependencies.
Returns the source directory with dependencies installed.
Return Type
Directory !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory ! | - | Python project source directory |
Example
dagger -m github.com/telchak/daggerverse/monty@010621c997378db92da5969584001be575c5e5a7 call \
--python-version string --self-improve string python-install --source DIR_PATHfunc (m *MyModule) Example(pythonVersion string, selfImprove string, source *dagger.Directory) *dagger.Directory {
return dag.
Monty(pythonVersion, selfImprove).
PythonInstall(source)
}@function
def example(python_version: str, self_improve: str, source: dagger.Directory) -> dagger.Directory:
return (
dag.monty(python_version, self_improve)
.python_install(source)
)@func()
example(pythonVersion: string, selfImprove: string, source: Directory): Directory {
return dag
.monty(pythonVersion, selfImprove)
.pythonInstall(source)
}pythonLint() 🔗
Lint a Python project.
Returns the lint output.
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory ! | - | Python project source directory |
| tool | String ! | "ruff" | Lint tool: 'ruff', 'flake8', 'pylint' |
| fix | Boolean ! | false | Automatically fix lint errors (ruff only) |
Example
dagger -m github.com/telchak/daggerverse/monty@010621c997378db92da5969584001be575c5e5a7 call \
--python-version string --self-improve string python-lint --source DIR_PATH --tool string --fix booleanfunc (m *MyModule) Example(ctx context.Context, pythonVersion string, selfImprove string, source *dagger.Directory, tool string, fix bool) string {
return dag.
Monty(pythonVersion, selfImprove).
PythonLint(ctx, source, tool, fix)
}@function
async def example(python_version: str, self_improve: str, source: dagger.Directory, tool: str, fix: bool) -> str:
return await (
dag.monty(python_version, self_improve)
.python_lint(source, tool, fix)
)@func()
async example(pythonVersion: string, selfImprove: string, source: Directory, tool: string, fix: boolean): Promise<string> {
return dag
.monty(pythonVersion, selfImprove)
.pythonLint(source, tool, fix)
}pythonTest() 🔗
Run tests for a Python project.
Returns the test output.
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory ! | - | Python project source directory |
| command | String ! | "" | Custom test command (auto-detects if empty) |
Example
dagger -m github.com/telchak/daggerverse/monty@010621c997378db92da5969584001be575c5e5a7 call \
--python-version string --self-improve string python-test --source DIR_PATH --command stringfunc (m *MyModule) Example(ctx context.Context, pythonVersion string, selfImprove string, source *dagger.Directory, command string) string {
return dag.
Monty(pythonVersion, selfImprove).
PythonTest(ctx, source, command)
}@function
async def example(python_version: str, self_improve: str, source: dagger.Directory, command: str) -> str:
return await (
dag.monty(python_version, self_improve)
.python_test(source, command)
)@func()
async example(pythonVersion: string, selfImprove: string, source: Directory, command: string): Promise<string> {
return dag
.monty(pythonVersion, selfImprove)
.pythonTest(source, command)
}pythonTypecheck() 🔗
Type-check a Python project.
Returns the type checker output.
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory ! | - | Python project source directory |
| tool | String ! | "mypy" | Type checker: 'mypy', 'pyright' |
Example
dagger -m github.com/telchak/daggerverse/monty@010621c997378db92da5969584001be575c5e5a7 call \
--python-version string --self-improve string python-typecheck --source DIR_PATH --tool stringfunc (m *MyModule) Example(ctx context.Context, pythonVersion string, selfImprove string, source *dagger.Directory, tool string) string {
return dag.
Monty(pythonVersion, selfImprove).
PythonTypecheck(ctx, source, tool)
}@function
async def example(python_version: str, self_improve: str, source: dagger.Directory, tool: str) -> str:
return await (
dag.monty(python_version, self_improve)
.python_typecheck(source, tool)
)@func()
async example(pythonVersion: string, selfImprove: string, source: Directory, tool: string): Promise<string> {
return dag
.monty(pythonVersion, selfImprove)
.pythonTypecheck(source, tool)
}readFile() 🔗
Read a file from the workspace with line numbers.
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| filePath | String ! | - | Path to the file relative to the workspace root |
| offset | Integer ! | 0 | Line number to start reading from (1-based) |
| limit | Integer ! | 0 | Maximum number of lines to read |
Example
dagger -m github.com/telchak/daggerverse/monty@010621c997378db92da5969584001be575c5e5a7 call \
--python-version string --self-improve string read-file --file-path string --offset integer --limit integerfunc (m *MyModule) Example(ctx context.Context, pythonVersion string, selfImprove string, filePath string, offset int, limit int) string {
return dag.
Monty(pythonVersion, selfImprove).
ReadFile(ctx, filePath, offset, limit)
}@function
async def example(python_version: str, self_improve: str, file_path: str, offset: int, limit: int) -> str:
return await (
dag.monty(python_version, self_improve)
.read_file(file_path, offset, limit)
)@func()
async example(pythonVersion: string, selfImprove: string, filePath: string, offset: number, limit: number): Promise<string> {
return dag
.monty(pythonVersion, selfImprove)
.readFile(filePath, offset, limit)
}review() 🔗
Review Python code for best practices, performance, security, and type safety.
Provides structured feedback with issues, suggestions, and a summary. Returns the review as text (no files modified).
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory | null | Source directory to review (uses constructor source if omitted) |
| diff | String ! | "" | Git diff or PR diff to review (optional) |
| focus | String ! | "" | Specific area to focus the review on (optional) |
Example
dagger -m github.com/telchak/daggerverse/monty@010621c997378db92da5969584001be575c5e5a7 call \
--python-version string --self-improve string review --diff string --focus stringfunc (m *MyModule) Example(ctx context.Context, pythonVersion string, selfImprove string, diff string, focus string) string {
return dag.
Monty(pythonVersion, selfImprove).
Review(ctxdiff, focus)
}@function
async def example(python_version: str, self_improve: str, diff: str, focus: str) -> str:
return await (
dag.monty(python_version, self_improve)
.review(diff, focus)
)@func()
async example(pythonVersion: string, selfImprove: string, diff: string, focus: string): Promise<string> {
return dag
.monty(pythonVersion, selfImprove)
.review(diff, focus)
}suggestGithubFix() 🔗
Analyze a CI failure and post inline code suggestions on a GitHub PR.
Reads the error output, explores source files, and posts GitHub “suggested changes” that developers can apply with one click.
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| githubToken | Secret ! | - | GitHub token with repo permissions |
| prNumber | Integer ! | - | Pull request number |
| repo | String ! | - | GitHub repository URL (e.g. 'https://github.com/owner/repo') |
| commitSha | String ! | - | HEAD commit SHA of the PR branch |
| errorOutput | String ! | - | CI error output (stderr/stdout) |
| source | Directory | null | Source directory of the PR branch |
Example
dagger -m github.com/telchak/daggerverse/monty@010621c997378db92da5969584001be575c5e5a7 call \
--python-version string --self-improve string suggest-github-fix --github-token env:MYSECRET --pr-number integer --repo string --commit-sha string --error-output stringfunc (m *MyModule) Example(ctx context.Context, pythonVersion string, selfImprove string, githubToken *dagger.Secret, prNumber int, repo string, commitSha string, errorOutput string) string {
return dag.
Monty(pythonVersion, selfImprove).
SuggestGithubFix(ctx, githubToken, prNumber, repo, commitSha, errorOutput)
}@function
async def example(python_version: str, self_improve: str, github_token: dagger.Secret, pr_number: int, repo: str, commit_sha: str, error_output: str) -> str:
return await (
dag.monty(python_version, self_improve)
.suggest_github_fix(github_token, pr_number, repo, commit_sha, error_output)
)@func()
async example(pythonVersion: string, selfImprove: string, githubToken: Secret, prNumber: number, repo: string, commitSha: string, errorOutput: string): Promise<string> {
return dag
.monty(pythonVersion, selfImprove)
.suggestGithubFix(githubToken, prNumber, repo, commitSha, errorOutput)
}suggestGithubPrCodeComment() 🔗
Post an inline code suggestion on a GitHub pull request.
The suggestion will appear as a GitHub “suggested change” that developers can apply with one click.
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| path | String ! | - | File path relative to repo root |
| line | Integer ! | - | Line number to suggest a change on |
| suggestion | String ! | - | Replacement code (no ```suggestion fences, just the raw code) |
| comment | String ! | "" | Explanation of the fix |
Example
dagger -m github.com/telchak/daggerverse/monty@010621c997378db92da5969584001be575c5e5a7 call \
--python-version string --self-improve string suggest-github-pr-code-comment --path string --line integer --suggestion string --comment stringfunc (m *MyModule) Example(ctx context.Context, pythonVersion string, selfImprove string, path string, line int, suggestion string, comment string) string {
return dag.
Monty(pythonVersion, selfImprove).
SuggestGithubPrCodeComment(ctx, path, line, suggestion, comment)
}@function
async def example(python_version: str, self_improve: str, path: str, line: int, suggestion: str, comment: str) -> str:
return await (
dag.monty(python_version, self_improve)
.suggest_github_pr_code_comment(path, line, suggestion, comment)
)@func()
async example(pythonVersion: string, selfImprove: string, path: string, line: number, suggestion: string, comment: string): Promise<string> {
return dag
.monty(pythonVersion, selfImprove)
.suggestGithubPrCodeComment(path, line, suggestion, comment)
}task() 🔗
Launch a sub-agent for research or focused work.
The sub-agent has read-only access to the workspace and Python MCP tools. Use this for research, analysis, or exploring documentation.
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| description | String ! | - | Short description of the sub-task |
| prompt | String ! | - | Detailed prompt for the sub-agent |
Example
dagger -m github.com/telchak/daggerverse/monty@010621c997378db92da5969584001be575c5e5a7 call \
--python-version string --self-improve string task --description string --prompt stringfunc (m *MyModule) Example(ctx context.Context, pythonVersion string, selfImprove string, description string, prompt string) string {
return dag.
Monty(pythonVersion, selfImprove).
Task(ctx, description, prompt)
}@function
async def example(python_version: str, self_improve: str, description: str, prompt: str) -> str:
return await (
dag.monty(python_version, self_improve)
.task(description, prompt)
)@func()
async example(pythonVersion: string, selfImprove: string, description: string, prompt: string): Promise<string> {
return dag
.monty(pythonVersion, selfImprove)
.task(description, prompt)
}upgrade() 🔗
Upgrade Python dependencies to a target version.
Detects the current version, researches breaking changes and migration steps between versions, analyzes the codebase for impacted code, and applies the necessary modifications. Returns the workspace directory with upgrade changes applied.
Return Type
Directory !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| targetPackage | String ! | - | Package to upgrade (e.g. 'django', 'fastapi', 'all') |
| targetVersion | String ! | "latest" | Target version (e.g. '5.0', '0.115.0', 'latest') |
| source | Directory | null | Source directory (uses constructor source if omitted) |
| dryRun | Boolean ! | false | Analyze and report changes without modifying files |
Example
dagger -m github.com/telchak/daggerverse/monty@010621c997378db92da5969584001be575c5e5a7 call \
--python-version string --self-improve string upgrade --target-package string --target-version string --dry-run booleanfunc (m *MyModule) Example(pythonVersion string, selfImprove string, targetPackage string, targetVersion string, dryRun bool) *dagger.Directory {
return dag.
Monty(pythonVersion, selfImprove).
Upgrade(targetPackage, targetVersion, dryRun)
}@function
def example(python_version: str, self_improve: str, target_package: str, target_version: str, dry_run: bool) -> dagger.Directory:
return (
dag.monty(python_version, self_improve)
.upgrade(target_package, target_version, dry_run)
)@func()
example(pythonVersion: string, selfImprove: string, targetPackage: string, targetVersion: string, dryRun: boolean): Directory {
return dag
.monty(pythonVersion, selfImprove)
.upgrade(targetPackage, targetVersion, dryRun)
}writeFile() 🔗
Create or overwrite a file in the workspace.
Returns a changeset showing the diff.
Return Type
Changeset !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| filePath | String ! | - | Path to the file relative to the workspace root |
| contents | String ! | - | The full file contents to write |
Example
dagger -m github.com/telchak/daggerverse/monty@010621c997378db92da5969584001be575c5e5a7 call \
--python-version string --self-improve string write-file --file-path string --contents stringfunc (m *MyModule) Example(pythonVersion string, selfImprove string, filePath string, contents string) *dagger.Changeset {
return dag.
Monty(pythonVersion, selfImprove).
WriteFile(filePath, contents)
}@function
def example(python_version: str, self_improve: str, file_path: str, contents: str) -> dagger.Changeset:
return (
dag.monty(python_version, self_improve)
.write_file(file_path, contents)
)@func()
example(pythonVersion: string, selfImprove: string, filePath: string, contents: string): Changeset {
return dag
.monty(pythonVersion, selfImprove)
.writeFile(filePath, contents)
}writeTests() 🔗
Generate unit, integration, or e2e tests for Python modules and packages.
Follows Python testing patterns and uses the project’s existing test setup. Returns the workspace directory with generated test files.
Return Type
Directory !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory | null | Source directory (uses constructor source if omitted) |
| target | String ! | "" | Specific file or module to write tests for (optional) |
| testFramework | String ! | "" | Test framework preference: 'pytest', 'unittest' (optional) |
Example
dagger -m github.com/telchak/daggerverse/monty@010621c997378db92da5969584001be575c5e5a7 call \
--python-version string --self-improve string write-tests --target string --test-framework stringfunc (m *MyModule) Example(pythonVersion string, selfImprove string, target string, testFramework string) *dagger.Directory {
return dag.
Monty(pythonVersion, selfImprove).
WriteTests(target, testFramework)
}@function
def example(python_version: str, self_improve: str, target: str, test_framework: str) -> dagger.Directory:
return (
dag.monty(python_version, self_improve)
.write_tests(target, test_framework)
)@func()
example(pythonVersion: string, selfImprove: string, target: string, testFramework: string): Directory {
return dag
.monty(pythonVersion, selfImprove)
.writeTests(target, testFramework)
}