#Start building a Flow
A Flow packages one reusable method so another consumer can understand and invoke it. Start with a small procedure whose input and useful result you can explain. The same boundary can later contain code, Agent judgment, or both; starting with code makes that boundary easy to see.
#Choose a concrete result
For a first method, use an echo or greeting to verify the exchange. Then replace its body with a useful operation, such as validating a supplied record or summarizing supplied text. Keep the operation's own checks in ordinary code.
The package contains FLOW.md and, for executable work, its implementation.
Add resources and schemas when the method needs them. See
Package/1 for the exact metadata and layout.
A description-only package can share readable guidance and resources. Without an implementation, it cannot itself execute a Run/1 invocation.
#Pick your authoring path
SDK availability and host language support are separate. A Python SDK does not establish that Jig can execute Python packages. The specifications and SDKs are prerelease; use the exact revision qualified by your chosen host.
#Recognize the exchange
A handler receives the invocation and returns an outcome with data. Choose your language to see the same method:
With input {"name":"Ada"}, the method's result is
{"outcome":"done","output":{"received":{"name":"Ada"}}}.
The host may wrap that result with its own execution status and diagnostics.
These snippets define handlers; they are not standalone shell invocations. handle
expects a Run/1 host exchange on stdin and stdout. Use the complete setup in
your selected tutorial. Keep raw writes off protocol stdout; the SDK routes
ordinary console diagnostics to stderr after handle starts.
#Make it yours
After the echo works, change the output to include a fixed greeting alongside
received. Run it again and check both values. With Jig, review the source
change before running the new revision.
Then choose the smallest useful method you want someone else to inherit. Document its purpose, inputs, outcomes, and limits in the package. Validate inputs before domain work and return a result whose meaning a consumer can check. A malformed input should have a deliberate, documented response.
#Build further
- See one caller with three implementations in a Jig example.
- Understand the design before choosing a host boundary.
- Add schemas when consumers need exact value validation.
- Use the Run SDK for host-supplied children and capabilities.
- Explore the specifications when implementing a host or SDK.