Output Plugins
Output type plugins define structured schemas for task output validation. Tasks reference these types to ensure the assistant produces correctly formatted content.
Directory Layout
my_outputs/
manifest.py
outputs.pyExample
manifest.py:
from app.plugins.base import PluginManifest, PluginType
manifest = PluginManifest(
name="my_outputs",
plugin_type=PluginType.OUTPUT,
version="1.0.0",
description="Custom output type definitions",
author="Your Name",
)outputs.py:
from pydantic import BaseModel
from app.plugins.base import OutputType
class NewsletterSchema(BaseModel):
"""Structured output for email newsletters."""
title: str
subject_line: str
body: str
preview_text: str
class SocialPostSchema(BaseModel):
"""Structured output for social media posts."""
platform: str
text: str
hashtags: list[str] = []
CORE_OUTPUT_TYPES: list[OutputType] = [
OutputType(
name="newsletter",
label="Newsletter",
description="An email newsletter with subject line and preview text.",
schema=NewsletterSchema,
),
OutputType(
name="social_post",
label="Social Post",
description="A social media post with platform and hashtags.",
schema=SocialPostSchema,
),
]How It Works
- The output types list must be named
CORE_OUTPUT_TYPES - Each
OutputTypehas a PydanticBaseModelschema that TeamWeb AI uses to validate the assistant’s structured output - Output names must be unique across all plugins
- Output plugins do not require a
config_schemasince there is nothing to configure
OutputType Fields
| Field | Description |
|---|---|
name | Unique identifier (e.g. "newsletter") |
label | Human-readable display name (e.g. “Newsletter”) |
description | Short description shown when selecting an output type |
schema | Pydantic BaseModel class for validating the output |
Built-in Output Types
TeamWeb AI ships with these output types in the core_outputs plugin: blog_post, file, research, summary, proofreading, image, decision, and freeform. Custom output plugins can add to this list but should avoid reusing these names.