Skip to content

35-omni-agent.halo ​

examples/35-omni-agent.halo |! people

Open in the playground →

halo
tool UI_System : Figma("Env.FIGMA_TOKEN")
tool Local_Shell : Bash()
tool Source_Control : GitHub("Env.GITHUB_TOKEN")
tool PM_System : Linear("Env.LINEAR_TOKEN")
tool Comm_System : Slack("Env.SLACK_BOT_TOKEN")

agent DevAgent [openai/gpt-4]
agent PMAgent [anthropic/claude-3-opus]

pipeline OmniWorkflow(figmaNodeId: String) -> Result:
  figmaNodeId
    // 1. Read the design spec
    |> UI_System.execute(method: "get_node", file: "my-file-id")
    
    // 2. Dev Agent writes the React component locally
    |> DevAgent.prompt("Write a React component for this Figma spec: {{context.current}}")
    |> Local_Shell.execute(command: "echo '{{context.current}}' > src/components/NewComponent.tsx")
    
    // 3. Dev Agent runs the build to verify it works
    |> Local_Shell.execute(command: "npm run build")
    
    // 4. Dev Agent pushes a PR
    |> Source_Control.execute(method: "create_pr", repo: "my-org/my-repo", branch: "feat/new-component")
    
    // 5. PM Agent reads the PR and creates a Linear ticket
    |> PMAgent.prompt("Create a release ticket description for this PR: {{context.current}}")
    |> PM_System.execute(method: "create_issue", team: "ENG", title: "New Component UI", description: "{{context.current}}")
    
    // 6. PM Agent notifies the team in Slack with a human-in-the-loop approval
    |> Comm_System.execute(channel: "#releases", text: "New PR is ready for review! Ticket: {{context.data.PM_System.execute.result}}. Approve to deploy.", buttons: ["Approve"])
    ~> listen(Slack.Interaction)
    
    // 7. Deploy!
    |> Local_Shell.execute(command: "npm run deploy")

curl -fsSL https://halolang.com/install.sh | sh