Skip to content

Commit a78013a

Browse files
[agents] Add server tools (#279)
* add server tools * notebook
1 parent 44c2b5c commit a78013a

File tree

5 files changed

+398
-192
lines changed

5 files changed

+398
-192
lines changed

agents/agent.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,10 @@ async def _agent_loop(self, user_input: str) -> list[dict[str, Any]]:
9999
self.history.truncate()
100100
params = self._prepare_message_params()
101101

102-
response = self.client.messages.create(**params)
102+
response = self.client.messages.create(
103+
**params,
104+
extra_headers={"anthropic-beta": "code-execution-2025-05-22"}
105+
)
103106
tool_calls = [
104107
block for block in response.content if block.type == "tool_use"
105108
]

0 commit comments

Comments
 (0)