Metadata-Version: 2.4
Name: self-code-adk
Version: 0.1.2
Summary: ADK agent which help in analysing currently running multiagent app
Author: Marcin <n0npax> Niemira
Maintainer: Marcin <n0npax> Niemira
License-Expression: MIT
Project-URL: Homepage, https://github.com/n0npax/self-code-adk
Project-URL: Documentation, https://github.com/n0npax/self-code-adk
Project-URL: Repository, https://github.com/n0npax/self-code-adk
Keywords: adk,agent,code-analyzer
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: google-adk>=0.3.0
Dynamic: license-file

# 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

```sh
uv add self-code-adk
```
### import it

```python
from self_code_adk.agent import SelfCodeAgent
```

### And add new sub agent

```diff

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

## How it works

In short it is an agent with 2 tools:

1. find possible root directory with app code.
2. read the content of repository

Thats is all. LLM with instruction takes care of rest.

## Docs

check [docs](./docs/) directory.
