π§ This feature is not yet released. The documentation below describes planned behavior and may change before launch.
Inputs & Variables
Inputs are how you pass data to an agent when starting a run. They make agents reusable and dynamic β the same agent handles different tasks depending on the input. For marketplace agents, inputs define the form that buyers fill in on app.flymy.ai.
How Inputs Workβ
Input Schema (JSON Schema) Goal Prompt (Handlebars)
β β
βΌ βΌ
βββββββββββββββββββββββ βββββββββββββββββββββββββββββββββββ
β { β β Research {{ topic }} focusing β
β "topic": "string",βββββΆβ on {{ depth }} level analysis. β
β "depth": "string" β β {{#if sources}}Use: {{sources}} β
β } β β {{/if}} β
βββββββββββββββββββββββ βββββββββββββββββββββββββββββββββββ
β β
βΌ βΌ
βββββββββββββββββββββββ βββββββββββββββββββββββββββββββββββ
β Auto-generated β β Resolved goal at runtime: β
β form on flymy.ai β β "Research AI in healthcare β
β [topic: ________] β β focusing on deep analysis." β
β [depth: ________] β β β
βββββββββββββββββββββββ βββββββββββββββββββββββββββββββββββ
Defining Input Schemaβ
Every agent can have an input schema written in JSON Schema. This schema defines:
- What fields the agent expects
- Which fields are required vs. optional
- Data types and validation rules
- Descriptions that become form labels and tooltips
- Python
- JavaScript
agent = client.agents.create(
name="Market Analyst",
goal="...",
tools=["web_search"],
input_schema={
"type": "object",
"properties": {
"company": {
"type": "string",
"description": "Company name to analyze"
},
"industry": {
"type": "string",
"description": "Industry sector",
"enum": ["tech", "healthcare", "finance", "retail", "energy"]
},
"competitors": {
"type": "array",
"items": {"type": "string"},
"description": "List of competitor names to compare against"
},
"time_period": {
"type": "string",
"description": "Analysis time range",
"enum": ["last_quarter", "last_year", "last_3_years"],
"default": "last_year"
},
"include_financials": {
"type": "boolean",
"description": "Include financial data in the report",
"default": False
}
},
"required": ["company", "industry"]
}
)
const agent = await client.agents.create({
name: "Market Analyst",
goal: "...",
tools: ["web_search"],
inputSchema: {
type: "object",
properties: {
company: {
type: "string",
description: "Company name to analyze"
},
industry: {
type: "string",
description: "Industry sector",
enum: ["tech", "healthcare", "finance", "retail", "energy"]
},
competitors: {
type: "array",
items: { type: "string" },
description: "List of competitor names to compare against"
},
time_period: {
type: "string",
description: "Analysis time range",
enum: ["last_quarter", "last_year", "last_3_years"],
default: "last_year"
},
include_financials: {
type: "boolean",
description: "Include financial data in the report",
default: false
}
},
required: ["company", "industry"]
}
});
Supported Field Typesβ
| Type | JSON Schema | Form Control on flymy.ai |
|---|---|---|
| Text | "type": "string" | Text input |
| Long text | "type": "string", "format": "textarea" | Textarea |
| Number | "type": "number" | Number input |
| Boolean | "type": "boolean" | Toggle switch |
| Select | "type": "string", "enum": [...] | Dropdown |
| Array of strings | "type": "array", "items": {"type": "string"} | Tag input |
| URL | "type": "string", "format": "uri" | URL input with validation |
"type": "string", "format": "email" | Email input | |
| File | "type": "string", "format": "file" | File upload (stored in Drive) |
Handlebars Templatingβ
Use Handlebars syntax in your goal prompt to inject input values at runtime. This is what makes agents dynamic.
Basic Variablesβ
agent = client.agents.create(
name="Content Writer",
goal="""Write a {{ content_type }} about {{ topic }}.
Target audience: {{ audience }}.
Tone: {{ tone }}.
Word count: approximately {{ word_count }} words.""",
tools=["web_search"],
input_schema={
"type": "object",
"properties": {
"topic": {"type": "string", "description": "What to write about"},
"content_type": {
"type": "string",
"enum": ["blog post", "whitepaper", "email newsletter", "social thread"],
"description": "Type of content"
},
"audience": {"type": "string", "description": "Target reader persona"},
"tone": {
"type": "string",
"enum": ["professional", "casual", "technical", "persuasive"],
"description": "Writing tone"
},
"word_count": {"type": "number", "description": "Target word count", "default": 800}
},
"required": ["topic", "content_type", "audience"]
}
)
When a user runs this agent with:
{
"topic": "AI agents in enterprise",
"content_type": "blog post",
"audience": "CTOs and VPs of Engineering",
"tone": "professional"
}
The agent receives this resolved goal:
Write a blog post about AI agents in enterprise.
Target audience: CTOs and VPs of Engineering.
Tone: professional.
Word count: approximately 800 words.
Conditional Blocksβ
Use {{#if}} to include instructions only when optional fields are provided:
agent = client.agents.create(
name="Competitive Analysis",
goal="""Perform a competitive analysis of {{ company }} in the {{ industry }} sector.
{{#if competitors}}
Compare specifically against these competitors:
{{#each competitors}}
- {{ this }}
{{/each}}
{{else}}
Identify the top 3-5 competitors automatically.
{{/if}}
{{#if include_financials}}
Include financial metrics: revenue, growth rate, market cap, and funding.
{{/if}}
{{#if focus_areas}}
Pay special attention to these areas:
{{#each focus_areas}}
- {{ this }}
{{/each}}
{{/if}}
Time period: {{ time_period }}.""",
tools=["web_search", "browse_website"],
input_schema={
"type": "object",
"properties": {
"company": {"type": "string", "description": "Company to analyze"},
"industry": {"type": "string", "description": "Industry sector"},
"competitors": {
"type": "array",
"items": {"type": "string"},
"description": "Specific competitors to compare (leave empty to auto-detect)"
},
"include_financials": {
"type": "boolean",
"description": "Include financial data",
"default": False
},
"focus_areas": {
"type": "array",
"items": {"type": "string"},
"description": "Specific areas to focus on"
},
"time_period": {
"type": "string",
"enum": ["last_quarter", "last_year", "last_3_years"],
"default": "last_year"
}
},
"required": ["company", "industry"]
}
)
Iterating Over Arraysβ
Use {{#each}} to loop through array inputs:
goal="""Review the following repositories and provide a security assessment:
{{#each repositories}}
- Repository: {{ this.url }}
{{#if this.branch}}Branch: {{ this.branch }}{{/if}}
{{/each}}
Focus on: dependency vulnerabilities, exposed secrets, insecure configurations."""
Supported Handlebars Helpersβ
| Helper | Usage | Description |
|---|---|---|
{{variable}} | {{ name }} | Insert value |
{{#if}} | {{#if website}}...{{/if}} | Conditional block |
{{else}} | {{#if x}}...{{else}}...{{/if}} | Else branch |
{{#unless}} | {{#unless skip}}...{{/unless}} | Negated conditional |
{{#each}} | {{#each items}}{{this}}{{/each}} | Iterate array |
{{this}} | Inside {{#each}} | Current item |
Output Schemaβ
Define what the agent returns. This is especially important for marketplace agents where consumers expect predictable output.
Freeform Output (Default)β
Without an output schema, the agent returns unstructured text. Fine for personal use.
Structured Outputβ
Define a JSON Schema for the output to ensure consistent, parseable results:
agent = client.agents.create(
name="Lead Scorer",
goal="Score and profile the given sales lead.",
tools=["web_search", "browse_website"],
input_schema={
"type": "object",
"properties": {
"name": {"type": "string"},
"company": {"type": "string"},
"email": {"type": "string"}
},
"required": ["name", "company"]
},
output_schema={
"type": "object",
"properties": {
"score": {
"type": "number",
"description": "Lead quality score 0-100"
},
"profile": {
"type": "object",
"properties": {
"role": {"type": "string"},
"seniority": {"type": "string", "enum": ["junior", "mid", "senior", "executive"]},
"company_size": {"type": "string"}
}
},
"signals": {
"type": "array",
"items": {
"type": "object",
"properties": {
"signal": {"type": "string"},
"sentiment": {"type": "string", "enum": ["positive", "neutral", "negative"]}
}
}
},
"recommended_action": {"type": "string"}
}
}
)
Inputs on the Marketplaceβ
When you publish an agent with an input schema, FlyMy.AI automatically generates:
- Input form β each schema property becomes a form field
- Validation β required fields, type checking, enum dropdowns
- Documentation β field descriptions become help text
- API spec β consumers can also call the agent programmatically
How Schema Maps to the Formβ
{
"company": {
"type": "string",
"description": "Company to analyze"
}
}
β Text input labeled "Company to analyze" (required)
{
"industry": {
"type": "string",
"enum": ["tech", "healthcare", "finance"],
"description": "Industry sector"
}
}
β Dropdown with options: tech, healthcare, finance
{
"competitors": {
"type": "array",
"items": {"type": "string"},
"description": "Competitor names"
}
}
β Tag input β user types names and presses Enter to add
{
"include_financials": {
"type": "boolean",
"default": false,
"description": "Include financial data"
}
}
β Toggle switch (off by default)
Best Practicesβ
- Always add descriptions β they become form labels and API docs
- Use
requiredcarefully β only require what's truly needed; optional fields with good defaults make the agent easier to use - Use
enumfor constrained choices β renders as dropdowns, prevents invalid input - Set
defaultvalues β pre-fill form fields for the best default experience - Match schema to templating β every
{{variable}}in the goal should have a corresponding schema property - Test with minimal input β make sure the agent works well when only required fields are provided
- Add structured output for marketplace β consumers need predictable output to integrate into their workflows
Next Stepsβ
- Runs β understand how input becomes execution
- Publishing to Marketplace β monetize your agents
- Agents β full agent configuration reference