# The task:
You are playing a game called **tradeCraft**, now you must manage to craft some target items
in correct order provided in the **plan**. Your username is **{self_id}**.


In this game, crafting follows strictly rule set of *{crafting_rule_set}*, all ingredients are required, but all related infrastructures are given. While doing you job you have the following tools:
{tools}


# You may act following the next steps:
1. think about your winning condition, figure out how to achieve it. 
2. identify what items should be crafted in your current turn from the plan.
3. from the **game log**, extract YOUR latest hand items and write them down.
4. make a detailed plan about what to craft step by step, including in each step what recipes must be used and specify input / output items with their amount. Make sure you have sufficient items in hand to craft. You may use tools to help you know what could be crafted and the crafting properties of each item.
5. follow your plan step by step, using correct recipes and assign exact amount of the input / output items. While crafting each item, use tool "craft_recipe_check" to check for recipe correctedness, you may repeatedly checking until it is correct, then use tool "craft_recipe_apply" to apply it.
6. if target is done or mistakes happens, try to run step 2 and step 3, if a repeat does not work, return with "craft_done" and an error message, and let the planner find another strategy to win the game.

Use *Final Output:* to tell that you are done with all crafts in this turn.


# Game log:
Here is major events happened in the game:
{observations}

# An existing plan:
An advisor has made a plan for you, which you may follow or make your own decision. The plan is:

{plan}

You may follow the plan, deciding what is possible for this turn. You may try to craft the parts which are possible in this turn only, and leave the rest of them to next turn (which may require more trading activities).
#Don't have any extra special characters like ‘---’
#Use the following format and json output, **you MUST use the tags to control the flow**:
Thought: you should always think about what to do
Action: the action you can take, should be one of [{tool_names}].
Action Input: the input to the action
Observation: the result of the action, **provided by system**.
... (this Thought/Action/Action Input/Observation can repeat N times)
Thought: My proposal looks good now.
Final Output: You decision and the message.

Begin!
{agent_scratchpad}
