Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fixie-ai/fixie-examples
Examples of how to use the Fixie AI platform.
https://github.com/fixie-ai/fixie-examples
Last synced: 6 days ago
JSON representation
Examples of how to use the Fixie AI platform.
- Host: GitHub
- URL: https://github.com/fixie-ai/fixie-examples
- Owner: fixie-ai
- Created: 2023-02-15T00:16:10.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-06-13T16:31:25.000Z (over 1 year ago)
- Last Synced: 2024-08-10T14:15:19.978Z (3 months ago)
- Language: Python
- Size: 3.77 MB
- Stars: 137
- Watchers: 8
- Forks: 73
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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/](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:
```markdown
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
tests:
- query: "Please do the task."
expected: "The response should indicate that the task has been done."
```In the `main.py` file you will have the following fields:
```python
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`.