Skip to main content

dgc-sdk

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

python3 -m pip install dgc-sdk==0.6.8

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.6.8

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.6.8
File Size Uploaded
dgc_sdk-0.6.8.tar.gz 102.1 kB Details

Built distribution (wheel)

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

Total release size: 211.1 kB

Release files / dgc_sdk-0.6.8.tar.gz

Download URL dgc_sdk-0.6.8.tar.gz
Size 102.1 kB
Tags Source
SHA-256 checksum
How to use checksums
b8ca5b66618c76c3c2d60359b2a3dba5899c800a036e99cf6771fd02ddcfbfd8
BLAKE2b-256 checksum
How to use checksums
62bdc9524c34609d8fe5e6f3b92ca932a33d689d08ca99778a24dcd12e6ab384
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 Sep 23, 2026.

Transparency log

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

Download URL dgc_sdk-0.6.8-py3-none-any.whl
Size 109.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3c2228452ca0c511779efb1c3371ec1b249623730ee46dad30207ef7e9eda726
BLAKE2b-256 checksum
How to use checksums
c3b9ad3bcfb57cf14e1a4a6596636c5199f2f74fafa041854ed8a7634ad7db8f
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 Sep 23, 2026.

Transparency log

Release history Release notifications | RSS feed

0.6.9

2 release files

This release

0.6.8 This release

2 release files

0.6.7

2 release files

0.6.4

2 release files

0.6.3

2 release files

0.5.3

2 release files

0.5.2

2 release files

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