SaC — Software as Content

السجل الرسمي أدوات المطورين

Give your AI agent the ability to respond with live, interactive apps that evolve.

التثبيت

أضف هذا إلى إعدادات MCP في عميلك (Claude Desktop: claude_desktop_config.json، وCursor: ‏.cursor/mcp.json، ويستخدم VS Code وغيره الصيغة نفسها «mcpServers»).

PYPI package sac-sdk
Claude Code
claude mcp add sac-software-as-content -e 'SAC_API_KEY=<your sac_api_key>' -e 'SAC_API_BASE=<SAC_API_BASE>' -e 'SAC_MODEL=<SAC_MODEL>' -e 'SAC_SEARCH_API_KEY=<your sac_search_api_key>' -- uvx sac-sdk==0.1.2
إعداد JSON (Claude Desktop وCursor وVS Code)
{
    "mcpServers": {
        "sac-software-as-content": {
            "command": "uvx",
            "args": [
                "sac-sdk==0.1.2"
            ],
            "env": {
                "SAC_API_KEY": "<your sac_api_key>",
                "SAC_API_BASE": "<SAC_API_BASE>",
                "SAC_MODEL": "<SAC_MODEL>",
                "SAC_SEARCH_API_KEY": "<your sac_search_api_key>"
            }
        }
    }
}

متغيرات البيئة

  • SAC_API_KEY إلزامي سري API key for the LLM provider (OpenRouter, Anthropic, OpenAI, etc.)
  • SAC_API_BASE Custom API endpoint for OpenAI-compatible providers
  • SAC_MODEL Override the default generation model
  • SAC_SEARCH_API_KEY سري Tavily API key for web search in generated apps

التوثيق

مأخوذ من ملف README للمشروع على GitHub ويُحدَّث أسبوعيًا. تفتح الروابط على GitHub.

المحتويات
  1. SaC SDK
  2. Quickstart
  3. Connect to your agent
  4. How it works
  5. When to use SaC
  6. Customize
  7. Architecture
  8. Project status
  9. Contributing
  10. License

SaC SDK

Interaction layer between you and your agents.


AI agents can reason, code, and call APIs — but when they need to communicate back to you, all they have is text. SaC (Software as Content) is the missing interaction layer: your agent responds with a live, persistent, interactive app that evolves as the conversation continues. Not a screenshot, not a markdown wall — a real UI you click, explore, and shape together with your agent.

Quickstart

1. Install
pip install sac-sdk
2. Run
sac serve

First time? It'll ask for your API key and save it. Then open **http://localhost:18420**, type "3-day Tokyo trip planner with budget", and watch a live React app stream in. Click buttons. Ask it to evolve. This is SaC running a built-in agent loop — no external agent needed.

Connect to your agent

SaC plugs into the agent you already use — through MCP, Skill, or code.

Claude Code (MCP)
pip install sac-sdk
sac setup claude-code        # registers SaC as an MCP server

Restart Claude Code. Then try:

"Help me understand this codebase using a visualized and interactive app using SaC MCP."

Setup details →

Codex (Skill)
pip install sac-sdk
sac setup codex              # installs the SaC skill
sac serve                    # keep running in a terminal

Setup details →

OpenClaw (Skill)
pip install sac-sdk
sac setup openclaw           # installs the SaC skill
sac serve                    # keep running in a terminal

Setup details →

Python (build your own agent)
from sac import SaC

sac = SaC()
conv = sac.conversation()
app = await conv.generate("3-day Tokyo itinerary")
print(app.url)   # user opens this
# app.code contains the generated TSX

How it works

Your agent ──▶ SaC ──▶ User sees a live app at a URL
                   ◀── User clicks a button / types a message
Your agent ──▶ SaC ──▶ Same URL, app evolves in place
                   ◀── ...

One URL, one conversation. The agent doesn't generate a new page every turn — it evolves the existing app. Users keep their context; the agent keeps its state.

Two channels, one loop: every response is either a UI update (the app evolves) or a chat reply (a text bubble). Users can click buttons in the app OR type in the chat — both go back to the agent through the same callback.

When to use SaC

SaC is for tasks where exploration and interaction matter more than a final answer.

Good fit: trip planning, data analysis dashboards, comparison shopping, project planning, research, financial reviews, decision aids, internal tools

Not the right tool for: simple Q&A, one-shot automations ("set an alarm"), conversations that are purely text

Customize

Every layer is pluggable:

from sac import SaC, FileStore

sac = SaC(
    llm=YourLLMProvider(...),       # any class implementing LLMProvider
    search=YourSearchProvider(...), # any class implementing SearchProvider
    store=FileStore(".sac"),
)

Prompts live in src/sac/runtime/prompts/ and the default design system is in src/sac/renderer/design-systems/default/.

Architecture

src/sac/
├── sac.py / conversation.py    Entry + Conversation primitive
├── runtime/                    Generate + Evolve pipeline, prompts, providers
├── server/
│   ├── http/                   FastAPI + SSE streaming + viewer
│   └── mcp/                    MCP stdio server (Claude Code integration)
└── renderer/                   iframe sandbox + design system

Full architecture →

Project status

v0.1.2 — alpha. The core protocol (generate → evolve → callback loop) is stable and runs in production at sac.dynsoft.ai. The SDK surface is being polished toward v1.0.

Contributing

Issues and PRs welcome. Highest-leverage contributions right now:

For local dev: pip install -e .

License

Apache-2.0

الأسئلة الشائعة

ما هو SaC — Software as Content؟

Give your AI agent the ability to respond with live, interactive apps that evolve.

كيف أثبّت SaC — Software as Content؟

يعمل على جهازك. في Claude Code: claude mcp add sac-software-as-content -e 'SAC_API_KEY=<your sac_api_key>' -e 'SAC_API_BASE=<SAC_API_BASE>' -e 'SAC_MODEL=<SAC_MODEL>' -e 'SAC_SEARCH_API_KEY=<your sac_search_api_key>' -- uvx sac-sdk==0.1.2. وفي العملاء الآخرين، الصق إعداد JSON من هذه الصفحة في إعدادات MCP الخاصة بهم.

هل يحتاج SaC — Software as Content إلى مفتاح API؟

نعم. يتطلب SAC_API_KEY, SAC_SEARCH_API_KEY، وتضبطها في إعداداته.

هل SaC — Software as Content مفتوح المصدر؟

نعم. شيفرته متاحة على GitHub بترخيص Apache-2.0.

من يصون SaC — Software as Content؟

ينشره Software-As-Content. يدرجه AI.tn لكنه لا يصونه ولا يوصي به.

من سجل MCP الرسمي. الإدراج ليس توصية: راجع شيفرة الخادم وصلاحياته قبل منحه الوصول إلى بياناتك.