Skip to content

Conversation

@wall-rl
Copy link

@wall-rl wall-rl commented Nov 21, 2025

No description provided.

@wall-rl wall-rl requested review from jrvb-rl and sid-rl November 21, 2025 00:52
)
return AsyncAgent(self._client, agent_view.id)

def from_id(self, agent_id: str) -> AsyncAgent:
Copy link
Author

Choose a reason for hiding this comment

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

This is probably a missing thing in API but I think we probably want name in here as well?

Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure what is missing in the API?

In any case, a synchronous (and fully client-side) from_id() like this fits with BlueprintOps.from_id() and such, so this seems reasonable to pair with the AsyncAgent.get_info() call.

Copy link
Contributor

@jrvb-rl jrvb-rl left a comment

Choose a reason for hiding this comment

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

This seems fine as a start. Might be good to add some TODOs to decide about local caching.

)
return AsyncAgent(self._client, agent_view.id)

def from_id(self, agent_id: str) -> AsyncAgent:
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure what is missing in the API?

In any case, a synchronous (and fully client-side) from_id() like this fits with BlueprintOps.from_id() and such, so this seems reasonable to pair with the AsyncAgent.get_info() call.

Comment on lines +476 to +478
page = await self._client.agents.list(
**params,
)
Copy link
Contributor

Choose a reason for hiding this comment

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

Question: does the list() call return just the IDs, or the ID + additional info?

Comment on lines +55 to +58
return await self._client.agents.retrieve(
self._id,
**options,
)
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm wondering if we should cache the json response, so subsequent calls can return immediately? Also, if the list() call returns details instead of just IDs, we would want to return the deets we already have here.

One question on all of this, though: are agent objects on the server mutable? If so, then sticking with the "re-fetch every call" strategy may be better for now, since that way we don't need to worry about the local and server versions going out of sync. (Well, the user would need to worry about this in their code, but we would make no promises about it at this level...)

@jrvb-rl jrvb-rl changed the title POC: add agents to the python SDK Add agents to the python SDK Nov 21, 2025
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