A development tool for LLM call visualization and debugging
Project description
Agent developer scratchpad
[!NOTE]
By default, we don't collect any data from you. There is code for telemetry which we exclusively use for dedicated test users. (We don't distribute the DB connection url/key with the repo)
See README's in src dirs for more details.
User workflow
We assume the user coded their workflow in Python, i.e., runs it with something like:
python -m foo.barENV_VAR=5 python script.py --some-flag
All they change is the Python command. Whenever they want to develop their script with us, they run:
aco-launch -m foo.barENV_VAR=5 aco-launch script.py --some-flag
This will feel exactly the same as running Python but also analyzes their code, populates our VS Code extension, etc. Specfically:
- Program prints/reads to/from same terminal, crashes the same, etc.
- User can use VS Code debugger
Getting started
Installation
If you're starting from a clean sheet, create a blank conda environment and activate it. We recommend Python 3.13, but Python versions >=3.10 are supported.
conda create -n aco python=3.13 -y && conda activate aco
[!NOTE]
If you are a developer of this project, jump to the Development section for installation instructions.
For non-developers, install the project like so:
pip install -e .
# Because the extension is not packaged yet, you need to install UI dependencies as well
cd src/user_interface && npm install
Running the extension
Open this project in a new window. Select the "Run Extension" option from the debugger and run it. This will open a new window with the extension enabled (more details).
Try an example
In the new window, you can now open any project that you are working on. We will run an example from our examples folder. Note that this example depends on the OpenAI API.
aco-launch ./example_workflows/debug_examples/openai_add_numbers.py
Further resources
[!IMPORTANT]
Join our discord server.
Development
Please install the dependencies required for developing
pip install -e ".[dev]"
pre-commit install
cd src/user_interface && npm install
Server commands and log
To manually start and stop our server. Just do:
aco-server startaco-server stop
If you make changes to the server code, you can also do aco-server restart so the changes are reflected in the running server. If you want to clear all recorded runs and cached LLM calls, do aco-server clear.
If the server isn't running already, it will automatically be started upon running aco-launch.
The server logs can be found in ~/.cache/agent-copilot/logs/server.log.
Architecture
These are the processes running.
- Run user program (green): The users launch processes of their program by running
aco-launch their_script.pywhich feels exactly like running their script normally withpython their_script.py--- they can also use the debugger to run their script, which also feels completely normal. Under the hood theaco-launchcommand monkey patches certain functions and logs runtime events to thedevelop server. Thedevelop runnerruns the actual python program of the user. Thedevelop orchestratormanages the life cycle of the runner. For example, when the user presses the restart button in the UI, the orchestrator with kill the current runner and re-launch it. Code - Develop server (blue): The
develop serveris the core of the system and responsbible for all analysis. It receives the logs from the user process and updates the UI according to its analyses. All communication to/from thedevelop serverhappens over a TCP socket (default: 5959). Code - UI (red): The red boxes are the UI of the VS Code extension. The UI gets updated by the
develop server. TODO: The VS Code extension spawns thedevelop serverand tears it down. They also exchange a heart beat for failures and unclean VS Code exits. Code
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agops_bird-0.0.1.tar.gz.
File metadata
- Download URL: agops_bird-0.0.1.tar.gz
- Upload date:
- Size: 66.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9cdb6c21f288f126a28be6e71d3182865e6168ca9f8871d1a8279b99c65a2614
|
|
| MD5 |
b9757a2f424c4255464ad5bc373c260e
|
|
| BLAKE2b-256 |
1cc54aa6657ac6063cf32ae1ae37c80a8e446e4825cdac7022f596b437b402b5
|
File details
Details for the file agops_bird-0.0.1-py3-none-any.whl.
File metadata
- Download URL: agops_bird-0.0.1-py3-none-any.whl
- Upload date:
- Size: 64.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
94f8eb81e45e7bf4ecf538dcaf424797a86a3d0ba4e901ea27c338d43a44ae18
|
|
| MD5 |
55e2d1d78b25f93fa489a063c65fa5a0
|
|
| BLAKE2b-256 |
8f87a838983e318ba14eae96fb78eea84bdd2500231da9ae3c68163358321dc3
|