Sessions that pick up where you left off
Create, run, resume, and close a session with explicit ownership, workspace boundaries, and predictable process cleanup.
sessions · history · lifecycleSDK · 0.5.2 frozen
Bring the agent loop into what you build. A Python SDK for applications that work with people, and automations that work while you’re away. TypeScript is in the same repository.
Python wheel on GitHub · TypeScript in-tree · protocol v14 · CLI 0.41.5
Get started / SDK + agents
Choose Python or TypeScript for your integration. Give your coding agent the documentation to help you build it.
Install the current DGC CLIpython3 -m pip install "https://github.com/OpenPeach-ai/dgc/releases/download/sdk-v0.5.2/dgc_sdk-0.5.2-py3-none-any.whl"# from a clone of OpenPeach-ai/dgc
# Node 22+: import sdk/typescript (not on npm yet)That URL installs our dgc-sdk wheel (import dgc_sdk). Do not run pip install dgc — on PyPI that name is a different, unrelated project. The wheel still needs a DGC runtime (python -m dgc serve, CLI 0.41.5). Set inherit_user_state=False in production.
Python in your environment. TypeScript in your Node project.
Use the verified DGC version supported by the SDK release.
Set your workspace, model, and permission policy.
curl -fsSL https://docs.vibedgc.com/llms.txtRead https://docs.vibedgc.com/sdk and https://docs.vibedgc.com/llms.txt. Help me embed DGC SDK 0.5.2 in this project. Use the GitHub wheel for Python; do not pip install dgc. Set inherit_user_state=False and pair with CLI 0.41.5 / protocol v14.
The current index covers the CLI, editor, and integrations. Versioned SDK reference pages and an optional documentation MCP server are proposed next.
DGC connects to MCP servers to use their tools, resources, and prompts.
Your coding agent searches DGC reference material, then writes integration code. A docs connector does not run DGC tasks.
A separate adapter could let another agent delegate a bounded task to DGC, with permissions, progress, and cancellation.
01 / The developer experience
Choose a use case. Follow an agent turn from intent to result, with task progress and the permission decision in view.
Stream progress into your interface. Let a person decide when the agent can change a file.
// Proposed API · package not yet published
import { DGC } from "@vibedgc/sdk";
const dgc = new DGC({ binary: "dgc" });
try {
const session = await dgc.session({
cwd: "./checkout-app",
model: "your-configured-model",
permissions: { mode: "default" },
onPermission: request => askPerson(request),
});
const run = session.stream(
"Fix the empty-cart checkout error"
);
// run.cancel() stops this run.
for await (const event of run) render(event);
const result = await run.result();
showResult(result);
} finally {
await dgc.close();
}
// askPerson / render / showResult are your app code.The agent wants to update src/checkout.ts inside the selected workspace.
Scripted illustration. No model calls or file changes.
02 / Integration recipes
Start with your workspace. Add progress, decisions, or a job. Explore the code in either language, then select a note to see what each piece does.
import { DGC } from "@vibedgc/sdk";
const dgc = new DGC({ binary: "dgc" });
try {
const session = await dgc.session({
cwd: "./checkout-app",
model: "your-configured-model",
permissions: { mode: "default", unhandled: "deny" },
});
const result = await session.run(
"Explain the checkout flow. Do not edit files."
);
console.log(result.finalText);
} finally {
await dgc.close();
}The working directory scopes the session to your project. Permission rules still govern tool access; the prompt is not a security boundary.
session → ./checkout-app result → checkout flow explained runtime → closed by the application
SDK 0.5.2. Python snippets belong inside an async function when using AsyncDGC. The workbench output is scripted.
03 / The shape of the system
The SDK should expose the harness DGC already uses. A managed local process connects your code to sessions, tools, and your configured model.
Application server
CI or background worker
Python / TypeScript
Sessions, events, results
Context, tools, permissions
Your configured model
A browser UI talks to your application server. The DGC process and provider credentials stay on the server or your machine.
04 / What belongs in v1
Applications and automation get equal priority, built on the same session lifecycle and event model.
How we get thereCreate, run, resume, and close a session with explicit ownership, workspace boundaries, and predictable process cleanup.
sessions · history · lifecycleTyped messages, tool activity, task updates, approvals, usage, and a final result. Task IDs keep completed work checked off.
events · progress · resultsAsk a person inside an app. Apply an explicit policy in a job. Missing decisions fail closed, with cancellation and time limits.
approvals · policy · cancellationValidated structured results, typed errors, exit outcomes, and usage records make an agent run easier to integrate and test.
schemas · errors · observability05 / Build direction
The current source includes a Python subprocess client and a versioned headless protocol. The SDK work turns that foundation into a supported developer experience.
Agent loop, workspace rules, sessions, structured events, and a managed Python client.
Streaming and async lifecycles, approvals, cancellation, structured output, and app + CI examples.
Compatibility tests, OS coverage, API documentation, runnable examples, and signed package releases.
This is a product and API design preview. Scope, names, and release timing remain under review.
06 / A few details
Yes. Install the Python wheel from GitHub tag sdk-v0.5.2. TypeScript is in sdk/typescript in that repository (not on npm yet). Do not pip install dgc. You still need a DGC runtime that can run python -m dgc serve (CLI 0.41.5).
Both are first-release priorities. Applications need streaming progress and interactive approvals; CI and background jobs need explicit policy, bounded runs, machine-readable results, and reliable cleanup.
The initial SDK design runs in Node.js or Python, on your server or machine. Your browser interface connects to your backend, which owns the DGC process, workspace, and provider credentials.
The SDK should use DGC’s configured native local and API routes. Subscription routes have different tool and permission ownership; their SDK capability contract needs explicit validation before being promised.
No. The examples are illustrative, and the demo is a local scripted sequence. Package names, methods, event names, and output validation are proposed SDK contracts, not claims about the current headless protocol.
Same harness. More places to build.