Skip to main content

CodeBuddy Code SDK for Python

Project description

CodeBuddy Agent SDK for Python

SDK for building AI agents with CodeBuddy Code's capabilities. Programmatically interact with AI to build autonomous agents that can understand codebases, edit files, and execute workflows.

Installation

# Using uv (recommended)
uv add codebuddy-agent-sdk

# Using pip
pip install codebuddy-agent-sdk

Quick Start

import asyncio
from codebuddy_agent_sdk import query

async def main():
    async for message in query(
        prompt="What files are in this directory?",
        permission_mode="bypassPermissions",
    ):
        if message.type == "assistant":
            for block in message.content:
                if hasattr(block, "text"):
                    print(block.text)

asyncio.run(main())

API Reference

query(prompt, **options)

Create a query to interact with the agent.

async for message in query(
    prompt="Your prompt here",
    model="sonnet",                    # Model to use
    permission_mode="bypassPermissions",  # Permission mode
    max_turns=10,                      # Maximum conversation turns
    cwd="/path/to/project",            # Working directory
):
    # Handle message
    pass

Message Types

  • system - Session initialization info
  • assistant - Agent responses (text, tool calls)
  • result - Query completion status

Related Links

Feedback

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

codebuddy_agent_sdk-0.3.160-py3-none-win_amd64.whl (51.2 MB view details)

Uploaded Python 3Windows x86-64

codebuddy_agent_sdk-0.3.160-py3-none-musllinux_1_1_x86_64.whl (45.3 MB view details)

Uploaded Python 3musllinux: musl 1.1+ x86-64

codebuddy_agent_sdk-0.3.160-py3-none-musllinux_1_1_aarch64.whl (45.1 MB view details)

Uploaded Python 3musllinux: musl 1.1+ ARM64

