Skip to main content Switch to mobile version cycls 0.0.2.154 Single process, per-tenant, serverless, and stateful AI agent runtime.
pip install cycls==0.0.2.154 Copy PIP instructions
Website | Docs | Cycls Cloud | Functions | Volumes | CLI
The deep-stack AI SDK for Python. Every layer of an AI agent (runtime, interface, intelligence, state) as a composable Python primitive, in one file, deployed with one command.
Write an agent. Four primitives compose it. Deploy it with one command.
import cycls image = cycls.Image().copy(".providers.env", ".env") chats = cycls.Volume("my-agent") web = ( cycls.Web() .auth(cycls.Clerk()) .title("My Agent") ) llm = ( cycls.LLM() .model("anthropic/claude-sonnet-4-6") .system("You are a helpful assistant.") .allowed_tools(["Bash", "Editor", "WebSearch", "Canvas"]) ) @cycls.agent(image=image, web=web, volumes={"/workspace": chats}) async def my_agent(context): async for ev in llm.run(context=context): yield ev cycls deploy my_agent.py # live at https://my-agent.cycls.ai That deploy gives you a chat interface, sign-in, per-user files and chats, share links, an OpenAI-compatible API endpoint, and a sandboxed tool loop.
pip install cycls Get an API key at cloud.cycls.com. Full documentation at docs.cycls.com.
Four composable builders, three decorators, one CLI.
my_agent.local() # local Docker + hot-reload (localhost:8080) my_agent.local(watch=False) # local Docker, no watch my_agent.deploy() # production: https://my-agent.cycls.ai Or via the CLI (recommended):
cycls run my_agent.py # local Docker + hot-reload cycls run my_agent.py --remote # cloud dev URL, hot-swap on save cycls deploy my_agent.py # production run is local, --remote is cloud, deploy freezes. The same three words work in Python and on the command line. See docs/function.md.
Agents keep chats, files and credentials on a volume mounted at /workspace, so the decorator requires one:
@cycls.agent(volumes={"/workspace": cycls.Volume("my-agent")}) async def my_agent(context): ... Volumes are named storage, created on first reference, shared by name across deployments, and alive until you delete them explicitly. cycls rm detaches volumes and never touches their data. Full story: docs/volume.md.
One adapter covers Anthropic natively and every OpenAI-compatible endpoint through provider/model strings and a base URL:
cycls.LLM().model("anthropic/claude-sonnet-4-6") # Anthropic, native API cycls.LLM().model("openai/gpt-5.4") # OpenAI # Open weight models cycls.LLM().model("deepseek/deepseek-flash").base_url("https://api.deepseek.com/v1") cycls.LLM().model("moonshotai/kimi-k3").base_url("https://api.moonshot.ai/v1") cycls.LLM().model("zai/glm-5.3").base_url("https://open.bigmodel.cn/api/paas/v4") # Your own inference server cycls.LLM().model("local/kimi-k3").base_url("http://localhost:8000/v1") Reasoning control, tool calls and streaming are unified across providers. .thinking("low"|"medium"|"high"|"adaptive"|None) is translated into each vendor's dialect, and .extra_body() is the escape hatch for anything unmapped.
Built-in tools are enabled by name. Each brings its own prompt guidance.
llm = cycls.LLM().allowed_tools([ "Bash", # shell in a bubblewrap sandbox rooted at the workspace "Editor", # read and edit workspace files "WebSearch", # portable search + fetch, or provider-native "Browser", # a real Chrome session, when a browser service is configured "DataBase", # per-user key-value store "Canvas", # open a finished file in the side panel "Apps", # bundle a source folder into an installable mini app "Suggest", # one follow-up chip above the composer "Ask", # up to three questions on one card ]) Custom tools are bare JSON schemas with async handlers registered via .on(name, handler). The handler's return value flows to both the UI stream and the model's tool_result.
TOOLS = [ { "name": "render_image", "description": "Display an image to the user.", "inputSchema": { "type": "object", "properties": {"src": {"type": "string"}}, "required": ["src"], }, } ] async def render_image(args): return {"type": "image", "src": args["src"]} llm = cycls.LLM().tools(TOOLS).on("render_image", render_image, label=lambda i: i["src"]) A handler can declare a second parameter to receive a ToolContext with the user, workspace and chat id.
A connector is a grant a person makes once, for themselves or their team. Declare it on both builders and the loop attaches the credential server-side when a tool runs.
notion = cycls.OAuth2( "notion", authorize="https://api.notion.com/v1/oauth/authorize", token="https://api.notion.com/v1/oauth/token", client_id=cycls.env("NOTION_CLIENT_ID"), secret=cycls.env("NOTION_CLIENT_SECRET"), scopes=["read_content"], api="https://api.notion.com", scope="either", ) web = cycls.Web().auth(cycls.Clerk()).connectors(notion) llm = cycls.LLM().connectors(notion) cycls.Key takes a pasted key, cycls.Endpoint takes a private URL that is itself the credential. cycls.MCP connects remote MCP servers, and since the harness speaks the protocol itself, MCP works on every provider.
Every tool call is classified as read, write or destructive. Reads always run, writes follow the composer's Auto switch, destructive calls always ask, and an approval binds to the exact arguments shown on the card.
Yield structured objects from an agent body for rich streaming responses:
@cycls.agent(web=web, volumes={"/workspace": chats}) async def demo(context): yield {"type": "thinking", "thinking": "Analyzing the request..."} yield "Here's what I found:\n\n" yield {"type": "table", "headers": ["Name", "Status"]} yield {"type": "table", "row": ["Server 1", "Online"]} yield {"type": "table", "row": ["Server 2", "Offline"]} yield {"type": "code", "code": "result = analyze(data)", "language": "python"} yield {"type": "callout", "callout": "Analysis complete!", "style": "success"} Component Required keys {"type": "text", "text": "..."} a bare string does the same {"type": "thinking", "thinking": "..."} accumulates in a bubble {"type": "code", "code": "...", "language": "..."} accumulates {"type": "table", "headers": [...]} / {"type": "table", "row": [...]} row by row {"type": "status", "status": "..."} replaces the previous status {"type": "callout", "callout": "...", "style": "info|warning|error|success"} one card {"type": "image", "src": "...", "alt": "...", "caption": "..."} one image {"type": "sources", "sources": [{"title", "url", "snippet"}]} citation chips {"type": "ui", "action": "open_plan_modal"} fire-and-forget client action Provider reasoning deltas (Claude extended thinking, OpenAI delta.reasoning) map to the thinking channel automatically, so llm.run() produces thinking bubbles with no extra work.
llm.run() yields these same dicts, so the body passes them through with yield ev. cycls.to_ui(ev) still works and is now an identity function kept for older code.
Auth providers are first-class objects. cycls.Clerk() uses Cycls's hosted Clerk by default; cycls.JWT(...) covers any OIDC provider (Auth0, WorkOS, Supabase, Okta, Firebase).
# Cycls's default Clerk (dev/prod dual mode, auto-switches) web = cycls.Web().auth(cycls.Clerk()) # Custom Clerk tenant web = cycls.Web().auth(cycls.Clerk( jwks_url="https://clerk.mycompany.com/.well-known/jwks.json", )) # Generic OIDC web = cycls.Web().auth(cycls.JWT( jwks_url="https://my-prod.auth0.com/.well-known/jwks.json", dev_jwks_url="https://my-dev.auth0.com/.well-known/jwks.json", )) Workspaces
Every user gets a personal workspace, and organizations can share team workspaces with role-based access. Each workspace is a full context: files, chats, AGENT.md, skills and key-value store.
web = cycls.Web().auth(cycls.Clerk()).workspaces() # any member can create teams web = cycls.Web().auth(cycls.Clerk()).workspaces(create="admin") The active workspace is selected per request with the X-Workspace header. See docs/workspaces.md.
Every turn, the harness reads AGENT.md from the user's workspace root and appends it to the system prompt as user preferences subordinate to your .system() prompt.
Skills are packs of task-specific instructions loaded on demand: only the name and description sit in the system prompt, and the body enters context when the model calls the skill tool.
image = cycls.Image().copy("skills/") llm = cycls.LLM().skills("skills").instructions("AGENT.md") User-created skills in skills/ /SKILL.md join the catalog automatically and win name collisions with shipped skills.
Analytics, Billing and Cost
web = ( cycls.Web() .auth(cycls.Clerk()) .analytics(cycls.PostHog(), cycls.GTM("GTM-ABCD123")) .notifications(cycls.OneSignal(" ")) .cms(brand="https://cms.cycls.ai/agents/my-agent") ) llm = cycls.LLM().price(input=3, output=15, cache_read=0.30, cache_write=6) With prices set, every turn logs its cost:
cycls cost my-agent --by user cycls sql 'SELECT ... FROM logs WHERE JSON_VALUE(json_payload, "$.level") = "usage"' API Endpoints
State routers are installed only when auth is configured. Sessions and files live per user under /workspace/ /.
Agents expose the underlying FastAPI surface via .server for webhooks, health checks, OAuth callbacks, and any custom routes:
from fastapi import Depends @my_agent.server.api_route("/webhook", methods=["POST"]) async def stripe_webhook(request): payload = await request.json() return {"ok": True} @my_agent.server.api_route("/profile", methods=["GET"]) async def profile(user=Depends(my_agent.auth)): return {"user_id": user.id} Declarative Infrastructure
The cycls.Image primitive holds container build config. Every field is chainable, and the resulting Image is passed to any decorator via image=.
Static files served at /public live on the Web primitive:
web = cycls.Web().copy_public("./assets/logo.png", "./downloads/") Functions
For batch jobs, data processing, scheduled work and services without a chat UI:
Add schedule= and the platform fires the deployed function on a cron:
The Bash tool runs inside a bubblewrap sandbox: read-only root, cleared environment, the workspace as the only writable path, the chat store masked, and the cloud metadata range blocked. Network is on by default so curl, pip and git work.
llm = cycls.LLM().sandbox(network=False).bash_timeout(120) A prompt-injected shell can exfiltrate anything it can read, so turn the network off when the agent does not need it. Full threat model: docs/notes/sandbox-security.md.
One file: primitives, code, and infrastructure together
Three decorators: @function, @app, @agent, each strict and composable
Multi-LLM: Anthropic native, OpenAI, open weight models, and your own servers
Managed loop: retries, compaction, sandbox, tool handlers, history, background runs
CLI + SDK: cycls run, cycls deploy, or programmatic .local() / .deploy()
No drift: what you see is what runs
No YAML. No Dockerfiles. No infrastructure repo. The code is the deployment.
Documentation: the full guide, reference and API
Functions: the function interface, end to end
Volumes: persistent, shareable storage for deployments
Cron: fire a deployed function on a schedule
Workspaces: personal and team workspaces for agents
Tutorial: comprehensive guide from basics to advanced
Sandbox security: how the Bash tool is isolated
Office preview: how docx/pptx/xlsx render on the canvas
Examples: working code samples
Author: Mohammed J. AlRujayi
Release files for cycls 0.0.2.154
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
Built distribution (wheel)
Total release size: 13.0 MB
Release files / cycls-0.0.2.154.tar.gz
Release files / cycls-0.0.2.154-py3-none-any.whl
Security for cycls 0.0.2.154
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.
Release history Release notifications | RSS feed
Nov 27, 2026 2 release files No provenance
Nov 16, 2026 2 release files No provenance
Nov 1, 2026 2 release files No provenance
Oct 27, 2026 2 release files No provenance
Oct 26, 2026 2 release files No provenance
Oct 24, 2026 2 release files No provenance
Oct 21, 2026 2 release files No provenance
Sep 23, 2026 2 release files No provenance
Sep 21, 2026 2 release files No provenance
Sep 20, 2026 2 release files No provenance
Jul 22, 2026 2 release files No provenance
Jul 21, 2026 2 release files No provenance
Jul 20, 2026 2 release files No provenance
Jul 14, 2026 2 release files No provenance
Jul 13, 2026 2 release files No provenance
May 24, 2026 2 release files No provenance
May 22, 2026 2 release files No provenance
May 20, 2026 2 release files No provenance
May 18, 2026 2 release files No provenance
May 12, 2026 2 release files No provenance
Apr 18, 2026 2 release files No provenance
Apr 17, 2026 2 release files No provenance
Apr 15, 2026 2 release files No provenance
Apr 14, 2026 2 release files No provenance
Apr 1, 2026 2 release files No provenance
Mar 30, 2026 2 release files No provenance
Mar 3, 2026 2 release files No provenance
Mar 1, 2026 2 release files No provenance
Feb 27, 2026 2 release files No provenance
Feb 23, 2026 2 release files No provenance
Feb 22, 2026 2 release files No provenance
Feb 19, 2026 2 release files No provenance
Feb 18, 2026 2 release files No provenance
Feb 16, 2026 2 release files No provenance
Feb 9, 2026 2 release files No provenance
Feb 7, 2026 2 release files No provenance
Feb 5, 2026 2 release files No provenance
Feb 3, 2026 2 release files No provenance
Feb 1, 2026 2 release files No provenance
Jan 31, 2026 2 release files No provenance
Jan 28, 2026 2 release files No provenance
Jan 26, 2026 2 release files No provenance
Jan 25, 2026 2 release files No provenance
Jan 24, 2026 2 release files No provenance
Jan 21, 2026 2 release files No provenance
Jan 20, 2026 2 release files No provenance
Jan 16, 2026 2 release files No provenance
Jan 15, 2026 2 release files No provenance
Jan 14, 2026 2 release files No provenance
Jan 13, 2026 2 release files No provenance
Jan 12, 2026 2 release files No provenance
Jan 11, 2026 2 release files No provenance
Jan 10, 2026 2 release files No provenance
Jan 8, 2026 2 release files No provenance
Jan 6, 2026 2 release files No provenance
Dec 31, 2025 2 release files No provenance
Dec 29, 2025 2 release files No provenance
Dec 24, 2025 2 release files No provenance
Dec 19, 2025 2 release files No provenance
Dec 16, 2025 2 release files No provenance
Dec 10, 2025 2 release files No provenance
Dec 8, 2025 2 release files No provenance
Dec 2, 2025 2 release files No provenance
Nov 30, 2025 2 release files No provenance
Nov 27, 2025 2 release files No provenance
Nov 24, 2025 2 release files No provenance
Nov 23, 2025 2 release files No provenance
Nov 20, 2025 2 release files No provenance
Nov 17, 2025 2 release files No provenance
Nov 12, 2025 2 release files No provenance
Nov 11, 2025 2 release files No provenance
Nov 7, 2025 2 release files No provenance
Nov 5, 2025 2 release files No provenance
Oct 26, 2025 2 release files No provenance
Sep 29, 2025 2 release files No provenance
Sep 24, 2025 2 release files No provenance
Sep 23, 2025 2 release files No provenance
Sep 22, 2025 2 release files No provenance
Sep 21, 2025 2 release files No provenance
Jul 22, 2025 2 release files No provenance
Aug 29, 2024 2 release files No provenance
Jul 6, 2024 2 release files No provenance
Jun 30, 2024 2 release files No provenance
Jun 25, 2024 2 release files No provenance
Jun 24, 2024 2 release files No provenance
Jun 23, 2024 2 release files No provenance
Jun 17, 2024 2 release files No provenance
Jun 7, 2024 2 release files No provenance
Jun 5, 2024 2 release files No provenance
Jun 3, 2024 2 release files No provenance
Jun 2, 2024 2 release files No provenance
May 18, 2024 2 release files No provenance
Apr 1, 2024 2 release files No provenance
Mar 26, 2024 2 release files No provenance
Mar 21, 2024 2 release files No provenance
"PyPI", "Python Package Index", and the blocks logos are registered trademarks of the Python Software Foundation.
© 2026 Python Software Foundation




