self code adk
Agent which can read code of currently running application and help analyzing it. Its main purpose is to assist in debugging the whole application by enabling the agent, defined as a developer and multi-agent expert, to read the entire codebase.
usage
install the package
uv add self-code-adk
import it
from self_code_adk.agent import SelfCodeAgent
And add new sub agent
sub_agents=[gardener, weather],
+# include self_code_agent only for development purposes
+if dev_mode:
+ self_code_agent=SelfCodeAgent("gemini-2.5-flash-preview-04-17")
+ sub_agents.append(self_code_agent)
root_agent = Agent(
name="my-fancy-agen",
model="gemini-2.5-flash-preview-04-17",
description=("root agent which acts as coordinator"),
instruction=(
"""
blah
"""
),
sub_agents=sub_agent,
)
Security considerations
self-code-adk has access to app code and whole filesystem. It states a security risk and should never be run in production. It is designed purerly for local testing within trusted input.
Note: if instructed in malicious way, it can read any file. For example /etc/shadow. Even if LLM will reject request initialy, there is no secondary protection in place.
How it works
In short it is an agent with 2 tools:
- find possible root directory with app code.
- read the content of repository
Thats is all. LLM with instruction takes care of rest.
design
self-code is just an agent which can access the code. It can be plugged into an multiagent app and then app relevant questions will be delegated on demand.
sample chat
Here is screenshot of sample chat of multiagent app. App contains few agents, and one of them is returning capital cities for a country using a tool. Once asked, self-code agent reads and provides feedback on code quality.
idea definition
Metadata
Release files for self-code-adk 0.1.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| self_code_adk-0.1.8.tar.gz | 3.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| self_code_adk-0.1.8-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.2 kB
Release files / self_code_adk-0.1.8.tar.gz
| Download URL | self_code_adk-0.1.8.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
36b82a143d43d342903ae5f5d61b2041622c5f6546745d55f98354c1ba89af89
|
|
BLAKE2b-256 checksum How to use checksums |
f2b9b14e4982e94b835e9c880c96d982205a587a5d8f4879ba5b7f066981cc32
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.7.1
|
Release files / self_code_adk-0.1.8-py3-none-any.whl
| Download URL | self_code_adk-0.1.8-py3-none-any.whl |
|---|---|
| Size | 3.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b38bbf88d73d7f9bf2b119147d528e9b20bac90208e8dfa33168e3d9786e3625
|
|
BLAKE2b-256 checksum How to use checksums |
a577dc7f763b3b679bd2023efdd37d4104d93ffaaae5dc0653abd89f370b4033
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.7.1
|