Skip to main content

dgc-sdk

Run the DGC coding agent inside your own Python application or CI job. Version 0.8.0, editor protocol v14, pairs with DGC CLI 0.50.0. Python 3.10+, proven on Linux.

python3 -m pip install dgc-sdk==0.8.0

This installs import dgc_sdk. It is not the unrelated PyPI project dgc.

The SDK drives a dgc serve process from a DGC CLI install, which it finds on its own (dgc on PATH, ~/.local/bin/dgc, or the installer's versions directory). Install the CLI:

curl -fsSL https://vibedgc.com/install.sh | bash

To pin a different install, set DGC_PYTHON to its Python, for example export DGC_PYTHON="$(dirname "$(readlink -f "$(command -v dgc)")")/python".

Point DGC_MODEL and DGC_BASE_URL at an OpenAI-compatible endpoint (for example a local Ollama at http://127.0.0.1:11434/v1), then run this from the repository you want summarized:

import os
import tempfile

from dgc_sdk import DGC

with DGC(
    state_dir=tempfile.mkdtemp(prefix="dgc-sdk-"),
    model=os.environ["DGC_MODEL"],          # for example "qwen3:8b"
    base_url=os.environ["DGC_BASE_URL"],    # for example "http://127.0.0.1:11434/v1"
    api_key=os.environ.get("DGC_API_KEY"),  # only when the endpoint needs a key
) as dgc:
    session = dgc.session(cwd=".", permissions={"mode": "plan", "unhandled": "deny"})
    result = session.run("Summarize this repository in two sentences. Do not edit files.")
    print(result.status, result.final_text)
    if result.error:
        print("error:", result.error)

It prints completed and the summary. Each DGC client keeps its conversations, checkpoints and logs in state_dir, an isolated HOME; your own ~/.dgc is not touched, and an SDK-created temporary state_dir is removed on close().

For untrusted input (a pull request, a cloned repo) the workspace cannot grant the session capabilities: its own .dgc/permissions.json allow rules and .dgc/agents are ignored unless you pass trust_workspace=True. Add a RuntimePolicy to sandbox the shell and confine the file tools, and see the security model in docs/SDK.md.

Licensed under Apache-2.0.

Metadata

Release files for dgc-sdk 0.8.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dgc-sdk 0.8.0
File Size Uploaded Provenance Actions
dgc_sdk-0.8.0.tar.gz 178.5 kB With provenance Details for dgc_sdk-0.8.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dgc-sdk 0.8.0
File Interpreter ABI Platform Actions
dgc_sdk-0.8.0-py3-none-any.whl Python 3 none any Details for dgc_sdk-0.8.0-py3-none-any.whl

Total release size: 366.9 kB

Release files / dgc_sdk-0.8.0.tar.gz

Download URL dgc_sdk-0.8.0.tar.gz
Size 178.5 kB
Tags Source
SHA-256 checksum
How to use checksums
f74e5e9651a75a18d2e84de827707b6c301d1fc1e34e64dc2c0ef8b27aff7ac7
BLAKE2b-256 checksum
How to use checksums
fc61c9f3a15b18e67d3e11e1e7b7cc407e41cde60cba55004d27983fff813ccb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.

Transparency log

Release files / dgc_sdk-0.8.0-py3-none-any.whl

Download URL dgc_sdk-0.8.0-py3-none-any.whl
Size 188.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
efc468deb39d4fd94d1faf39285e4ad72c9626cdd8e5ae790301ddcfebb52e20
BLAKE2b-256 checksum
How to use checksums
c0845556850ace35468065aae802ac14761d1fabf71dafa4147f0e833fcaba89
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.

Transparency log

Security for dgc-sdk 0.8.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for dgc_sdk-0.8.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page