tiles-ai 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 (73) hide show
  1. tiles_ai-0.1.0/LICENSE +21 -0
  2. tiles_ai-0.1.0/PKG-INFO +162 -0
  3. tiles_ai-0.1.0/README.md +131 -0
  4. tiles_ai-0.1.0/pyproject.toml +72 -0
  5. tiles_ai-0.1.0/setup.cfg +4 -0
  6. tiles_ai-0.1.0/src/tiles_ai/__init__.py +7 -0
  7. tiles_ai-0.1.0/src/tiles_ai/api/__init__.py +11 -0
  8. tiles_ai-0.1.0/src/tiles_ai/api/__main__.py +47 -0
  9. tiles_ai-0.1.0/src/tiles_ai/api/app.py +606 -0
  10. tiles_ai-0.1.0/src/tiles_ai/api/factory.py +44 -0
  11. tiles_ai-0.1.0/src/tiles_ai/api/schemas.py +216 -0
  12. tiles_ai-0.1.0/src/tiles_ai/cli.py +152 -0
  13. tiles_ai-0.1.0/src/tiles_ai/connectors/__init__.py +28 -0
  14. tiles_ai-0.1.0/src/tiles_ai/connectors/mcp.py +405 -0
  15. tiles_ai-0.1.0/src/tiles_ai/connectors/mock.py +91 -0
  16. tiles_ai-0.1.0/src/tiles_ai/contracts/__init__.py +117 -0
  17. tiles_ai-0.1.0/src/tiles_ai/contracts/connector.py +107 -0
  18. tiles_ai-0.1.0/src/tiles_ai/contracts/connector_manifest.py +160 -0
  19. tiles_ai-0.1.0/src/tiles_ai/contracts/ids.py +12 -0
  20. tiles_ai-0.1.0/src/tiles_ai/contracts/lifecycle.py +85 -0
  21. tiles_ai-0.1.0/src/tiles_ai/contracts/permissions.py +97 -0
  22. tiles_ai-0.1.0/src/tiles_ai/contracts/provider_config.py +179 -0
  23. tiles_ai-0.1.0/src/tiles_ai/contracts/tile.py +153 -0
  24. tiles_ai-0.1.0/src/tiles_ai/contracts/tile_manifest.py +151 -0
  25. tiles_ai-0.1.0/src/tiles_ai/contracts/validation.py +112 -0
  26. tiles_ai-0.1.0/src/tiles_ai/events/__init__.py +54 -0
  27. tiles_ai-0.1.0/src/tiles_ai/handlers.py +38 -0
  28. tiles_ai-0.1.0/src/tiles_ai/model/__init__.py +42 -0
  29. tiles_ai-0.1.0/src/tiles_ai/model/adapter.py +144 -0
  30. tiles_ai-0.1.0/src/tiles_ai/model/clients.py +150 -0
  31. tiles_ai-0.1.0/src/tiles_ai/model/store.py +75 -0
  32. tiles_ai-0.1.0/src/tiles_ai/oauth.py +145 -0
  33. tiles_ai-0.1.0/src/tiles_ai/py.typed +0 -0
  34. tiles_ai-0.1.0/src/tiles_ai/registry/__init__.py +31 -0
  35. tiles_ai-0.1.0/src/tiles_ai/registry/loader.py +104 -0
  36. tiles_ai-0.1.0/src/tiles_ai/registry/registry.py +218 -0
  37. tiles_ai-0.1.0/src/tiles_ai/runtime/__init__.py +35 -0
  38. tiles_ai-0.1.0/src/tiles_ai/runtime/gate.py +156 -0
  39. tiles_ai-0.1.0/src/tiles_ai/runtime/handles.py +74 -0
  40. tiles_ai-0.1.0/src/tiles_ai/runtime/runtime.py +353 -0
  41. tiles_ai-0.1.0/src/tiles_ai/runtime/scheduler.py +77 -0
  42. tiles_ai-0.1.0/src/tiles_ai/scaffold.py +303 -0
  43. tiles_ai-0.1.0/src/tiles_ai/web/assets/index-C5Z4Wq4s.css +1 -0
  44. tiles_ai-0.1.0/src/tiles_ai/web/assets/index-Cw7jcO2a.js +45 -0
  45. tiles_ai-0.1.0/src/tiles_ai/web/index.html +13 -0
  46. tiles_ai-0.1.0/src/tiles_ai.egg-info/PKG-INFO +162 -0
  47. tiles_ai-0.1.0/src/tiles_ai.egg-info/SOURCES.txt +71 -0
  48. tiles_ai-0.1.0/src/tiles_ai.egg-info/dependency_links.txt +1 -0
  49. tiles_ai-0.1.0/src/tiles_ai.egg-info/entry_points.txt +2 -0
  50. tiles_ai-0.1.0/src/tiles_ai.egg-info/requires.txt +10 -0
  51. tiles_ai-0.1.0/src/tiles_ai.egg-info/top_level.txt +1 -0
  52. tiles_ai-0.1.0/tests/test_api.py +408 -0
  53. tiles_ai-0.1.0/tests/test_brain_resolution.py +79 -0
  54. tiles_ai-0.1.0/tests/test_connector_manifest.py +62 -0
  55. tiles_ai-0.1.0/tests/test_events.py +41 -0
  56. tiles_ai-0.1.0/tests/test_flows.py +73 -0
  57. tiles_ai-0.1.0/tests/test_gate.py +145 -0
  58. tiles_ai-0.1.0/tests/test_instant_tiles.py +92 -0
  59. tiles_ai-0.1.0/tests/test_interfaces.py +118 -0
  60. tiles_ai-0.1.0/tests/test_lifecycle.py +44 -0
  61. tiles_ai-0.1.0/tests/test_mcp_connector.py +265 -0
  62. tiles_ai-0.1.0/tests/test_mcp_http.py +148 -0
  63. tiles_ai-0.1.0/tests/test_model_adapter.py +124 -0
  64. tiles_ai-0.1.0/tests/test_oauth.py +176 -0
  65. tiles_ai-0.1.0/tests/test_pack_handlers.py +165 -0
  66. tiles_ai-0.1.0/tests/test_permissions.py +30 -0
  67. tiles_ai-0.1.0/tests/test_registry.py +232 -0
  68. tiles_ai-0.1.0/tests/test_runtime_reference.py +130 -0
  69. tiles_ai-0.1.0/tests/test_scaffold.py +168 -0
  70. tiles_ai-0.1.0/tests/test_scheduler.py +91 -0
  71. tiles_ai-0.1.0/tests/test_tile_manifest.py +74 -0
  72. tiles_ai-0.1.0/tests/test_validation.py +84 -0
  73. tiles_ai-0.1.0/tests/test_yaml_loading.py +64 -0
