Skip to content

feat: add explicit method registration to worker with type checking a…#54

Open
maffettone wants to merge 6 commits into
bluesky:mainfrom
maffettone:explicit-methods
Open

feat: add explicit method registration to worker with type checking a…#54
maffettone wants to merge 6 commits into
bluesky:mainfrom
maffettone:explicit-methods

Conversation

@maffettone

@maffettone maffettone commented Jun 23, 2025

Copy link
Copy Markdown
Contributor

Description

  • Adds register_method function in server utils. This includes dynamic type checking and inference from signatures.
  • Adds 3 endpoints to app (and RPC handlers, and server_resources) for getting all methods, getting a single method detail, and posting/calling a method.
  • Expands agent_sim to leverage register_method.
  • Fixes server:app to use lifespan instead of deprecated shutdown/startup events.
  • Adds tests for the server

Motivation and Context

Previous hack was using register_variable with lambda functions in setters to provide a POST endpoint. This treats arbitrary agent methods as first class for registering to the server.

Summary of Changes for Release Notes

Fixed

deprecated startup/shutdown events in fastapi

Added

arbitrary method registration for agent objects

Changed

Removed

How Has This Been Tested?

pytest and demo

@maffettone
maffettone requested review from dmgav and tacaswell June 24, 2025 18:55
@maffettone
maffettone marked this pull request as ready for review June 24, 2025 18:55
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.

1 participant