cycls 0.0.2.24__py3-none-any.whl β†’ 0.0.2.31__py3-none-any.whl

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.
cycls/theme/index.html ADDED
@@ -0,0 +1,23 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <title>AI Agent</title>
6
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
7
+ <script src="https://cdn.tailwindcss.com?plugins=forms,typography"></script>
8
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/styles/github-dark.min.css"/>
9
+ <link rel="stylesheet" href="https://esm.sh/katex@0.16.8/dist/katex.min.css" />
10
+ <script>
11
+ const HEADER = `{{ header | safe }}`;
12
+ const INTRO = `{{ intro | safe }}`;
13
+ const ORG = "{{ org }}";
14
+ const AUTH = {{ auth | tojson }};
15
+ const PROD = {{ prod | tojson }};
16
+ const PUBLISHABLE_KEY = "{{ pk_live if prod else pk_test }}";
17
+ </script>
18
+ <script type="module" crossorigin src="/assets/index-D0-uI8sw.js"></script>
19
+ </head>
20
+ <body>
21
+ <div id="root"></div>
22
+ </body>
23
+ </html>
@@ -0,0 +1,146 @@
1
+ Metadata-Version: 2.4
2
+ Name: cycls
3
+ Version: 0.0.2.31
4
+ Summary: Cycls SDK
5
+ Author: Mohammed J. AlRujayi
6
+ Author-email: mj@cycls.com
7
+ Requires-Python: >=3.9,<4.0
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: Programming Language :: Python :: 3.9
10
+ Classifier: Programming Language :: Python :: 3.10
11
+ Classifier: Programming Language :: Python :: 3.11
12
+ Classifier: Programming Language :: Python :: 3.12
13
+ Classifier: Programming Language :: Python :: 3.13
14
+ Classifier: Programming Language :: Python :: 3.14
15
+ Requires-Dist: fastapi (>=0.111.0,<0.112.0)
16
+ Requires-Dist: httpx (>=0.27.0,<0.28.0)
17
+ Requires-Dist: jwt (>=1.4.0,<2.0.0)
18
+ Requires-Dist: modal (>=1.1.0,<2.0.0)
19
+ Description-Content-Type: text/markdown
20
+
21
+ <h3 align="center">
22
+ The Distribution SDK for AI Agents.
23
+ </h3>
24
+
25
+ <h4 align="center">
26
+ <a href="https://cycls.com">Website</a> |
27
+ <a href="https://docs.cycls.com">Docs</a>
28
+ </h4>
29
+
30
+ <h4 align="center">
31
+ <a href="https://pypi.python.org/pypi/cycls"><img src="https://img.shields.io/pypi/v/cycls.svg?label=cycls+pypi&color=blueviolet" alt="cycls Python package on PyPi" /></a>
32
+ <a href="https://blog.cycls.com"><img src="https://img.shields.io/badge/newsletter-blueviolet.svg?logo=substack&label=cycls" alt="Cycls newsletter" /></a>
33
+ <a href="https://x.com/cyclsai">
34
+ <img src="https://img.shields.io/twitter/follow/CyclsAI" alt="Cycls Twitter" />
35
+ </a>
36
+ </h4>
37
+
38
+
39
+ # Cycls 🚲
40
+
41
+ `cycls` is a zero-config framework for building and publishing AI agents. With a single decorator and one command, you can deploy your code as a web application complete with a front-end UI and an OpenAI-compatible API endpoint.
42
+
43
+ ### Design Philosophy
44
+ `cycls` is an anti-framework. We treat the boilerplate, config files, and infrastructure that surround modern applications as a bug to be eliminated. A developer's focus is the most valuable resource, and context-switching is its greatest enemy.
45
+
46
+ Our zero-config approach makes your Python script the single source of truth for the entire application. When your code is all you need, you stay focused, iterate faster, and ship with confidence.
47
+
48
+ This philosophy has a powerful side-effect: it makes development genuinely iterative. The self-contained nature of an agent encourages you to 'build in cycles'β€”starting simple and adding complexity without penalty. This same simplicity also makes `cycls` an ideal target for code generation. Because the entire application can be expressed in one file, LLMs can write, modify, and reason about `cycls` agents far more effectively than with traditional frameworks. It's a seamless interface for both human and machine.
49
+
50
+
51
+ ## Key Features
52
+
53
+ * ✨ **Zero-Config Deployment:** No YAML or Dockerfiles. `cycls` infers your dependencies, and APIs directly from your Python code.
54
+ * πŸš€ **One-Command Push to Cloud:** Go from local code to a globally scalable, serverless application with a single `agent.push()`.
55
+ * πŸ’» **Instant Local Testing:** Run `agent.run()` to spin up a local server with hot-reloading for rapid iteration and debugging.
56
+ * πŸ€– **OpenAI-Compatible API:** Automatically serves a streaming `/chat/completions` endpoint.
57
+ * 🌐 **Automatic Web UI:** Get a clean, interactive front-end for your agent out of the box, with no front-end code required.
58
+ * πŸ” **Built-in Authentication:** Secure your agent for production with a simple `auth=True` flag that enables JWT-based authentication.
59
+ * πŸ“¦ **Declarative Dependencies:** Define all your `pip`, `apt`, or local file dependencies directly in Python.
60
+
61
+
62
+ ## Installation
63
+
64
+ ```bash
65
+ pip install cycls
66
+ ```
67
+
68
+ ## How to Use
69
+ ### 1. Local Development: "Hello, World!"
70
+
71
+ Create a file main.py. This simple example creates an agent that streams back the message "hi".
72
+
73
+ ```py
74
+ import cycls
75
+
76
+ # Initialize the agent
77
+ agent = cycls.Agent()
78
+
79
+ # Decorate your function to register it as an agent
80
+ @agent()
81
+ async def hello(context):
82
+ yield "hi"
83
+
84
+ agent.run()
85
+ ```
86
+
87
+ Run it from your terminal:
88
+
89
+ ```bash
90
+ python main.py
91
+ ```
92
+ This will start a local server. Open your browser to http://127.0.0.1:8000 to interact with your agent.
93
+
94
+ ### 2. Cloud Deployment: An OpenAI-Powered Agent
95
+ This example creates a more advanced agent that calls the OpenAI API. It will be deployed to the cloud with authentication enabled.
96
+
97
+ ```py
98
+ # deploy.py
99
+ import cycls
100
+
101
+ # Initialize the agent with dependencies and API keys
102
+ agent = cycls.Agent(
103
+ pip=["openai"],
104
+ keys=["ak-<token_id>", "as-<token_secret>"]
105
+ )
106
+
107
+ # A helper function to call the LLM
108
+ async def llm(messages):
109
+ # Import inside the function: 'openai' is only needed at runtime in the container.
110
+ import openai
111
+ client = openai.AsyncOpenAI(api_key="sk-...") # Your OpenAI key
112
+ model = "gpt-4o"
113
+ response = await client.chat.completions.create(
114
+ model=model,
115
+ messages=messages,
116
+ temperature=1.0,
117
+ stream=True
118
+ )
119
+ # Yield the content from the streaming response
120
+ async def event_stream():
121
+ async for chunk in response:
122
+ content = chunk.choices[0].delta.content
123
+ if content:
124
+ yield content
125
+ return event_stream()
126
+
127
+ # Register the function as an agent named "cake" and enable auth
128
+ @agent("cake", auth=True)
129
+ async def cake_agent(context):
130
+ # The context object contains the message history
131
+ return await llm(context.messages)
132
+
133
+ # Deploy the agent to the cloud
134
+ agent.push(prod=True)
135
+ ```
136
+
137
+ Run the deployment command from your terminal:
138
+
139
+ ```bash
140
+ python main.py
141
+ ```
142
+ After a few moments, your agent will be live and accessible at a public URL like https://cake.cycls.ai.
143
+
144
+ ### License
145
+ This project is licensed under the MIT License.
146
+
@@ -0,0 +1,7 @@
1
+ cycls/__init__.py,sha256=D808D5xNP8OdQStdABmWqjGfuDNpVgbJhRo0KRKzo7g,24
2
+ cycls/cycls.py,sha256=qW0KzZ7GLMIJ5tLPYDusvBv0HjKJ1NhfuYVu4BbF8Z4,7434
3
+ cycls/theme/assets/index-D0-uI8sw.js,sha256=aUsqm9HZtEJz38o-0MW12ZVeOlSeKigwc_fYJBntiyI,1068551
4
+ cycls/theme/index.html,sha256=epB4cgSjC7xJOXpVuCwt9r7ivoGvLiXSrxsoOgINw58,895
5
+ cycls-0.0.2.31.dist-info/METADATA,sha256=0ldNTvnYxncmbitmY5oRGIGB1f8abh4uefgp9uEFl3s,5583
6
+ cycls-0.0.2.31.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
7
+ cycls-0.0.2.31.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 1.9.0
2
+ Generator: poetry-core 2.2.1
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
cycls/tuns DELETED
@@ -1,27 +0,0 @@
1
- -----BEGIN OPENSSH PRIVATE KEY-----
2
- b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAABFwAAAAdzc2gtc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Q2ZLuCoN4dv/mDcijAa/+lVtzerj
18
- Ku6XtUREHRfdbKi88j+E7N4CfLW26UmV5xQhRjC8m+b5AAAAgQDoBpIUKoLEVVsWjc6n/e
19
- TGip/qTlzcakODPELOzFK13GCAb/gj/sPxT6tUa382X9jcotgFSYBnO2TFA8gbBSXovWZv
20
- zrXsNwfQBnvKih1Wngsq/bk7MYUvNPC0zomX0/dPi+riNb/5jLSEy5uICY4swMnsYb2Eyw
21
- 5CO+eHC9yiWAAAAIEA6Rx6TvBlMvqt5YbmdOX6LdNi9KNbh4ZmimFJu95IuvYUDol0aDa+
22
- qc85GPBXt/vU6+mD3A1somE2WI2P0sswdYn+g7pbBdItA3NcCuqBFl735bOU6CQ5mygY2P
23
- B/AE43+jeQUFfjBM+lDJNB8adffyBOQBhgmGAqGCq/p6GtgvMAAACBANoxpAHC8Q4cm4No
24
- vsCefODzNUqgsOtgrJXfp3aDVx2pL9Ua71EAh2e5eWvr8YdvmhgU7ophAeEezQqt0nrQYW
25
- xheJQQd1hgm50DY9ssKNcFHd8BkLwGVRbgDfwhPLDektZZqRlbrVsqIBkDurVI764h2v8M
26
- G/fyU3Xv57Ed1vzHAAAAHm1vaGFtbWVkYWxydWpheWlATW9oYW1tZWRzLUFpcgECAwQ=
27
- -----END OPENSSH PRIVATE KEY-----
@@ -1,102 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: cycls
3
- Version: 0.0.2.24
4
- Summary: Cycls SDK
5
- Author: Mohammed Jamal
6
- Author-email: mj@cycls.com
7
- Requires-Python: >=3.8,<4.0
8
- Classifier: Programming Language :: Python :: 3
9
- Classifier: Programming Language :: Python :: 3.8
10
- Classifier: Programming Language :: Python :: 3.9
11
- Classifier: Programming Language :: Python :: 3.10
12
- Classifier: Programming Language :: Python :: 3.11
13
- Classifier: Programming Language :: Python :: 3.12
14
- Requires-Dist: asyncssh (>=2.14.2,<3.0.0)
15
- Requires-Dist: fastapi (>=0.111.0,<0.112.0)
16
- Requires-Dist: httpx (>=0.27.0,<0.28.0)
17
- Description-Content-Type: text/markdown
18
-
19
- <p align="center">
20
- <img src="https://github.com/user-attachments/assets/96bd304d-8116-4bce-8b8f-b08980875ad7" width="800px" alt="Cycls Banner">
21
- </p>
22
-
23
- <h3 align="center">
24
- Generate live apps from code in minutes with built-in memory, <br/>rich hypermedia content, and cross-platform support
25
- </h3>
26
-
27
- <h4 align="center">
28
- <a href="https://cycls.com">Website</a> |
29
- <a href="https://docs.cycls.com">Docs</a> |
30
- <a href="https://docs.cycls.com">Blog</a>
31
- </h4>
32
-
33
- <h4 align="center">
34
- <a href="https://pypi.python.org/pypi/cycls"><img src="https://img.shields.io/pypi/v/cycls.svg?label=cycls+pypi&color=blueviolet" alt="cycls Python package on PyPi" /></a>
35
- <a href="https://blog.cycls.com"><img src="https://img.shields.io/badge/newsletter-blueviolet.svg?logo=substack&label=cycls" alt="Cycls newsletter" /></a>
36
- <a href="https://x.com/cycls_">
37
- <img src="https://img.shields.io/twitter/follow/cycls_" alt="Cycls Twitter" />
38
- </a>
39
- </h4>
40
-
41
-
42
- ## Cycls: The AI App Generator
43
- Cycls[^1] streamlines AI application development by generating apps from high-level descriptions. It eliminates boilerplate, ensures cross-platform compatibility, and manages memory - all from a single codebase.
44
-
45
- With Cycls, you can quickly prototype ideas and then turn them into production apps, while focusing on AI logic and user interactions rather than wrestling with implementation details.
46
-
47
- ## ✨ Core Features
48
- - **Fast App Generation**: Create live web apps from code in minutes
49
- - **Built-in Memory Management**: Integrated state and session management
50
- - **Rich Hypermedia Content**: Support for various media types (text, images, audio, video, interactive elements)
51
- - **Framework Agnostic**: Compatible with a wide range of AI frameworks and models
52
-
53
- ## πŸš€ Quickstart
54
- ### Installation
55
- ```
56
- pip install cycls
57
- ```
58
-
59
- ### Basic usage
60
- ```py
61
- from cycls import Cycls
62
-
63
- cycls = Cycls()
64
-
65
- @cycls("@my-app")
66
- def app():
67
- return "Hello World!"
68
-
69
- cycls.push()
70
- ```
71
- This creates an app named "@my-app" that responds with "Hello World!".
72
-
73
- The `@cycls("@my-app")` decorator registers your app, and `cycls.push()` streams it to Cycls platform.
74
-
75
- To see a live example, visit https://cycls.com/@spark.
76
-
77
- > [!IMPORTANT]
78
- > Use a unique name for your app (like "@my-app"). This is your app's identifier on Cycls.
79
-
80
- > [!NOTE]
81
- > Your apps run on your infrastructure and are streamed in real-time to Cycls.
82
-
83
- ## πŸ“– Documentation
84
- For more detailes and instructions, visit our documentation at [docs.cycls.com](https://docs.cycls.com/).
85
-
86
- ## πŸ—ΊοΈ Roadmap
87
- - **iOS and Android apps**
88
- - **User management**
89
- - **JavaScript SDK**
90
- - **Public API**
91
- - **Cross-app communication**
92
-
93
- ## πŸ™Œ Support
94
- Join our Discord community for support and discussions. You can reach us on:
95
-
96
- - [Join our Discord](https://discord.gg/XbxcTFBf7J)
97
- - [Join our newsletter](https://blog.cycls.com)
98
- - [Follow us on Twitter](https://x.com/cycls_)
99
- - [Email us](mailto:hi@cycls.com)
100
-
101
- [^1]: The name "Cycls" is a play on "cycles," referring to the continuous exchange between AI prompts (generators) and their responses (generated).
102
-
@@ -1,6 +0,0 @@
1
- cycls/__init__.py,sha256=HPPQikt_Trbc4s8XyEOeOjB_JRWXlXIkJuh762nUM_g,24
2
- cycls/cycls.py,sha256=_vCiIUeyDJhC3ANSh5aOSkHw38-k8cuwuYCCmx_yOEg,4731
3
- cycls/tuns,sha256=CT8olxDKOM0cY6r_bbSGtnWyEmEYFVDVHj9ug3gbYHk,1843
4
- cycls-0.0.2.24.dist-info/METADATA,sha256=UsbfVWCgu2-uk_3R4tGui1GxP2Q3WstfSNumcWVezHM,3672
5
- cycls-0.0.2.24.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
6
- cycls-0.0.2.24.dist-info/RECORD,,