tiles_ai-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Tiles AI contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,162 @@
1
+ Metadata-Version: 2.4
2
+ Name: tiles-ai
3
+ Version: 0.1.0
4
+ Summary: Tiles AI — a phone-home-screen control plane for AI agents. Register, activate, observe, and permission tiles.
5
+ Author-email: Manav Singhai <manavsinghai11@gmail.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/Manav020201/tiles-ai
8
+ Project-URL: Repository, https://github.com/Manav020201/tiles-ai
9
+ Project-URL: Issues, https://github.com/Manav020201/tiles-ai/issues
10
+ Keywords: ai,agents,llm,mcp,control-plane,fastapi
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
18
+ Requires-Python: >=3.11
19
+ Description-Content-Type: text/markdown
20
+ License-File: LICENSE
21
+ Requires-Dist: pydantic>=2.6
22
+ Requires-Dist: pyyaml>=6.0
23
+ Requires-Dist: fastapi>=0.110
24
+ Requires-Dist: uvicorn>=0.27
25
+ Requires-Dist: watchfiles>=0.21
26
+ Provides-Extra: dev
27
+ Requires-Dist: pytest>=7.4; extra == "dev"
28
+ Requires-Dist: httpx>=0.27; extra == "dev"
29
+ Requires-Dist: ruff>=0.6; extra == "dev"
30
+ Dynamic: license-file
31
+
32
+ # 🟩 Tiles AI
33
+
34
+ **A home screen for your AI agents.** Lay your agents out as tiles on a board,
35
+ tap one to run it, and stay in control of anything it does.
36
+
37
+ [![CI](https://github.com/Manav020201/tiles-ai/actions/workflows/ci.yml/badge.svg)](https://github.com/Manav020201/tiles-ai/actions/workflows/ci.yml)
38
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
39
+
40
+ ![Tiles AI — a home screen for your AI agents](docs/hero.svg)
41
+
42
+ ## What is it?
43
+
44
+ Think of your phone's home screen — but every app is an AI agent.
45
+
46
+ - A **board** is a grid of **tiles**.
47
+ - Each **tile** is one agent that does a single job — *"summarize my inbox"*,
48
+ *"tidy this folder"*, *"draft a reply"*.
49
+ - Tap a tile and it turns **green** — running.
50
+
51
+ Tiles AI handles the parts *around* an agent — running it, watching it, asking
52
+ your permission before it acts, and connecting it to your apps. You bring the
53
+ agent's logic (plain Python, or wrap LangChain / CrewAI / the OpenAI SDK).
54
+
55
+ It's built for **developers learning to build agents**: start from a ready-made
56
+ board and add your own tiles right from the screen.
57
+
58
+ ## Quick start
59
+
60
+ You'll need **Python 3.11+** and **Node 18+** (to build the board once).
61
+
62
+ ```bash
63
+ git clone https://github.com/Manav020201/tiles-ai && cd tiles-ai
64
+ pip install -e ".[dev]"
65
+ npm --prefix frontend install && npm --prefix frontend run build
66
+ tiles up --echo
67
+ ```
68
+
69
+ Open **http://127.0.0.1:8000** — you'll see a starter board running on a free
70
+ offline brain (no API key needed). When you're ready for a real model, run
71
+ `tiles up` and connect a brain from the screen.
72
+
73
+ > _PyPI packaging is ready; once published this becomes `pipx install tiles-ai && tiles up`._
74
+
75
+ ## What you can do
76
+
77
+ **Right away — no API keys:**
78
+
79
+ - **Instant tiles** — Ask, Summarize, Translate, Extract, Brainstorm.
80
+ - **Your files** — summarize a folder, find files, or tidy a folder (it *proposes*
81
+ the moves; you approve them).
82
+
83
+ **Add your apps** — GitHub, Slack, web search, Gmail, and anything with an
84
+ [MCP](https://modelcontextprotocol.io) server (local or remote), via an API token
85
+ or OAuth.
86
+
87
+ **All from the board — no editor required:**
88
+
89
+ | | |
90
+ |---|---|
91
+ | ➕ **Create a tile** | fill a form; Tiles writes the files for you |
92
+ | 🔌 **Connect an app** | paste its command; Tiles reads its tools automatically |
93
+ | 🧠 **Choose your model** | cloud (Anthropic / OpenAI) or local (Ollama) |
94
+ | ✅ **Approve before it acts** | anything that writes or sends waits for your OK |
95
+ | ⏱ **Schedule & chain** | run a tile on a timer, or feed one tile's output into another |
96
+ | 👀 **Observe** | live activity per tile, and clear errors as you go |
97
+
98
+ ## How it works
99
+
100
+ Three ideas:
101
+
102
+ | Concept | What it is |
103
+ |---|---|
104
+ | **Tile** | an agent — a model + instructions + a permission level. The thing you tap. |
105
+ | **Connector** | a reusable connection to one app (e.g. GitHub). Many tiles can share it. |
106
+ | **Brain** | the model that powers tiles. Set one once; a tile can pin its own. |
107
+
108
+ **Permissions are built in.** Every tile has a level: **read-only** (never acts),
109
+ **draft** (proposes actions you approve), or **autonomous**. Green means
110
+ *running*, not *unsupervised*.
111
+
112
+ <details>
113
+ <summary>Architecture (for the curious)</summary>
114
+
115
+ ```
116
+ React board ──HTTP/SSE──▶ FastAPI ──▶ runtime ──▶ permission gate ──▶ connector ──▶ app
117
+ └──▶ model adapter ──▶ brain (cloud / local)
118
+ ```
119
+
120
+ Connectors talk to apps over [MCP](https://modelcontextprotocol.io) (stdio or
121
+ HTTP). The full design is in [SPEC.md](SPEC.md).
122
+ </details>
123
+
124
+ ## Make your own tile
125
+
126
+ The easy way: click **➕ New tile** on the board, fill the form, and open the
127
+ generated `handler.py` to customize.
128
+
129
+ In code, a tile is a small folder with a manifest and one method:
130
+
131
+ ```python
132
+ from tiles_ai.contracts import ActionPlan, Tile
133
+
134
+ class MyTile(Tile):
135
+ async def run(self, input, context) -> ActionPlan:
136
+ answer = await context.model.complete(str(input))
137
+ return ActionPlan(result=answer)
138
+ ```
139
+
140
+ Full guide, including how to connect a new app: **[docs/AUTHORING.md](docs/AUTHORING.md)**.
141
+
142
+ ## Docs
143
+
144
+ - **[SPEC.md](SPEC.md)** — the design and the tile contract
145
+ - **[docs/AUTHORING.md](docs/AUTHORING.md)** — build a tile or a connector
146
+ - **[CONTRIBUTING.md](CONTRIBUTING.md)** — dev setup and how to help
147
+ - **[CHANGELOG.md](CHANGELOG.md)** — what's new
148
+
149
+ ## Status
150
+
151
+ Active development; well-tested with CI on Python 3.11 and 3.12.
152
+
153
+ **Already here:** tiles **chain** (sequential flows), run on an **interval
154
+ schedule**, and connect via **OAuth** (authorization-code) or API keys.
155
+
156
+ **Refinements still to come:** branching / fan-out flows (only linear chains
157
+ today) · cron and event triggers (only intervals today) · automatic OAuth token
158
+ refresh. Out of scope for now: hosting and multi-user.
159
+
160
+ ## License
161
+
162
+ [MIT](LICENSE).
@@ -0,0 +1,131 @@
1
+ # 🟩 Tiles AI
2
+
3
+ **A home screen for your AI agents.** Lay your agents out as tiles on a board,
4
+ tap one to run it, and stay in control of anything it does.
5
+
6
+ [![CI](https://github.com/Manav020201/tiles-ai/actions/workflows/ci.yml/badge.svg)](https://github.com/Manav020201/tiles-ai/actions/workflows/ci.yml)
7
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
8
+
9
+ ![Tiles AI — a home screen for your AI agents](docs/hero.svg)
10
+
11
+ ## What is it?
12
+
13
+ Think of your phone's home screen — but every app is an AI agent.
14
+
15
+ - A **board** is a grid of **tiles**.
16
+ - Each **tile** is one agent that does a single job — *"summarize my inbox"*,
17
+ *"tidy this folder"*, *"draft a reply"*.
18
+ - Tap a tile and it turns **green** — running.
19
+
20
+ Tiles AI handles the parts *around* an agent — running it, watching it, asking
21
+ your permission before it acts, and connecting it to your apps. You bring the
22
+ agent's logic (plain Python, or wrap LangChain / CrewAI / the OpenAI SDK).
23
+
24
+ It's built for **developers learning to build agents**: start from a ready-made
25
+ board and add your own tiles right from the screen.
26
+
27
+ ## Quick start
28
+
29
+ You'll need **Python 3.11+** and **Node 18+** (to build the board once).
30
+
31
+ ```bash
32
+ git clone https://github.com/Manav020201/tiles-ai && cd tiles-ai
33
+ pip install -e ".[dev]"
34
+ npm --prefix frontend install && npm --prefix frontend run build
35
+ tiles up --echo
36
+ ```
37
+
38
+ Open **http://127.0.0.1:8000** — you'll see a starter board running on a free
39
+ offline brain (no API key needed). When you're ready for a real model, run
40
+ `tiles up` and connect a brain from the screen.
41
+
42
+ > _PyPI packaging is ready; once published this becomes `pipx install tiles-ai && tiles up`._
43
+
44
+ ## What you can do
45
+
46
+ **Right away — no API keys:**
47
+
48
+ - **Instant tiles** — Ask, Summarize, Translate, Extract, Brainstorm.
49
+ - **Your files** — summarize a folder, find files, or tidy a folder (it *proposes*
50
+ the moves; you approve them).
51
+
52
+ **Add your apps** — GitHub, Slack, web search, Gmail, and anything with an
53
+ [MCP](https://modelcontextprotocol.io) server (local or remote), via an API token
54
+ or OAuth.
55
+
56
+ **All from the board — no editor required:**
57
+
58
+ | | |
59
+ |---|---|
60
+ | ➕ **Create a tile** | fill a form; Tiles writes the files for you |
61
+ | 🔌 **Connect an app** | paste its command; Tiles reads its tools automatically |
62
+ | 🧠 **Choose your model** | cloud (Anthropic / OpenAI) or local (Ollama) |
63
+ | ✅ **Approve before it acts** | anything that writes or sends waits for your OK |
64
+ | ⏱ **Schedule & chain** | run a tile on a timer, or feed one tile's output into another |
65
+ | 👀 **Observe** | live activity per tile, and clear errors as you go |
66
+
67
+ ## How it works
68
+
69
+ Three ideas:
70
+
71
+ | Concept | What it is |
72
+ |---|---|
73
+ | **Tile** | an agent — a model + instructions + a permission level. The thing you tap. |
74
+ | **Connector** | a reusable connection to one app (e.g. GitHub). Many tiles can share it. |
75
+ | **Brain** | the model that powers tiles. Set one once; a tile can pin its own. |
76
+
77
+ **Permissions are built in.** Every tile has a level: **read-only** (never acts),
78
+ **draft** (proposes actions you approve), or **autonomous**. Green means
79
+ *running*, not *unsupervised*.
80
+
81
+ <details>
82
+ <summary>Architecture (for the curious)</summary>
83
+
84
+ ```
85
+ React board ──HTTP/SSE──▶ FastAPI ──▶ runtime ──▶ permission gate ──▶ connector ──▶ app
86
+ └──▶ model adapter ──▶ brain (cloud / local)
87
+ ```
88
+
89
+ Connectors talk to apps over [MCP](https://modelcontextprotocol.io) (stdio or
90
+ HTTP). The full design is in [SPEC.md](SPEC.md).
91
+ </details>
92
+
93
+ ## Make your own tile
94
+
95
+ The easy way: click **➕ New tile** on the board, fill the form, and open the
96
+ generated `handler.py` to customize.
97
+
98
+ In code, a tile is a small folder with a manifest and one method:
99
+
100
+ ```python
101
+ from tiles_ai.contracts import ActionPlan, Tile
102
+
103
+ class MyTile(Tile):
104
+ async def run(self, input, context) -> ActionPlan:
105
+ answer = await context.model.complete(str(input))
106
+ return ActionPlan(result=answer)
107
+ ```
108
+
109
+ Full guide, including how to connect a new app: **[docs/AUTHORING.md](docs/AUTHORING.md)**.
110
+
111
+ ## Docs
112
+
113
+ - **[SPEC.md](SPEC.md)** — the design and the tile contract
114
+ - **[docs/AUTHORING.md](docs/AUTHORING.md)** — build a tile or a connector
115
+ - **[CONTRIBUTING.md](CONTRIBUTING.md)** — dev setup and how to help
116
+ - **[CHANGELOG.md](CHANGELOG.md)** — what's new
117
+
118
+ ## Status
119
+
120
+ Active development; well-tested with CI on Python 3.11 and 3.12.
121
+
122
+ **Already here:** tiles **chain** (sequential flows), run on an **interval
123
+ schedule**, and connect via **OAuth** (authorization-code) or API keys.
124
+
125
+ **Refinements still to come:** branching / fan-out flows (only linear chains
126
+ today) · cron and event triggers (only intervals today) · automatic OAuth token
127
+ refresh. Out of scope for now: hosting and multi-user.
128
+
129
+ ## License
130
+
131
+ [MIT](LICENSE).
@@ -0,0 +1,72 @@
1
+ [build-system]
2
+ requires = ["setuptools>=68"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "tiles-ai"
7
+ version = "0.1.0"
8
+ description = "Tiles AI — a phone-home-screen control plane for AI agents. Register, activate, observe, and permission tiles."
9
+ readme = "README.md"
10
+ license = { text = "MIT" }
11
+ requires-python = ">=3.11"
12
+ authors = [{ name = "Manav Singhai", email = "manavsinghai11@gmail.com" }]
13
+ keywords = ["ai", "agents", "llm", "mcp", "control-plane", "fastapi"]
14
+ classifiers = [
15
+ "Development Status :: 4 - Beta",
16
+ "Intended Audience :: Developers",
17
+ "License :: OSI Approved :: MIT License",
18
+ "Programming Language :: Python :: 3",
19
+ "Programming Language :: Python :: 3.11",
20
+ "Programming Language :: Python :: 3.12",
21
+ "Topic :: Software Development :: Libraries :: Application Frameworks",
22
+ ]
23
+ dependencies = [
24
+ "pydantic>=2.6",
25
+ "pyyaml>=6.0",
26
+ "fastapi>=0.110",
27
+ "uvicorn>=0.27",
28
+ "watchfiles>=0.21", # enables `tiles up --reload` to watch *.yaml manifests too
29
+ ]
30
+
31
+ [project.optional-dependencies]
32
+ dev = [
33
+ "pytest>=7.4",
34
+ "httpx>=0.27",
35
+ "ruff>=0.6",
36
+ ]
37
+
38
+ [project.scripts]
39
+ tiles = "tiles_ai.cli:main"
40
+
41
+ [project.urls]
42
+ Homepage = "https://github.com/Manav020201/tiles-ai"
43
+ Repository = "https://github.com/Manav020201/tiles-ai"
44
+ Issues = "https://github.com/Manav020201/tiles-ai/issues"
45
+
46
+ [tool.ruff]
47
+ target-version = "py311"
48
+ line-length = 100
49
+ src = ["src", "tests"]
50
+
51
+ [tool.ruff.lint]
52
+ select = ["E", "F", "I", "UP", "B", "SIM"]
53
+ ignore = [
54
+ "E501", # line length — left to the author
55
+ "B008", # FastAPI Depends-in-defaults pattern
56
+ "UP042", # keep the intentional (str, Enum) mixin over StrEnum
57
+ ]
58
+
59
+ [tool.ruff.lint.per-file-ignores]
60
+ "tests/*" = ["B011"]
61
+
62
+ [tool.setuptools.packages.find]
63
+ where = ["src"]
64
+
65
+ [tool.setuptools.package-data]
66
+ # py.typed ships type info (PEP 561). web/** is the built board, bundled into the
67
+ # wheel by the release build (see RELEASING.md).
68
+ tiles_ai = ["py.typed", "web/**/*"]
69
+
70
+ [tool.pytest.ini_options]
71
+ testpaths = ["tests"]
72
+ pythonpath = ["src"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,7 @@
1
+ """Tiles AI — a phone-home-screen control plane for AI agents.
2
+
3
+ A board is a grid of tiles; each tile is an agent. Register → activate → observe
4
+ → permission → (later) compose. See `tiles_ai.contracts` and SPEC.md.
5
+ """
6
+
7
+ __version__ = "0.1.0"
@@ -0,0 +1,11 @@
1
+ """The HTTP control-plane API (FastAPI) + SSE event stream.
2
+
3
+ `create_app(root=..., brain_store=..., model_adapter=...)` returns a FastAPI app
4
+ wired to a board. See SPEC.md "Build order" phase 4.
5
+ """
6
+
7
+ from __future__ import annotations
8
+
9
+ from .app import create_app, format_sse
10
+
11
+ __all__ = ["create_app", "format_sse"]
@@ -0,0 +1,47 @@
1
+ """Run the Tiles AI API: `python -m tiles_ai.api`.
2
+
3
+ Discovers connectors/tiles from TILES_ROOT (default: cwd) and loads the brain
4
+ store from TILES_BRAIN (default: brain.local.yaml). The brain store is created
5
+ empty if the file is absent — the onboarding flow writes it.
6
+ """
7
+
8
+ from __future__ import annotations
9
+
10
+ import os
11
+
12
+ import uvicorn
13
+
14
+ from ..contracts import HostedProvider
15
+ from ..model import BrainStore, ModelAdapter, echo_client_factory
16
+ from .app import create_app
17
+
18
+
19
+ def main() -> None:
20
+ root = os.environ.get("TILES_ROOT", ".")
21
+
22
+ if os.environ.get("TILES_ECHO"):
23
+ # Zero-setup demo: an offline echo brain so the whole board works without
24
+ # keys or a network. Great for a first look and for contributors.
25
+ store = BrainStore()
26
+ store.add_provider(
27
+ HostedProvider(
28
+ id="demo", provider="anthropic", api_key="demo", model="claude-opus-4-8"
29
+ ),
30
+ make_default=True,
31
+ )
32
+ adapter = ModelAdapter(store, client_factory=echo_client_factory)
33
+ app = create_app(root=root, brain_store=store, model_adapter=adapter)
34
+ else:
35
+ brain_path = os.environ.get("TILES_BRAIN", "brain.local.yaml")
36
+ store = BrainStore.load(brain_path)
37
+ app = create_app(root=root, brain_store=store)
38
+
39
+ uvicorn.run(
40
+ app,
41
+ host=os.environ.get("TILES_HOST", "127.0.0.1"),
42
+ port=int(os.environ.get("TILES_PORT", "8000")),
43
+ )
44
+
45
+
46
+ if __name__ == "__main__":
47
+ main()