feat: Dynamic Agents SDK (base44.dynamicAgents)#205
Closed
yardend-wix wants to merge 12 commits into
Closed
Conversation
Implement tool() identity factory as a public API seam and serializeTools() to map tools to OpenAI function-tool format. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…th impl Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…en thunk type Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…tly (drop fragile data-unwrap) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
🚀 Package Preview Available!Install this PR's preview build with npm: npm i @base44-preview/sdk@0.8.32-pr.205.168e407Prefer not to change any import paths? Install using npm alias so your code still imports npm i "@base44/sdk@npm:@base44-preview/sdk@0.8.32-pr.205.168e407"Or add it to your {
"dependencies": {
"@base44/sdk": "npm:@base44-preview/sdk@0.8.32-pr.205.168e407"
}
}
Preview published to npm registry — try new features instantly! |
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.
Dynamic Agents SDK
Adds a code-first AI surface to the SDK —
base44.dynamicAgents— built on the Base44 AI Gateway.Until now, the only agent in the SDK is the static one (
base44.agents): defined in the dashboard, referenced by name, with Base44 running the loop. This introduces the dynamic agent — defined entirely in code at runtime (model, system prompt, tools) and driven by the SDK. Same idea, split by who defines and drives it, so the two coexist cleanly.The goal is to let builders (and the app-builder agent) add an agent, a tool loop, or a single-shot generation with zero connection setup. The model is a plain string; the gateway URL and auth token are resolved internally from the
base44client, so call sites stay configuration-free.What this adds
base44.dynamicAgents.create(...)— declare a reusable agent (model, system prompt, tools, step limit), then run it.base44.dynamicAgents.run(...)— one-shot shorthand for a single prompt with no tools.tool(...)— define a hand-written tool an agent can call..asTool()— the unifying way to give an agent capabilities. An existing dynamic agent can be handed to another agent as a sub-agent, and a backend function can be exposed as a callable tool. (Exposing entities as tools is a planned follow-up within this same effort.)Under the hood, a dynamic agent runs a tool-calling loop against the gateway's OpenAI-compatible endpoint, respecting the gateway's current constraints, and reports credit usage on the result. The connection is resolved automatically from the client — the configured app in the browser, or per request inside a backend function — so concurrent requests stay isolated from one another.
The existing static agents (
base44.agents) and the legacy single-shotInvokeLLMare intentionally left untouched.Backend
Built on the Base44 AI Gateway: base44-dev/apper#12366
🤖 Generated with Claude Code