Blender example on the router sandbox, with renders in chat - #737
Merged
Merged
Conversation
Co-authored-by: Thierry Schellenbach <thierryschellenbach@gmail.com>
Co-authored-by: Thierry Schellenbach <thierryschellenbach@gmail.com>
Co-authored-by: Thierry Schellenbach <thierryschellenbach@gmail.com>
Co-authored-by: Thierry Schellenbach <thierryschellenbach@gmail.com>
Co-authored-by: Thierry Schellenbach <thierryschellenbach@gmail.com>
sandbox_options on agent configs (image, setup, timeout_ms, cpu, memory_gb, disk_gb) builds the Daytona sandbox from an image and lets one run of code take up to 30 minutes. run_code takes files: paths the program wrote that are downloaded, uploaded to the conversation's channel and attached to the reply that settles the work, so they are there when history is reloaded. task_settled lists them. Co-authored-by: Thierry Schellenbach <thierryschellenbach@gmail.com>
Co-authored-by: Thierry Schellenbach <thierryschellenbach@gmail.com>
Co-authored-by: Thierry Schellenbach <thierryschellenbach@gmail.com>
agent.yaml builds Blender into the Daytona sandbox through sandbox_options, a render skill writes the scene, and the PNG comes back as a run_code file that the router attaches to the reply. The example's own MCP server and Daytona code are gone. Co-authored-by: Thierry Schellenbach <thierryschellenbach@gmail.com>
…reload Co-authored-by: Thierry Schellenbach <thierryschellenbach@gmail.com>
…cenes Co-authored-by: Thierry Schellenbach <thierryschellenbach@gmail.com>
Co-authored-by: Thierry Schellenbach <thierryschellenbach@gmail.com>
…gone The 99 operations still generated by oapi-codegen from api/legacy.yaml are registered with Huma in the file that serves each, with their request and response types as Go structs documented by tags. The ten routes served by hand, the sockets, the log stream, the data export and import and the plugin callback, are declared in handwritten.go, so the server-side check reads their marks like any other operation's and unspecifiedRoutes goes. legacy.yaml, oapi-codegen.yaml, generated.go and the oapi-codegen tool are deleted, so there is nothing left to add an operation to but Go. The rendered spec is what the merged one was: the same operations, parameters, bodies, statuses, enums, defaults, formats and words. Huma documents the 400 its validation answers on eight operations that did not list one, and the guest 403 now carries the usual error body. Huma checks a request against its schema before the handler runs, where the generated server only decoded it, so a body breaking the documented schema is refused with Huma's message rather than the handler's. Co-authored-by: Thierry Schellenbach <thierryschellenbach@gmail.com>
Co-authored-by: Thierry Schellenbach <thierryschellenbach@gmail.com>
Co-authored-by: Thierry Schellenbach <thierryschellenbach@gmail.com>
Co-authored-by: Thierry Schellenbach <thierryschellenbach@gmail.com>
Co-authored-by: Thierry Schellenbach <thierryschellenbach@gmail.com>
Co-authored-by: Thierry Schellenbach <thierryschellenbach@gmail.com>
…ed in Go legacy.yaml and the server's generated.go are gone, so SandboxOptions and sandbox_options on AgentConfig and AgentConfigRequest are Huma schemas now, and the task_settled files are in the watch socket's description. The spec and clients are regenerated from Go. Co-authored-by: Thierry Schellenbach <thierryschellenbach@gmail.com>
…mcp-example-9c0c # Conflicts: # acceleration/internal/api/handwritten.go # acceleration/internal/api/schemas.go Co-authored-by: Thierry Schellenbach <thierryschellenbach@gmail.com>
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.
How it works
Why
Thierry's decisions on the first version of this PR:
sandbox: daytona) instead of the example running its own Daytona sandbox behind an MCP server. That means long-running jobs, a custom image or setup with Blender, and returning files as well as text. Then switch the example to it.Changes
sandbox_optionson agent configs (API, sync, patch, store and migration) hasimage,setup,timeout_ms(at most 30 minutes),cpu,memory_gbanddisk_gb. Any of them builds a Daytona image (Base/DebianSlimplus aRUNper setup command), with a 20-minute start timeout for the build. The harness's fixed 60 s code deadline is gone, so a run is bounded by the sandbox timeout and the skill's own deadline.run_code. A newfilesargument lists paths, at most 4 of up to 20 MiB each. Daytona downloads them, and the harness publishes them and tells the subagent what was attached, missing or not shown. A task's result carries the latest file of each name.Conversation.Publishuploads to the channel as the agent (UploadChannelImageorUploadChannelFile). Ontask_settledthe files go onto the reply's Chat attachments (imagewithimage_url, orfilewithasset_url), and history reads them back asfiles. Thetask_settledframe gainsfiles.sandbox_options:inagent.yaml(withtimeout: 5m) andEvent.Files; Python hasSandboxSettingsandRemoteEvent.files. Only the models this needs were regenerated in the Python client, to stay clear of Sentry and Google Calendar plugins, user logins in chat #736's connector regeneration. The SDK skill notes what the other SDKs still need.blender_artistis nowagent.yaml(sandbox_optionsinstalls Blender's libraries andbpy==5.2.2, 5 min runs, 2 CPU / 4 GiB), arenderskill (20 min deadline, a starting program with camera framing,files=["/tmp/render.png"]), and instructions. Its MCP server and Daytona code are deleted.Agent.ask()waits onpending_work, andMCPServerLocalholds its session on one task.DaytonaSuite:TestASetupIsBuiltOnTheImageItNames,TestARunMayTakeAsLongAsTheConfigAllows,TestNoRunMayTakeLongerThanTheCeilingTestFilesTheCodeWroteComeBackWithItsOutput,TestAFileTheCodeDidNotWriteIsReportedMissing,TestOnlySoManyFilesComeBackFromOneRunHarnessSuite:TestFilesTheCodeHandsBackAreAttachedToTheAnswerand four moreTestARenderIsAttachedToTheReplyAndComesBackWithItsHistory(fake Chat),TestARenderReachesStreamChatAndSurvivesAReload(real Stream Chat, downloads the CDN URL)ConfigsSuiteandSyncSuite(integration, Postgres)TestSyncSendsHowTheSandboxIsBuilt,TestASettledTaskCarriesTheFilesItsCodeMade; Pythontest_how_the_sandbox_is_built_is_read_from_a_nested_block,test_work_that_made_a_file_says_where_it_was_putEvidence
sandbox_options, the agent delegated torender, and the subagent'srun_codewent to Daytona with the build request and got401 Invalid credentials. The agent reported it.bpy. This is uncommitted debug code, since removed. The subagent wrote the scene, Blender rendered it, and the router uploadedrender.pngto Stream's CDN, sent it intask_settledand attached it to the reply.GET /v1/agents/conversations/{cid}/messagesreturned it underfiles:The agent
DAYTONA_API_KEYhere).go test ./...passes inacceleration/andsdks/go/. Integration runs of api, conversation, store, session and harness pass, exceptTestPhoneSuite/TestSearchingEveryVendorSaysNoneCanBeAsked, which fails because this environment has real Twilio and Telnyx credentials, and one data-move test that passed on two reruns.dev.py check(withUV_FROZEN=1): ruff and mypy are clean, 1,660 passed. The 44 errors are the Docker-only Redis tests, as onaccelerate.To show artifacts inline, enable in settings.