codebuddy_agent_sdk-0.3.160-py3-none-manylinux_2_17_x86_64.whl (47.5 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

codebuddy_agent_sdk-0.3.160-py3-none-manylinux_2_17_aarch64.whl (47.0 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

codebuddy_agent_sdk-0.3.160-py3-none-macosx_11_0_arm64.whl (32.1 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

codebuddy_agent_sdk-0.3.160-py3-none-macosx_10_12_x86_64.whl (34.6 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

Details for the file codebuddy_agent_sdk-0.3.160-py3-none-win_amd64.whl.

File metadata

  • Download URL: codebuddy_agent_sdk-0.3.160-py3-none-win_amd64.whl
  • Upload date:
  • Size: 51.2 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.12 {"installer":{"name":"uv","version":"0.11.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for codebuddy_agent_sdk-0.3.160-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 a853b38483b0c41d7e60c5c7f365bec9d420090a5b653bf37fd6e42959cf44fd
MD5 c2937f23b8d5dc639041f5b623b49671
BLAKE2b-256 41bcd6be79de0af43db15d73e916aa55f3b33d0677656668a94c960d41cc3871

See more details on using hashes here.

File details

Details for the file codebuddy_agent_sdk-0.3.160-py3-none-musllinux_1_1_x86_64.whl.

File metadata

  • Download URL: codebuddy_agent_sdk-0.3.160-py3-none-musllinux_1_1_x86_64.whl
  • Upload date:
  • Size: 45.3 MB
  • Tags: Python 3, musllinux: musl 1.1+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.12 {"installer":{"name":"uv","version":"0.11.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for codebuddy_agent_sdk-0.3.160-py3-none-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 a827db99fa8dc5cd6e0695f4932ac097601b9e184e8b052715d2789d5165b705
MD5 4c3c2114521d44bae8efba6536cdabaa
BLAKE2b-256 ce1e3d4066e82efcd300fafebaf92d0ee31ecff9920a3feffc55d17f086ee90a

See more details on using hashes here.

File details

Details for the file codebuddy_agent_sdk-0.3.160-py3-none-musllinux_1_1_aarch64.whl.

File metadata

  • Download URL: codebuddy_agent_sdk-0.3.160-py3-none-musllinux_1_1_aarch64.whl
  • Upload date:
  • Size: 45.1 MB
  • Tags: Python 3, musllinux: musl 1.1+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.12 {"installer":{"name":"uv","version":"0.11.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for codebuddy_agent_sdk-0.3.160-py3-none-musllinux_1_1_aarch64.whl
Algorithm Hash digest
SHA256 6d44d84c4cf66fcf4bc7ca73f41783dbd67990c1bbbd299bf777448049c4e3d9
MD5 0ae45a320dbe54e1597bf54dbeff491a
BLAKE2b-256 ed21f8fb98956f551c16334ac24b4bc97744d5f34c76a5ebd1cc67d5dfd3f5aa

See more details on using hashes here.

File details

Details for the file codebuddy_agent_sdk-0.3.160-py3-none-manylinux_2_17_x86_64.whl.

File metadata

  • Download URL: codebuddy_agent_sdk-0.3.160-py3-none-manylinux_2_17_x86_64.whl
  • Upload date:
  • Size: 47.5 MB
  • Tags: Python 3, manylinux: glibc 2.17+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.12 {"installer":{"name":"uv","version":"0.11.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for codebuddy_agent_sdk-0.3.160-py3-none-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 7a283734c2a2dec88b8810a488dd5c2277e6a6703403e59c865b7983ed0a8141
MD5 7c4c586dea87da73aec25768d6b3c757
BLAKE2b-256 77aebdeed48857ea0dc8bed193fe40a1a0d093bfa8f05486ca18cb04d3e08887

See more details on using hashes here.

File details

Details for the file codebuddy_agent_sdk-0.3.160-py3-none-manylinux_2_17_aarch64.whl.

File metadata

  • Download URL: codebuddy_agent_sdk-0.3.160-py3-none-manylinux_2_17_aarch64.whl
  • Upload date:
  • Size: 47.0 MB
  • Tags: Python 3, manylinux: glibc 2.17+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.12 {"installer":{"name":"uv","version":"0.11.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for codebuddy_agent_sdk-0.3.160-py3-none-manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 ba2274cc0bcfce32e12dcd67735588ab6e5b8e67696eae440946ab29a626b7ef
MD5 2d53764013455b98467f069e64eaea6e
BLAKE2b-256 115be78b23bcc4c25ddda64f6d79cb0e71f079c7bce8fcdd7d974eae957160ac

See more details on using hashes here.

File details

Details for the file codebuddy_agent_sdk-0.3.160-py3-none-macosx_11_0_arm64.whl.

File metadata

  • Download URL: codebuddy_agent_sdk-0.3.160-py3-none-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 32.1 MB
  • Tags: Python 3, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.12 {"installer":{"name":"uv","version":"0.11.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for codebuddy_agent_sdk-0.3.160-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f1d7c6858c45863afb7825c9a0c9693d308bb47bddc3c6aa1f0fee7f05390f22
MD5 4fbc479d56e8226b092e97a9545d6566
BLAKE2b-256 5acfda658a8756fa3be6058a70c73977c473d7abe51fd8d0db7d4afee71aed7d

See more details on using hashes here.

File details

Details for the file codebuddy_agent_sdk-0.3.160-py3-none-macosx_10_12_x86_64.whl.

File metadata

  • Download URL: codebuddy_agent_sdk-0.3.160-py3-none-macosx_10_12_x86_64.whl
  • Upload date:
  • Size: 34.6 MB
  • Tags: Python 3, macOS 10.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.12 {"installer":{"name":"uv","version":"0.11.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for codebuddy_agent_sdk-0.3.160-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 8efa6f20e7ae4b319d21c17436c3ad918b15f6ab98aae1c8014837fd4654b0fc
MD5 778833d5688130f0a65d61dfeb8177cb
BLAKE2b-256 612993f7e1bd75467a207aadd3ec13583f21b323be025570e5abcb08526daf2a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page