meshflow init — your first 60 seconds

One command.
Production-ready.

Run meshflow init and get a fully scaffolded project — main.py, .env.example, README.md, a governed Team template, policy mode, and run/replay commands. The golden standard, from day one.

$meshflow init my-project
or: pip install meshflow && meshflow init my-project
What it looks like when you run it
Terminal — bash
$ meshflow init my-project
How it works
Four things happen in under 60 seconds. All of them matter.
01
Interactive setup
CLI asks for project name, template, and policy mode: dev, standard, regulated, or legal-critical.
02
Project scaffolded
A focused project is created with main.py, .env.example, and README.md. No pretend files, no empty folders.
03
Governed team ready
The selected template wires real Agent, Team, tool, RiskTier, and policy APIs from the MeshFlow package.
04
Run and replay
Add your provider key, run python main.py, then inspect history with meshflow logs and meshflow replay.
What you get
A small, honest scaffold that matches the Python package: one runnable agent team, one environment file, and one project runbook.
main.py agent team .env.example README commands policy mode 4 templates run/replay logs Python CLI Apache 2.0
my-project/
main.pygoverned team
.env.exampleprovider keys
README.mdrunbook
What's inside each file
Every file is real, working code. Not placeholders.
python
"""Research pipeline - my-project."""
import asyncio
from meshflow import Agent, Team, tool, RiskTier

@tool(name="search", description="Search for information", risk=RiskTier.READ_ONLY)
async def search(query: str) -> str:
    # Replace with Tavily, Exa, SerpAPI, or another search API.
    return f"[simulated] Results for: {query}"

planner = Agent(name="planner", role="planner", memory=True)
researcher = Agent(name="researcher", role="researcher", tools=[search], memory=True)
writer = Agent(name="writer", role="executor")
critic = Agent(name="critic", role="critic")

team = Team(
    name="my-project",
    agents=[planner, researcher, writer, critic],
    pattern="supervised",
    policy="standard",
)

async def main() -> None:
    result = await team.run(
        "Research and summarise the latest in AI agent frameworks.",
    )
    print("\n" + "=" * 60)
    print(result.output)
    print(f"\nrun_id={result.run_id}  cost=${result.total_cost_usd:.4f}")

if __name__ == "__main__":
    asyncio.run(main())
dotenv
markdown
Every default is intentional
Nothing in the scaffolded project is accidental. Every choice reflects the golden standard.

Template choice

Pick research, code, legal, or custom. Each template maps to the real Team patterns in the package.

Policy mode

Choose dev, standard, regulated, or legal-critical so the generated Team starts with the right governance posture.

Provider env

.env.example uses ANTHROPIC_API_KEY and leaves optional ledger and OpenTelemetry settings commented.

Run ledger

The README points to meshflow logs and meshflow replay, matching the CLI commands available in the package.

HITL commands

Approval and resume commands are included for workflows that pause on human review gates.

Extend from there

Add tools, skills, memory, guardrails, and compliance profiles directly in main.py as the project grows.

60 seconds to the golden standard

Run it now.

Free forever. Works with Claude Code, Codex, Cursor, and 29 more tools.