{"id":37065469,"url":"https://github.com/n0npax/self-code-adk","last_synced_at":"2026-01-14T07:39:51.077Z","repository":{"id":290344812,"uuid":"974051784","full_name":"n0npax/self-code-adk","owner":"n0npax","description":"agent to check code it's running with.","archived":false,"fork":false,"pushed_at":"2025-12-31T13:41:52.000Z","size":674,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-04T21:30:02.227Z","etag":null,"topics":["adk","adk-python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/n0npax.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-04-28T07:25:07.000Z","updated_at":"2025-05-14T12:27:09.000Z","dependencies_parsed_at":"2025-04-28T10:47:29.409Z","dependency_job_id":"73bdeee2-e005-4b18-82de-2fdef0fcb813","html_url":"https://github.com/n0npax/self-code-adk","commit_stats":null,"previous_names":["n0npax/self-code-adk"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/n0npax/self-code-adk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n0npax%2Fself-code-adk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n0npax%2Fself-code-adk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n0npax%2Fself-code-adk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n0npax%2Fself-code-adk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/n0npax","download_url":"https://codeload.github.com/n0npax/self-code-adk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n0npax%2Fself-code-adk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28413469,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T05:26:33.345Z","status":"ssl_error","status_checked_at":"2026-01-14T05:21:57.251Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adk","adk-python"],"created_at":"2026-01-14T07:39:50.392Z","updated_at":"2026-01-14T07:39:51.064Z","avatar_url":"https://github.com/n0npax.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![PyPI version](https://badge.fury.io/py/self-code-adk.svg)](https://badge.fury.io/py/self-code-adk)\n[![codecov](https://codecov.io/gh/n0npax/self-code-adk/graph/badge.svg)](https://codecov.io/gh/n0npax/self-code-adk)\n\n# self code adk\n\nAgent which can read code of currently running application and help analyzing it.\nIts main purpose is to assist in debugging the whole application. It is defined as a developer and multi-agent expert which can read the entire codebase.\nFor example, you can ask it how to **adjust other agents prompts** when they don't act as intented.\n\n## usage\n\n### install the package\n\n```sh\nuv add self-code-adk\n```\n### import it\n\n```python\nfrom self_code_adk.agent import SelfCodeAgent\n```\n\n### And add new sub agent\n\n```diff\n\nsub_agents=[gardener, weather],\n+# include self_code_agent only for development purposes\n+if dev_mode: \n+   self_code_agent=SelfCodeAgent(\"gemini-2.5-flash-preview-04-17\")\n+   sub_agents.append(self_code_agent)\nroot_agent = Agent(\n    name=\"my-fancy-agen\",\n    model=\"gemini-2.5-flash-preview-04-17\",\n    description=(\"root agent which acts as coordinator\"),\n    instruction=(\n        \"\"\"\n        blah   \n        \"\"\"\n    ),\n    sub_agents=sub_agent,\n)\n```\n\n## Security considerations\n\n`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.\n\n\u003e Note: if LLM instructed in malicious way, it may read any file. For example /etc/shadow. Even if LLM will reject request initialy, there is no secondary protection in place.\n\n## How it works\n\nIn short it is an agent with 2 tools:\n\n1. find possible root directory with app code and confirm selection with operator.\n2. read the content of repository\n\nThats is all. LLM with instruction takes care of rest.\n\n\u003e Note: Attempt to discover the source directory and confirm it with operator exists as there is no clear way to auto-discover it in resiliant way. Entrypoint of program varies depending on how it was started, for example `gunicorn`, `uv`, direct execution, etc.\n\n## design\n\n`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.\n\n![design](assets/multiagent.drawio.png \"design\")\n\n## sample chat\n\nHere 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.\n\nI'm usually asking questions like:\n- do you see any issues with current code?\n- **you didn't do `xyz`, how to adjust your prompt, so next time you would act differently**\n\n![sample chat](assets/sample-chat.png \"Sample chat\")\n\n## name\n\nIn Python, `self` is used to refer to attributes within a class instance. This agent accesses application source code, so its name was intended to mimic the `self.code` approach.\n\n---\n\n[medium article](https://medium.com/me/stats/post/d8c08464f293)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fn0npax%2Fself-code-adk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fn0npax%2Fself-code-adk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fn0npax%2Fself-code-adk/lists"}