{"slug": "past-the-readme-demo-conversations-healthcare-data-agents-and-ci-checks", "title": "Past the README Demo: Conversations, Healthcare Data, Agents, and CI Checks", "summary": "Shapecraft, a structured output library from Aviasole Technologies, extends beyond simple prompt-to-schema extraction to handle multi-turn conversations, healthcare data standards, tool calling, agent pipelines, and file validation. The library's core generate() function provides retry and validation guarantees across all these use cases, with built-in FHIR R4 presets and a CLI for CI integration.", "body_md": "\"Extract a name and email from this sentence\" is the easy 10% of structured output. The other 90% is everything that doesn't fit in one prompt, one turn, or one model call. Here are five things [shapecraft](https://github.com/aviasoletechnologies/shapecraft) handles once you're past the basics.\n\nA single message rarely has everything you need. Someone books an appointment over three or four back-and-forth messages, not one. `turnaround`\n\nmode lets the conversation run naturally and validates the *whole transcript* once, at the end, against one schema:\n\n``` js\nimport { generate, openai } from \"@aviasole/shapecraft\";\n\nconst result = await generate(model, BookingSchema, conversationHistory, {\n  turnaround: true,\n});\n```\n\nNo manual \"do I have everything yet?\" tracking, no partial-state bugs, just one validated object once the conversation is actually complete.\n\nHealthcare data has a standard (FHIR R4) and it's not optional if you're integrating with anything real. Built-in presets mean you're not hand-writing a `Patient`\n\nor `Observation`\n\nschema from scratch:\n\n``` js\nimport { generate, openai } from \"@aviasole/shapecraft/fhir\";\nimport { PatientSchema } from \"@aviasole/shapecraft/fhir\";\n\nconst patient = await generate(openai({ model: \"gpt-4o-mini\" }), PatientSchema, clinicalNote);\n```\n\nSame retry/validation guarantees as any other schema, just pre-built to match a spec you'd otherwise have to implement yourself.\n\n\"Is this order still on hold?\" isn't answerable from the prompt alone, it needs an actual lookup. `generateWithTools()`\n\nlets the model call your functions, see the results, and then produce a validated final answer:\n\n``` js\nimport { generateWithTools } from \"@aviasole/shapecraft\";\n\nconst result = await generateWithTools(model, [lookupOrder], AnswerSchema, userQuestion);\n```\n\nThe tool call's arguments are validated before your function ever runs, and the final answer goes through the same schema check as a normal `generate()`\n\ncall.\n\nTriage, then diagnose, then draft a response, each step needs the *previous* step's validated output, not its raw text. `runAgents()`\n\nchains a sequence of `generate()`\n\ncalls, each with its own model and schema, threading validated data forward:\n\n``` js\nimport { defineAgent, runAgents } from \"@aviasole/shapecraft/agentic\";\n\nconst triage = defineAgent({ model, schema: TriageSchema, role: \"triage\" });\nconst diagnose = defineAgent({ model, schema: DiagnosisSchema, role: \"diagnose\" });\n\nconst result = await runAgents([triage, diagnose], input);\n```\n\nEach step keeps its own retry behavior, there's no shared fragile state between them.\n\nSometimes the thing you need to validate isn't fresh model output, it's a file that already exists, maybe from a batch job, a CI pipeline, or someone else's export. The CLI does the same structural check `generate()`\n\nuses internally, from the terminal:\n\n```\nnpx shapecraft validate --schema schema.json --output output.json\n```\n\nExits `0`\n\nand prints a check mark on success, exits `1`\n\nwith the specific violation on failure. Handy for a CI step that shouldn't need its own validation script.\n\nMulti-turn, healthcare presets, tool calling, agent pipelines, file validation, none of these are separate systems bolted on. They're all the same `generate()`\n\nretry-and-validate core, pointed at a different shape of input or output.\n\nWe've published full documentation covering all of this (and everything from the last post too) at ** aviasoletechnologies.github.io/shapecraft** - worth a look if any of these five sound like your actual problem.", "url": "https://wpnews.pro/news/past-the-readme-demo-conversations-healthcare-data-agents-and-ci-checks", "canonical_source": "https://dev.to/yatindavra/past-the-readme-demo-conversations-healthcare-data-agents-and-ci-checks-517p", "published_at": "2026-08-27 06:17:13+00:00", "updated_at": "2026-08-27 06:48:01.790745+00:00", "lang": "en", "topics": ["developer-tools", "ai-tools", "ai-agents", "natural-language-processing"], "entities": ["Shapecraft", "Aviasole Technologies", "FHIR R4", "OpenAI"], "alternates": {"html": "https://wpnews.pro/news/past-the-readme-demo-conversations-healthcare-data-agents-and-ci-checks", "markdown": "https://wpnews.pro/news/past-the-readme-demo-conversations-healthcare-data-agents-and-ci-checks.md", "text": "https://wpnews.pro/news/past-the-readme-demo-conversations-healthcare-data-agents-and-ci-checks.txt", "jsonld": "https://wpnews.pro/news/past-the-readme-demo-conversations-healthcare-data-agents-and-ci-checks.jsonld"}}