Collaborators Wanted - npx/uvx create-12-factor-agent #61
Replies: 6 comments
-
|
That's awesome. Love the idea. I'll follow this thread so I can contribute. For reference, I think the Svelte team did a great job on their CLI scaffolding tool. It seems to have similar intentions and premises to what you're trying to build here, so there may be something to learn from it. I don't know if this is beyond scope, but since you mentioned a web UI, what I think is a great strength of frameworks compared to coding from zero is the observability. I mostly prefer to write my application logic instead of using the framework's abstraction, as it's not that hard. But their GUI for tracing and debugging seems very valuable and useful. So a low-level scaffolding command that can help me with that would be very interesting. Maybe some basic evals code templates so we can easily build on top would be cool too. |
Beta Was this translation helpful? Give feedback.
-
|
Love this, a couple of thoughts:
flow control
errors & cancellation
scheduling
|
Beta Was this translation helpful? Give feedback.
-
|
Is there a further plan for this? I think it would be fantastic! |
Beta Was this translation helpful? Give feedback.
-
|
I am just going to float this here - But potentially writing the backend with Effect & utilising all the power that comes with it would be really nice. I haven't done this yet but am going to play around with it - Hopefully I have something more useful than just a suggestion in due course! |
Beta Was this translation helpful? Give feedback.
-
|
Sounds cool - Fire off an implementation plan / proposal let's get this thing cookin
…On Fri, Sep 12, 2025 at 7:16 PM, James Wainwright < ***@***.*** > wrote:
I am just going to float this here - But potentially writing the backend
with Effect & utilising all the power that comes with it would be really
nice.
I haven't done this yet but am going to play around with it - Hopefully I
have something more useful than just a suggestion in due course!
—
Reply to this email directly, view it on GitHub (
#61 (comment)
) , or unsubscribe (
https://github.com/notifications/unsubscribe-auth/AA4OZLPKH5LVPKXLOJ7IT4L3SN47FAVCNFSM6AAAAACBY6X36GVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTIMZYHEYDSNI
).
You are receiving this because you authored the thread. Message ID: <humanlayer/12-factor-agents/repo-discussions/61/comments/14389095
@ github. com>
|
Beta Was this translation helpful? Give feedback.
-
从"框架受害者"到"12fa信徒":一个实战者的反馈我们用OpenClaw跑了90天的5-Agent内容工厂,完全符合12fa的原则——但没有用任何框架。以下是一些实战反馈。 为什么我们放弃了框架最初用LangChain,但遇到三个问题:
后来试了CrewAI,更简洁,但:
我们最终选择的路径手动搭建,遵循12fa原则:
代码量比用框架多,但每一行都是我们自己写的——出了问题,15分钟定位,30分钟修复。 对create-12-factor-agent的建议建议1:提供Observability模板 # trace.py template
def log_tool_call(agent_id, tool_name, params, result, latency_ms):
# 写入sqlite,提供简单的web UI查看这比让我们自己从零搭建强太多。 建议2:内置Failure Modes模板 ## Failure Classification
- Timeout → Retry with exponential backoff
- Rate Limit → Wait + notify human
- Context Overflow → Split task + restart
- Hallucination → Validate output + log for review新手用脚手架生成的第一天就能处理常见失败。 建议3:状态管理选项
用户可以根据自己的复杂度选择。 建议4:A2H默认配置
我们的代码结构(供参考)这种结构符合12fa,但比框架给的默认结构更适合我们的一人公司模式。 结语create-12-factor-agent如果做得好,会成为shadcn for AI agents——给开发者一个"可控的起点",而不是"锁死的框架"。 期待TypeScript和Python两个版本! 🦞 妙趣AI | miaoquai.com — 90天12fa实践者 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Placeholder thread for discussing architecture of the
npxanduvxcommands for scaffolding a 12-factor agent template in typescript or python.We welcome ideas and contributions from collaborators here!
Plan / Current State
Notes
Brain dump of my current notes and thoughts on the topic
Generates code + agent loops for different patterns
What is the new tool we are announcing?
Create-12f-agent is a CLI for creating new agents that follow the 12-factor-agents principles. It handles the basic scaffolding for python and typescript projects, and helps bootstrap projects with customizable options for managing prompts, tools, and control flow. Because the goal of 12-factor-agents is NOT to be a framework, it emphasizes creating basic structures, which you will then deeply customize to meet your needs.
You can think of it like a shadcn for AI agents.
What specific problem does this tool solve?
Create-12fa-agent helps you get productive with AI agents. It handles the bootstrapping and repo setup, but leaves you with full control over where you take projects from there.
When compared with an AI framework, 12fa gives you the freedom to build VERY reliable and powerful AI agents, but the tradeoff is there’s more code to write and more setup and glue code to write. Frameworks and libraries require less setup, but give you less freedom.
create-12f-agent lets you leverage the flexibility and power of 12fa patterns, without needing to pay the upfront cost of stitching everything together.
What alternatives are available?
You can use an AI framework like CrewAI or Langchain, which requires less code to get started (and so maybe doesn’t call for a repo-scaffolder), but also gives you less flexibility.
Tools like AgentOps’ https://github.com/AgentOps-AI/AgentStack bootstrap a repo structure for you, but they are primarily focused on getting you started with an existing framework.
Neither of these solutions gives you the flexibility and quality that can be achieved with the 12fa patterns.
What business value does this tool bring?
Ship production-grade agents that are good enough to put into customer hands, while maintaining flexibility and control. Prototype new agents or agentic features quickly.
Who needs this feature and why?
AI engineers, software engineers, and indie hackers who want to build fast.
How does the feature work?
example to draw from in github.com/got-agents/agents
Above the line features:
typescript + npm
npx command to run it
openai
baml for prompts
express / fastapi for endpoints
A2H integration
sqlite storage
dockerfile/docker-compose.yaml
git repo support
Below the line features
web server with chat UI
MCP support w/ Baml
cli flags
cli interactive UI
python + uv
uvx command to create
MCP support w/ other frameworks
other languages (ruby? go? etc)
Other ai providers
making it work with other prompt frameworks (dspy, litellm)
redis storage
other web servers
using external examples for templating
support for bun,pnpm, other ts package managers
support for poetry, other pythong package managers
run an
npxoruvxcommand and pass a directory to use. It will walk you through setup stepsAll options can be passed as flags. Default options are
npx create-12f-agent my-agent \ --typescript \ --openai \ --baml \ --a2h \ --express \ --sqlite \ --dockerOnce the options are chosen, we run a uv sync and print the folder structure
Then we output instructions
.env file is configured from options, with easy toggles/guidance for others e.g.
Prints errors on startup if required keys are not set
unknown - how does it work without humanlayer? Yes - A2H is an open protocol which is implemented by HumanLayer but anyone can build their own
How is the tool adopted?
People read about it on 12fa, baml, humanlayer, etc
They go to the repo and read the readme
They run the npx/uvx command
They edit the env vars
They run the
uv runornpm runordocker compose upcommandThe server prints some output, including a curl command to test it out
other ideas
Beta Was this translation helpful? Give feedback.
All reactions