Giter Site home page Giter Site logo

fixie-examples's Introduction

Fixie Examples

This repo contains examples of how to use the Fixie.ai platform. You can clone this repository directly to get started.

Built a cool agent that you want to share? Contribute back to this repo by opening a PR!

Full docs can be found here: https://docs.fixie.ai/.

Installing the Fixie CLI

You'll need to install the Fixie CLI to run these examples. You'll need Python >= 3.9 installed.

Install the Fixie CLI with pip install fixieai. Once installed, run fixie auth to authenticate to the Fixie service. If you don't already have an account, you'll need to create one at app.fixie.ai.

Building agents locally

You can scaffold out a default agent by running: fixie init

Fixie makes it easy to build, test, and debug your agents locally. To build an agent you need two files:

  • agent.yaml
  • main.py

In the agent.yaml file you will have the following fields:

handle: "agent"
description: |
  The `agent` serves the following function.

  Example queries:
    -Do this task for me.

more_info_url: "https://github.com/fixie-ai/fixie-examples"
entry_point: main:agent
public: false

In the main.py file you will have the following fields:

from fixieai import agents

BASE_PROMPT = """I am an intelligent agent that does a task."""

FEW_SHOTS = """
Q: Example question here
A: Example of answer here
"""

agent = agents.CodeShotAgent(BASE_PROMPT, FEW_SHOTS)

Deploying agents

Deploying agents will automatically upload your agent to the Fixie cloud and start serving it immediately on the platform.

Run fixie agent deploy to create (or update) the agent and upload your fewshots and functions to Fixie.

Once you run this command you test it locally by running the following command: fixie session new '@username/agentname example query.

Or you can go to app.fixie.ai and chat with your new agent by invoking it in the main chat with @username/agentname.

Styleguide for agents

We recommend that you write the agent handle in small caps. See example below

handle: "dice"
description: |
  The `dice` agent rolls virtual dice.

  Example queries:
    - Roll a d20.
    - Roll two dice and blow on them first for good luck
    - Roll 3d8
  Tags: func
more_info_url: "https://github.com/fixie-ai/fixie-examples"
entry_point: main:agent
public: false

fixie-examples's People

Contributors

hessamb avatar juberti avatar mdwelsh avatar petersalas avatar stefania11 avatar zkoch avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.