Skip to main content

FlyMy.AI Agents

Build and deploy autonomous AI agents on FlyMy.AI. Agents execute complex multi-step tasks in the cloud -- searching the web, processing files, calling APIs -- and deliver results without human intervention.

Two Ways to Use Agents

Build Agents for Yourself

Create agents that automate your workflows. Define a goal, equip the agent with tools, start a run, get results.

from flymyai import AgentClient

client = AgentClient(api_key="fly-***")

# Register tools first - each returns a Tool object with an integer .id
web_search = client.tools.create(mcp_tool="tavily")
browser = client.tools.create(mcp_tool="browser")

agent = client.agents.create(
name="Competitor Monitor",
goal="Track competitor pricing changes and alert me about significant shifts.",
tools=[web_search.id, browser.id]
)

run = client.runs.create(agent_id=agent.id)

result = client.runs.wait(run.id)
print(result.output)

Publish Agents for Others

Once an agent is frozen and the input_schema / output_schema are stable, you can publish it to the FlyMy.AI marketplace. Buyers discover the agent, fill out the auto-generated form, and pay per run.

Agent lifecycle

StageWhat happens
CreateSet name, goal (with {{ placeholders }}), input_schema / output_schema, attach tools.
Run / ChatAgent executes, calls tools, streams events; iterate via follow-up messages.
FreezeBackend distills the chat into a Markdown plan (instruction_md) bounded by input_description / output_description.
Run instructionRe-execute the frozen plan with fresh variables — fast, deterministic, no re-exploration.
Two ways to run: execute, or freeze for repeated runs
  • Execute - create the agent and run it. The right mode for one-off or interactive work: run it, iterate with follow-up messages, get a result.
  • Freeze (a.k.a. compile) - once a run is good, freeze it and re-run the frozen instruction with fresh variables. The right mode for anything recurring (every day, on a schedule, "for each", "at scale"). A frozen run skips re-exploration, so it spends far fewer tokens, runs faster, and stays deterministic.

"Freeze" and "compile" are the same operation - the SDK surface is client.compilations. Not sure which mode you need? Ask: "Will this run once, or repeatedly?" When a pipeline will clearly run more than once, freeze it.

Next Steps