Skip to content

Pydantic agent and some important infra#39

Merged
alexb-palisaderesearch merged 14 commits into
mainfrom
pydantic-agent
Sep 18, 2025
Merged

Pydantic agent and some important infra#39
alexb-palisaderesearch merged 14 commits into
mainfrom
pydantic-agent

Conversation

@alexb-palisaderesearch

@alexb-palisaderesearch alexb-palisaderesearch commented Sep 11, 2025

Copy link
Copy Markdown
Contributor
  • Logging
  • Snapshots/restore
  • Settings

Later:

  • Dockers
  • Actual agent stub

cursor[bot]

This comment was marked as outdated.

@ArtemPt239 ArtemPt239 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, except for Settings seemingly not being persistent

Comment thread src/template/agent/env.py
Data here will *not* be a part of a run history.
"""

settings: Settings

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO Settings should be a part of the run history (i.e. logged somewhere for each run).

This way we can restore what happened later

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It also should help with properly restoring the agent from state if the settings can be copied from the parent run

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are a part of it - they do get committed to git from where a "certified" run gets its commit hash.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah. Perhaps you've meant the config file that was used in the run? That'd be actually a great candidate for the run metadata example.

@ArtemPt239 ArtemPt239 Sep 18, 2025

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I meant both!

Comment thread src/template/agent/main.py Outdated
scrubbing=False,
)
logfire.instrument_openai()
# TODO: instrument other stuff like model providers

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I personally don't know what "to instrument" means in this context(

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrapping and/or injecting code to provide observability (that is, instrumentation, like the gauges on a plane).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add the extended description to the comment?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd say we need a proper README for it

Comment thread src/template/agent/main.py Outdated
Comment thread src/template/agent/main.py Outdated
Comment thread src/template/utils/git.py Outdated
Comment thread src/template/utils/git.py
@ArtemPt239

Copy link
Copy Markdown

Also, failing build looks super sus

Comment thread src/scripts/fork_worktree.py Outdated
Comment thread src/scripts/fork_worktree.py Outdated
Comment thread src/scripts/clean_worktrees.py Outdated
Comment thread src/scripts/fork_worktree.py
Comment thread src/scripts/fork_worktree.py Outdated
@alexb-palisaderesearch alexb-palisaderesearch enabled auto-merge (squash) September 18, 2025 11:53
Comment thread src/template/utils/git.py
Comment thread .env.example

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest to cleanup comments if they're not required or add short explanation about available options.

Comment thread config/baseline.yaml

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest to cleanup comments if they're not required or add short explanation why this part exists in commented state.

@ArtemPt239

Copy link
Copy Markdown

@sergey-koldyba , if the comments are not blocking, can you approve merge?

@sergey-koldyba sergey-koldyba left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like it requires some polishing like proper READMEs, switching to gitpython and other minor stuff, but it would be better to have it all in a separate PR as this one is pretty huge already. Other then that, LGTM!

@alexb-palisaderesearch alexb-palisaderesearch merged commit 55e2047 into main Sep 18, 2025
23 checks passed
@alexb-palisaderesearch alexb-palisaderesearch deleted the pydantic-agent branch September 18, 2025 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants