agentkai 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. agentkai-0.1.0/LICENSE +176 -0
  2. agentkai-0.1.0/PKG-INFO +139 -0
  3. agentkai-0.1.0/README.md +113 -0
  4. agentkai-0.1.0/pyproject.toml +56 -0
  5. agentkai-0.1.0/setup.cfg +4 -0
  6. agentkai-0.1.0/src/agentkai/__init__.py +54 -0
  7. agentkai-0.1.0/src/agentkai/agent.py +331 -0
  8. agentkai-0.1.0/src/agentkai/browser.py +631 -0
  9. agentkai-0.1.0/src/agentkai/channels/README.md +117 -0
  10. agentkai-0.1.0/src/agentkai/channels/__init__.py +88 -0
  11. agentkai-0.1.0/src/agentkai/channels/core.py +507 -0
  12. agentkai-0.1.0/src/agentkai/channels/discord.py +126 -0
  13. agentkai-0.1.0/src/agentkai/channels/examples/whatsapp-sidecar/package.json +1 -0
  14. agentkai-0.1.0/src/agentkai/channels/examples/whatsapp-sidecar/server.js +74 -0
  15. agentkai-0.1.0/src/agentkai/channels/static/chat.html +106 -0
  16. agentkai-0.1.0/src/agentkai/channels/telegram.py +121 -0
  17. agentkai-0.1.0/src/agentkai/channels/webchat.py +182 -0
  18. agentkai-0.1.0/src/agentkai/channels/whatsapp.py +130 -0
  19. agentkai-0.1.0/src/agentkai/cli.py +505 -0
  20. agentkai-0.1.0/src/agentkai/dashboard/API.md +84 -0
  21. agentkai-0.1.0/src/agentkai/dashboard/__init__.py +35 -0
  22. agentkai-0.1.0/src/agentkai/dashboard/server.py +535 -0
  23. agentkai-0.1.0/src/agentkai/dashboard/static/app.js +478 -0
  24. agentkai-0.1.0/src/agentkai/dashboard/static/img/logo.gif +0 -0
  25. agentkai-0.1.0/src/agentkai/dashboard/static/index.html +66 -0
  26. agentkai-0.1.0/src/agentkai/dashboard/static/style.css +246 -0
  27. agentkai-0.1.0/src/agentkai/devices/README.md +66 -0
  28. agentkai-0.1.0/src/agentkai/devices/__init__.py +455 -0
  29. agentkai-0.1.0/src/agentkai/events.py +178 -0
  30. agentkai-0.1.0/src/agentkai/goals.py +509 -0
  31. agentkai-0.1.0/src/agentkai/mcp.py +515 -0
  32. agentkai-0.1.0/src/agentkai/media.py +616 -0
  33. agentkai-0.1.0/src/agentkai/memory/__init__.py +192 -0
  34. agentkai-0.1.0/src/agentkai/permissions.py +175 -0
  35. agentkai-0.1.0/src/agentkai/providers.py +495 -0
  36. agentkai-0.1.0/src/agentkai/scheduler/__init__.py +485 -0
  37. agentkai-0.1.0/src/agentkai/skills.py +374 -0
  38. agentkai-0.1.0/src/agentkai/skills_bundle/__init__.py +9 -0
  39. agentkai-0.1.0/src/agentkai/skills_bundle/_common.py +58 -0
  40. agentkai-0.1.0/src/agentkai/skills_bundle/_http.py +116 -0
  41. agentkai-0.1.0/src/agentkai/skills_bundle/github/SKILL.md +35 -0
  42. agentkai-0.1.0/src/agentkai/skills_bundle/github/tools.py +230 -0
  43. agentkai-0.1.0/src/agentkai/skills_bundle/gmail/SKILL.md +41 -0
  44. agentkai-0.1.0/src/agentkai/skills_bundle/gmail/tools.py +195 -0
  45. agentkai-0.1.0/src/agentkai/skills_bundle/google_calendar/SKILL.md +38 -0
  46. agentkai-0.1.0/src/agentkai/skills_bundle/google_calendar/tools.py +211 -0
  47. agentkai-0.1.0/src/agentkai/skills_bundle/health/SKILL.md +53 -0
  48. agentkai-0.1.0/src/agentkai/skills_bundle/health/tools.py +279 -0
  49. agentkai-0.1.0/src/agentkai/skills_bundle/image_search/SKILL.md +40 -0
  50. agentkai-0.1.0/src/agentkai/skills_bundle/image_search/tools.py +62 -0
  51. agentkai-0.1.0/src/agentkai/skills_bundle/media/SKILL.md +62 -0
  52. agentkai-0.1.0/src/agentkai/skills_bundle/media/tools.py +9 -0
  53. agentkai-0.1.0/src/agentkai/skills_bundle/payments/SKILL.md +55 -0
  54. agentkai-0.1.0/src/agentkai/skills_bundle/payments/tools.py +129 -0
  55. agentkai-0.1.0/src/agentkai/skills_bundle/places/SKILL.md +47 -0
  56. agentkai-0.1.0/src/agentkai/skills_bundle/places/tools.py +153 -0
  57. agentkai-0.1.0/src/agentkai/skills_bundle/shopping/SKILL.md +65 -0
  58. agentkai-0.1.0/src/agentkai/skills_bundle/shopping/tools.py +131 -0
  59. agentkai-0.1.0/src/agentkai/skills_bundle/spotify/SKILL.md +38 -0
  60. agentkai-0.1.0/src/agentkai/skills_bundle/spotify/tools.py +194 -0
  61. agentkai-0.1.0/src/agentkai/skills_bundle/travel/SKILL.md +68 -0
  62. agentkai-0.1.0/src/agentkai/skills_bundle/travel/tools.py +191 -0
  63. agentkai-0.1.0/src/agentkai/skills_bundle/voice/SKILL.md +62 -0
  64. agentkai-0.1.0/src/agentkai/skills_bundle/voice/tools.py +9 -0
  65. agentkai-0.1.0/src/agentkai/subagents.py +386 -0
  66. agentkai-0.1.0/src/agentkai/tools/__init__.py +519 -0
  67. agentkai-0.1.0/src/agentkai/voice.py +574 -0
  68. agentkai-0.1.0/src/agentkai/widgets/PROTOCOL.md +114 -0
  69. agentkai-0.1.0/src/agentkai/widgets/__init__.py +247 -0
  70. agentkai-0.1.0/src/agentkai.egg-info/PKG-INFO +139 -0
  71. agentkai-0.1.0/src/agentkai.egg-info/SOURCES.txt +90 -0
  72. agentkai-0.1.0/src/agentkai.egg-info/dependency_links.txt +1 -0
  73. agentkai-0.1.0/src/agentkai.egg-info/entry_points.txt +2 -0
  74. agentkai-0.1.0/src/agentkai.egg-info/requires.txt +18 -0
  75. agentkai-0.1.0/src/agentkai.egg-info/top_level.txt +1 -0
  76. agentkai-0.1.0/tests/test_browser.py +562 -0
  77. agentkai-0.1.0/tests/test_channels.py +478 -0
  78. agentkai-0.1.0/tests/test_core.py +351 -0
  79. agentkai-0.1.0/tests/test_dashboard.py +248 -0
  80. agentkai-0.1.0/tests/test_devices.py +160 -0
  81. agentkai-0.1.0/tests/test_goals.py +110 -0
  82. agentkai-0.1.0/tests/test_integration.py +471 -0
  83. agentkai-0.1.0/tests/test_mcp.py +202 -0
  84. agentkai-0.1.0/tests/test_media.py +307 -0
  85. agentkai-0.1.0/tests/test_memory.py +113 -0
  86. agentkai-0.1.0/tests/test_scheduler.py +376 -0
  87. agentkai-0.1.0/tests/test_skills.py +519 -0
  88. agentkai-0.1.0/tests/test_skills2.py +458 -0
  89. agentkai-0.1.0/tests/test_subagents.py +268 -0
  90. agentkai-0.1.0/tests/test_tools.py +204 -0
  91. agentkai-0.1.0/tests/test_voice.py +350 -0
  92. agentkai-0.1.0/tests/test_widgets.py +87 -0
agentkai-0.1.0/LICENSE ADDED
@@ -0,0 +1,176 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
@@ -0,0 +1,139 @@
1
+ Metadata-Version: 2.4
2
+ Name: agentkai
3
+ Version: 0.1.0
4
+ Summary: Open-source personal AI agent — model-agnostic, with tools, memory, scheduler and a local dashboard
5
+ License: Apache-2.0
6
+ Requires-Python: >=3.10
7
+ Description-Content-Type: text/markdown
8
+ License-File: LICENSE
9
+ Requires-Dist: litellm>=1.60
10
+ Requires-Dist: typer>=0.9
11
+ Requires-Dist: rich>=13
12
+ Requires-Dist: fastapi>=0.110
13
+ Requires-Dist: uvicorn>=0.29
14
+ Requires-Dist: pydantic>=2
15
+ Requires-Dist: pyyaml>=6
16
+ Requires-Dist: playwright>=1.40
17
+ Requires-Dist: httpx>=0.27
18
+ Requires-Dist: discord.py>=2.4
19
+ Requires-Dist: websockets>=12
20
+ Provides-Extra: voice
21
+ Requires-Dist: faster-whisper>=1.0; extra == "voice"
22
+ Provides-Extra: test
23
+ Requires-Dist: pytest>=8; extra == "test"
24
+ Requires-Dist: pytest-asyncio>=0.23; extra == "test"
25
+ Dynamic: license-file
26
+
27
+ <p align="center">
28
+ <img src="assets/agentkai-logo.gif" width="160" height="160" alt="agentkai logo — animated fluffy mascot">
29
+ </p>
30
+
31
+ # agentkai
32
+
33
+ An open-source personal AI agent that runs on your own computer.
34
+ Model-agnostic by design: bring your own model — Claude, Gemini, GPT,
35
+ Ollama (local), GLM, or anything LiteLLM speaks — and the agent keeps
36
+ the same tools, memory, scheduler, and dashboard.
37
+
38
+ ```
39
+ ┌─────────────┐
40
+ │ You │
41
+ └──────┬──────┘
42
+ ┌──────────────────┼──────────────────┐
43
+ ▼ ▼ ▼
44
+ ┌───────────┐ ┌─────────────┐ ┌─────────────┐
45
+ │ CLI │ │ Dashboard │ │ Gateway │
46
+ │agentkai │ │ 127.0.0.1 │ │ Telegram / │
47
+ │run · chat │ │ token-auth │ │ Discord / │
48
+ └─────┬─────┘ └──────┬──────┘ │ WebChat / │
49
+ │ │ │ WhatsApp* │
50
+ └──────────────────┼────────────┴──────┬──────┘
51
+ ▼ ▼
52
+ ┌──────────────────────────────┐
53
+ │ Agent loop │
54
+ │ think → tool-call → observe │
55
+ │ streaming · timeouts · │
56
+ │ approval gates · event log │
57
+ └──────────────┬───────────────┘
58
+ ┌────────────┬─────────────┼──────────────┬────────────┐
59
+ ▼ ▼ ▼ ▼ ▼
60
+ ┌──────────┐ ┌──────────┐ ┌────────────┐ ┌──────────┐ ┌──────────┐
61
+ │ Providers│ │ Tools │ │ Browser │ │ Memory │ │Scheduler │
62
+ │ Claude │ │ exec etc │ │ Chromium │ │ markdown │ │ cron · │
63
+ │ Gemini │ │ MCP │ │ real pages │ │ SOUL/USER│ │ heartbeat│
64
+ │ GPT/Oll. │ │ 12 skills│ │ clicks/forms│ │ daily log│ │ dreaming │
65
+ └──────────┘ └──────────┘ └────────────┘ └──────────┘ └──────────┘
66
+ ```
67
+
68
+ \* WhatsApp via an experimental user-run bridge sidecar.
69
+
70
+ ## Features
71
+
72
+ - **Model-agnostic** — aliases (`claude`, `gemini`, `gpt`, `glm`,
73
+ `local`) with fallbacks, capability probing, BYOK keys that are never
74
+ logged. Fully offline with Ollama.
75
+ - **Real tools** — shell/filesystem (root-scoped, blocklisted), a real
76
+ Chromium browser, MCP client (stdio + SSE), 12 bundled skills (Gmail,
77
+ Calendar, GitHub, Spotify, places, images, voice, media, payments,
78
+ shopping, travel, health).
79
+ - **Permission gates** — risk-based allow/ask/deny on every tool call,
80
+ audited. Unattended jobs can never run high-risk tools.
81
+ - **Markdown memory** — SOUL/USER/MEMORY.md, daily logs, people & groups,
82
+ keyword search. Plain files you can edit and git.
83
+ - **Scheduler** — cron/at jobs, heartbeat check-ins, nightly dreaming
84
+ (memory consolidation), all in SQLite.
85
+ - **Messaging gateway** — Telegram, Discord, built-in WebChat, and an
86
+ experimental WhatsApp bridge; per-session isolation, owner approvals
87
+ via `APPROVE`/`DENY`.
88
+ - **Local dashboard** — FastAPI on 127.0.0.1 only, per-launch token,
89
+ offline SPA, live SSE streaming, run replay.
90
+ - **Voice & media** — faster-whisper / OpenAI STT+TTS; image generation
91
+ via OpenAI (paid) or local Stable Diffusion. Honest errors when
92
+ nothing is configured — nothing faked.
93
+ - **Devices & goals** — pair your phone via the companion-app contract;
94
+ durable goals and tracked items with a daily briefing prompt.
95
+
96
+ ## Quick start
97
+
98
+ ```bash
99
+ pip install agentkai
100
+ export ANTHROPIC_API_KEY=... # or GEMINI_API_KEY / OPENAI_API_KEY / ZHIPUAI_API_KEY
101
+ agentkai run "summarize what's in ~/Documents" --model claude
102
+ agentkai dashboard # local UI at http://127.0.0.1:8931/
103
+ ```
104
+
105
+ No key? Install [Ollama](https://ollama.com), `ollama pull qwen3:32b`,
106
+ then `agentkai run "hello" --model local` — fully offline.
107
+
108
+ Full guide: [`docs/quickstart.md`](docs/quickstart.md) ·
109
+ all docs: [`docs/index.md`](docs/index.md)
110
+
111
+ ## Layout
112
+
113
+ - `src/agentkai/` — the package: agent loop, providers, tools, browser,
114
+ channels, dashboard, devices, memory, scheduler, skills, voice, media,
115
+ goals, widgets
116
+ - `docs/` — user documentation for every feature (original docs)
117
+ - `research/` — architecture research and case studies
118
+ - `examples/` — example configs and skills
119
+
120
+ ## Status
121
+
122
+ v0.1.0 — core flows (agent runs, tools, memory, scheduler, dashboard,
123
+ channels) are implemented and tested. Items marked **experimental** in
124
+ the docs (WhatsApp bridge, video generation) are real code with real
125
+ limits. See [`docs/troubleshooting.md`](docs/troubleshooting.md) for
126
+ known gaps.
127
+
128
+ ## Development
129
+
130
+ ```bash
131
+ git clone https://github.com/Bilal-Junaid-Jiwani/agentkai
132
+ cd agentkai
133
+ python -m venv .venv && .venv/bin/pip install -e ".[test,voice]"
134
+ .venv/bin/python -m pytest tests/ # full suite
135
+ ```
136
+
137
+ ## License
138
+
139
+ Apache-2.0
@@ -0,0 +1,113 @@
1
+ <p align="center">
2
+ <img src="assets/agentkai-logo.gif" width="160" height="160" alt="agentkai logo — animated fluffy mascot">
3
+ </p>
4
+
5
+ # agentkai
6
+
7
+ An open-source personal AI agent that runs on your own computer.
8
+ Model-agnostic by design: bring your own model — Claude, Gemini, GPT,
9
+ Ollama (local), GLM, or anything LiteLLM speaks — and the agent keeps
10
+ the same tools, memory, scheduler, and dashboard.
11
+
12
+ ```
13
+ ┌─────────────┐
14
+ │ You │
15
+ └──────┬──────┘
16
+ ┌──────────────────┼──────────────────┐
17
+ ▼ ▼ ▼
18
+ ┌───────────┐ ┌─────────────┐ ┌─────────────┐
19
+ │ CLI │ │ Dashboard │ │ Gateway │
20
+ │agentkai │ │ 127.0.0.1 │ │ Telegram / │
21
+ │run · chat │ │ token-auth │ │ Discord / │
22
+ └─────┬─────┘ └──────┬──────┘ │ WebChat / │
23
+ │ │ │ WhatsApp* │
24
+ └──────────────────┼────────────┴──────┬──────┘
25
+ ▼ ▼
26
+ ┌──────────────────────────────┐
27
+ │ Agent loop │
28
+ │ think → tool-call → observe │
29
+ │ streaming · timeouts · │
30
+ │ approval gates · event log │
31
+ └──────────────┬───────────────┘
32
+ ┌────────────┬─────────────┼──────────────┬────────────┐
33
+ ▼ ▼ ▼ ▼ ▼
34
+ ┌──────────┐ ┌──────────┐ ┌────────────┐ ┌──────────┐ ┌──────────┐
35
+ │ Providers│ │ Tools │ │ Browser │ │ Memory │ │Scheduler │
36
+ │ Claude │ │ exec etc │ │ Chromium │ │ markdown │ │ cron · │
37
+ │ Gemini │ │ MCP │ │ real pages │ │ SOUL/USER│ │ heartbeat│
38
+ │ GPT/Oll. │ │ 12 skills│ │ clicks/forms│ │ daily log│ │ dreaming │
39
+ └──────────┘ └──────────┘ └────────────┘ └──────────┘ └──────────┘
40
+ ```
41
+
42
+ \* WhatsApp via an experimental user-run bridge sidecar.
43
+
44
+ ## Features
45
+
46
+ - **Model-agnostic** — aliases (`claude`, `gemini`, `gpt`, `glm`,
47
+ `local`) with fallbacks, capability probing, BYOK keys that are never
48
+ logged. Fully offline with Ollama.
49
+ - **Real tools** — shell/filesystem (root-scoped, blocklisted), a real
50
+ Chromium browser, MCP client (stdio + SSE), 12 bundled skills (Gmail,
51
+ Calendar, GitHub, Spotify, places, images, voice, media, payments,
52
+ shopping, travel, health).
53
+ - **Permission gates** — risk-based allow/ask/deny on every tool call,
54
+ audited. Unattended jobs can never run high-risk tools.
55
+ - **Markdown memory** — SOUL/USER/MEMORY.md, daily logs, people & groups,
56
+ keyword search. Plain files you can edit and git.
57
+ - **Scheduler** — cron/at jobs, heartbeat check-ins, nightly dreaming
58
+ (memory consolidation), all in SQLite.
59
+ - **Messaging gateway** — Telegram, Discord, built-in WebChat, and an
60
+ experimental WhatsApp bridge; per-session isolation, owner approvals
61
+ via `APPROVE`/`DENY`.
62
+ - **Local dashboard** — FastAPI on 127.0.0.1 only, per-launch token,
63
+ offline SPA, live SSE streaming, run replay.
64
+ - **Voice & media** — faster-whisper / OpenAI STT+TTS; image generation
65
+ via OpenAI (paid) or local Stable Diffusion. Honest errors when
66
+ nothing is configured — nothing faked.
67
+ - **Devices & goals** — pair your phone via the companion-app contract;
68
+ durable goals and tracked items with a daily briefing prompt.
69
+
70
+ ## Quick start
71
+
72
+ ```bash
73
+ pip install agentkai
74
+ export ANTHROPIC_API_KEY=... # or GEMINI_API_KEY / OPENAI_API_KEY / ZHIPUAI_API_KEY
75
+ agentkai run "summarize what's in ~/Documents" --model claude
76
+ agentkai dashboard # local UI at http://127.0.0.1:8931/
77
+ ```
78
+
79
+ No key? Install [Ollama](https://ollama.com), `ollama pull qwen3:32b`,
80
+ then `agentkai run "hello" --model local` — fully offline.
81
+
82
+ Full guide: [`docs/quickstart.md`](docs/quickstart.md) ·
83
+ all docs: [`docs/index.md`](docs/index.md)
84
+
85
+ ## Layout
86
+
87
+ - `src/agentkai/` — the package: agent loop, providers, tools, browser,
88
+ channels, dashboard, devices, memory, scheduler, skills, voice, media,
89
+ goals, widgets
90
+ - `docs/` — user documentation for every feature (original docs)
91
+ - `research/` — architecture research and case studies
92
+ - `examples/` — example configs and skills
93
+
94
+ ## Status
95
+
96
+ v0.1.0 — core flows (agent runs, tools, memory, scheduler, dashboard,
97
+ channels) are implemented and tested. Items marked **experimental** in
98
+ the docs (WhatsApp bridge, video generation) are real code with real
99
+ limits. See [`docs/troubleshooting.md`](docs/troubleshooting.md) for
100
+ known gaps.
101
+
102
+ ## Development
103
+
104
+ ```bash
105
+ git clone https://github.com/Bilal-Junaid-Jiwani/agentkai
106
+ cd agentkai
107
+ python -m venv .venv && .venv/bin/pip install -e ".[test,voice]"
108
+ .venv/bin/python -m pytest tests/ # full suite
109
+ ```
110
+
111
+ ## License
112
+
113
+ Apache-2.0
@@ -0,0 +1,56 @@
1
+ [build-system]
2
+ requires = ["setuptools>=68"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "agentkai"
7
+ version = "0.1.0"
8
+ description = "Open-source personal AI agent — model-agnostic, with tools, memory, scheduler and a local dashboard"
9
+ readme = "README.md"
10
+ license = { text = "Apache-2.0" }
11
+ requires-python = ">=3.10"
12
+ dependencies = [
13
+ "litellm>=1.60",
14
+ "typer>=0.9",
15
+ "rich>=13",
16
+ "fastapi>=0.110",
17
+ "uvicorn>=0.29",
18
+ "pydantic>=2",
19
+ "pyyaml>=6",
20
+ "playwright>=1.40",
21
+ "httpx>=0.27", # telegram channel + whatsapp sidecar HTTP
22
+ "discord.py>=2.4", # discord channel
23
+ "websockets>=12", # built-in webchat channel
24
+ ]
25
+
26
+ [project.optional-dependencies]
27
+ voice = ["faster-whisper>=1.0"] # offline speech-to-text (local-whisper)
28
+ test = ["pytest>=8", "pytest-asyncio>=0.23"] # run the test suite
29
+
30
+ [project.scripts]
31
+ agentkai = "agentkai.cli:main"
32
+
33
+ [tool.setuptools.packages.find]
34
+ where = ["src"]
35
+
36
+ # Non-Python files that must ship inside the wheel: dashboard SPA,
37
+ # skill instructions + tool code (loaded from disk, not as packages),
38
+ # and the channel/device/widget contract docs referenced by docs/.
39
+ [tool.setuptools.package-data]
40
+ agentkai = [
41
+ "dashboard/static/**/*",
42
+ "dashboard/API.md",
43
+ "channels/README.md",
44
+ "channels/static/**/*",
45
+ "channels/examples/**/*",
46
+ "devices/README.md",
47
+ "widgets/PROTOCOL.md",
48
+ "skills_bundle/*/SKILL.md",
49
+ "skills_bundle/*/tools.py",
50
+ ]
51
+
52
+ [tool.pytest.ini_options]
53
+ asyncio_mode = "auto"
54
+ markers = [
55
+ "real_browser: requires a real Chromium install (opt-in via AGENTKAI_REAL_BROWSER=1)",
56
+ ]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,54 @@
1
+ """agentkai: model-agnostic personal AI agent."""
2
+ from .agent import Agent, RunResult
3
+ from .events import Event, EventLog, list_runs, replay, summarize
4
+ from .permissions import Action, PermissionGate, cli_ask
5
+ from .providers import (
6
+ ALIASES,
7
+ LLMClient,
8
+ LLMMessage,
9
+ ProviderConfig,
10
+ ToolCall,
11
+ normalize_tool_calls,
12
+ probe_capabilities,
13
+ resolve_fallbacks,
14
+ resolve_model,
15
+ )
16
+ from .scheduler import Job, Scheduler
17
+ from .subagents import (
18
+ ChildRun,
19
+ SubagentManager,
20
+ default_manager,
21
+ readonly_subset,
22
+ scoped_registry,
23
+ )
24
+
25
+ __version__ = "0.1.0"
26
+
27
+ __all__ = [
28
+ "Agent",
29
+ "RunResult",
30
+ "Event",
31
+ "EventLog",
32
+ "list_runs",
33
+ "replay",
34
+ "summarize",
35
+ "Action",
36
+ "PermissionGate",
37
+ "cli_ask",
38
+ "ALIASES",
39
+ "LLMClient",
40
+ "LLMMessage",
41
+ "ProviderConfig",
42
+ "ToolCall",
43
+ "normalize_tool_calls",
44
+ "probe_capabilities",
45
+ "resolve_fallbacks",
46
+ "resolve_model",
47
+ "Job",
48
+ "Scheduler",
49
+ "ChildRun",
50
+ "SubagentManager",
51
+ "default_manager",
52
+ "readonly_subset",
53
+ "scoped_registry",
54
+ ]