{"id":19654399,"url":"https://github.com/0xry4n/airistotle","last_synced_at":"2026-05-18T02:31:17.099Z","repository":{"id":210316665,"uuid":"726272501","full_name":"0xRy4n/airistotle","owner":"0xRy4n","description":"Airistotle is a basic implementation of the OpenAI Assistants API for making simple programmatic AI assistants.","archived":false,"fork":false,"pushed_at":"2024-03-12T02:06:56.000Z","size":33,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-01T20:06:22.811Z","etag":null,"topics":["ai-chat","assistants-api","chatbot","gpt","openai","slack-bot"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/0xRy4n.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-12-01T23:07:30.000Z","updated_at":"2024-04-19T01:35:32.000Z","dependencies_parsed_at":"2023-12-02T00:28:05.382Z","dependency_job_id":"59954e2b-3c65-4f1a-ad78-9e037309cc01","html_url":"https://github.com/0xRy4n/airistotle","commit_stats":null,"previous_names":["0xry4n/airistotle"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/0xRy4n/airistotle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xRy4n%2Fairistotle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xRy4n%2Fairistotle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xRy4n%2Fairistotle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xRy4n%2Fairistotle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0xRy4n","download_url":"https://codeload.github.com/0xRy4n/airistotle/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xRy4n%2Fairistotle/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33162603,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T22:39:12.733Z","status":"online","status_checked_at":"2026-05-18T02:00:06.436Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-chat","assistants-api","chatbot","gpt","openai","slack-bot"],"created_at":"2024-11-11T15:17:11.395Z","updated_at":"2026-05-18T02:31:17.081Z","avatar_url":"https://github.com/0xRy4n.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Airistotle\n\nBasic implementation of the assistants API. Supports easy extensibility with function calls.\n\nSee https://platform.openai.com/assistants to setup an assistant.\n\n# Usage\n\nFirst, copy the `.env.template` to `.env` and set any necessary variables. All `Airistotle` variables are required.\nDepending on what interfaces you use and what plugins you have enabled, you may need to set additional environment variables.\n\n\n```python\nfrom airistotle import Assistant\nfrom airsitotle import settings\n\nassistant = Assistant(\n    openai_api_key=settings.OPENAI_API_KEY,\n    assistant_id=settings.ASSISTANT_ID\n)\n\nassistant.send_message(\"What is 2+2?\")\nresponse = assistant.get_response()\n\nprint(response)\n\n\u003e\u003e\u003e 2+2 equals 4.\n```\n\nFor the CLI interface, simply import it from an interactive shell:\n\n```python\nfrom airistotle.interfaces import cli\n```\n\n## Plugins\n\nPlugins are defined in `airistotle.plugins`.\n\nPlugins can easily be added by extending the `BasePlugin` class in `airistotle.plugins.base`. The only expectation is that all plugin classes will\nimplement a `run()` method will return a string (the result of the function call). Converting a more complex data structure like a dict or list into a string will work fine.\n\nIt is also expected your Plugin Class will have a class attribute called `name` which corresponds to the function name you defined in your assistants function definition.\n\nThe arguments of your `run` method do not matter as long as they match the parameters you specified in your assistant's function definition.\n\nHere is an example of the function definition for the `WebSearch` plugin:\n\n```json\n{\n  \"name\": \"web_search\",\n  \"description\": \"Perform a web search and retrieve the contents from the top results. Use this when ever you are unsure of an answer and need more information. Use it to supplement your own knowledge, not replace it.\",\n  \"parameters\": {\n    \"type\": \"object\",\n    \"properties\": {\n      \"query\": {\n        \"type\": \"string\",\n        \"description\": \"The query you want to search for.\"\n      }\n    },\n    \"required\": [\n      \"query\"\n    ]\n  }\n}\n```\n\nWhen called, the assistant class will unpack the keyword argument list generated by the OpenAI Assistant and pass it to the run argument. In the above example, it's expected that the run function would have a single parameter `query` which would except a `str`. \n\n### Enabling Plugins\n\nYou can enable plugins in the `settings.py` file. \n\n```python\n\nfrom .plugins import YourPlugin\n\nAVAILABLE_PLUGINS = {\n    YourPlugin.name:YourPlugin(),\n}\n\n```\n\nAs long as there is a corresponding function definition in your assistant (see https://platform.openai.com/assistants), this will allow the Assistant class to process the action when the function call is requested. Keep in mind, it's up to the discretion of the OpenAI Assistant to determine when to call functions, and this is influenced both by system prompt and by function description.\n\n## Interfaces\n\nSome pre-written interfaces, such as a Slack Interface, may be configured in the `airistotle.interfaces` directory. \n\n\n#### Notes\n\nAiristotle uses Haystack for a basic web_search function, which is incredibly overkill. You can remove this function if you'd like to avoid the Haystack dependency. Alternatively, you can use Haystack for additional extensibility via plugins.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xry4n%2Fairistotle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0xry4n%2Fairistotle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xry4n%2Fairistotle/lists"}