Repository navigation
Conversation
A resumed approval never starts the program again in another session. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014d2JueaFi2TFkyy2qcvqpL
The execute output now carries `tool_calls` (tool, arguments, outcome) for the model, without the call ids that stay in `custom_data` for the audit trail. In a live run with a real model, a program that refunded one order and was then refused the next left the model unable to say which refund had gone through. The lost-run message now points at the listed calls too. @submilli/ai-sdk already shows the calls the same way. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014d2Jufg2VYGnwUi5xQeE1C
A live run showed that continuing a conversation with the pending execute call still in the input makes the Responses API refuse the next run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014d2Jufg2VYGnwUi5xQeE1C
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds a second integration package to the workspace, next to
langchain-submilli. It lets an OpenAI Agents SDK agent run TypeScript programs on submilli-server. Those programs can call the application's own function tools, and the SDK's approvals apply to each call. Linear SUB-2053.What it does
SubmilliTools(blueprint=...)gives the agent the server's sixsubmilli__typescript__*tools asFunctionTools. Their descriptions are the ones the server supplies for the Blueprint. Names, arguments, and the result shape matchlangchain-submilli.Runner.run.SessionStore: in memory by default, orSQLiteSessionStore(or your own) to survive a restart.aclose_conversation(id)closes it.ToolCallOutputItem.custom_data, which the model never sees.ptc=[...]turns existingFunctionTools into the@toolsPackage for programs.needs_approvalall apply.ToolApprovalItemfor the application's tool.RunState.approve/rejectthen resumes it, including fromto_string()/from_stringin another process.ptcthe execute tool is anAgent.as_toolwhose model is the program's run on the server rather than an LLM. NOTES.md explains this; read it before changing_program.py.What to be aware of
FunctionToolfields set throughdataclasses.replace, plusas_tool's_agent_instance. The dependency is therefore pinned toopenai-agents>=0.24.0,<0.25. Both paths are covered by tests.openai-agents-submillibefore theopenai-agents-submilli-v0.1.0tag is pushed.ptcare not shown to the model. A tool also given to the agent directly bypasses the Blueprint, which the README says.Checks
mypy --strict, pyright, andpyright --verifytypesat 100%.Runnerwith a scripted model against a respx fake of the HTTP API.Verify it yourself
uv sync --all-packages cd packages/openai-agents-submilli uv run pytest SUBMILLI_BIN=/dir/with/submilli-server uv run pytest tests/integration_tests uv run pyright --verifytypes openai_agents_submilli --ignoreexternalTo see an approval with a real model, follow the "Use application tools" section of the tutorial in the companion submilli-runtime PR, using a tool with
needs_approval=True.Generated by Claude Code